|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
drvgraph.j2d.ClassBox
public class ClassBox
Represents the class box. Class boxes are simply containers that are
populated with one or more class patterns.
Class boxes have a name (the corresponding class name) and a number of
class patterns, which are stored in a vector.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
|---|
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float |
| Field Summary |
|---|
| Fields inherited from class java.awt.Rectangle |
|---|
height, width, x, y |
| Fields inherited from class java.awt.geom.Rectangle2D |
|---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
| Constructor Summary | |
|---|---|
ClassBox()
Creates a class box with no name and an empty vector of class patterns. |
|
ClassBox(java.lang.String cn,
java.util.Vector<ClassPattern> cp)
Creates a class box with a defined class name and a given vector of class patterns. |
|
| Method Summary | |
|---|---|
void |
addClassPattern(ClassPattern cp)
Adds the specified class pattern to the end of the class pattern vector, increasing its size by one. |
int |
compareTo(java.lang.Object anotherCb)
Compares this class box with a given class box. |
java.lang.String |
getClassName()
Returns a string that represents the class name. |
java.util.Vector<ClassPattern> |
getClassPatterns()
Returns the vector, containing the class patterns included in the class box. |
boolean |
isSelected()
Checks if the class box is selected. |
void |
paint(java.awt.Graphics g)
Draws the class box. |
void |
removeClassPattern(ClassPattern cp)
Removes the specified class pattern from the class pattern vector, reducing its size by one. |
void |
setClassName(java.lang.String className)
Sets the class name. |
void |
setClassPatterns(java.util.Vector<ClassPattern> classPatterns)
Sets the class pattern vector of the specific class box. |
void |
setSelected(boolean b)
Sets the "selected" status of the class box. |
| Methods inherited from class java.awt.Rectangle |
|---|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union |
| Methods inherited from class java.awt.geom.Rectangle2D |
|---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
| Methods inherited from class java.awt.geom.RectangularShape |
|---|
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.Shape |
|---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
| Constructor Detail |
|---|
public ClassBox()
public ClassBox(java.lang.String cn,
java.util.Vector<ClassPattern> cp)
cn - the class name stringcp - the initial vector of class patternsClassPattern| Method Detail |
|---|
public java.lang.String getClassName()
public void setClassName(java.lang.String className)
className - the string used as the class namepublic java.util.Vector<ClassPattern> getClassPatterns()
ClassPatternpublic void setClassPatterns(java.util.Vector<ClassPattern> classPatterns)
classPatterns - the class pattern vectorClassPatternpublic void addClassPattern(ClassPattern cp)
cp - the class pattern to be addedClassPatternpublic void removeClassPattern(ClassPattern cp)
cp - the class pattern to be removedClassPatternpublic void setSelected(boolean b)
b - the "selected" status flag (true|false)public boolean isSelected()
public void paint(java.awt.Graphics g)
g - the Graphics component that draws the class boxGraphics,
ClassPattern
public int compareTo(java.lang.Object anotherCb)
throws java.lang.ClassCastException
compareTo in interface java.lang.ComparableanotherCb - the class box to compare this class box to
java.lang.ClassCastException - A ClassCastException is thrown if the
Object to compare this object to belongs to a different class.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||