|
|||||||||
| 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.ClassPattern
public class ClassPattern
Represents the class pattern. Class patterns express conditions on
filtered subsets of instances of the specific class and are populated
with one or more slot patterns.
Class patterns are associated with a class box and have a number of
slot patterns, which are stored in a vector. Each slot pattern is stored
in a separate line and is identified by the slot name.
Each class pattern is associated with four (4) points that represent:
| 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 | |
|---|---|
ClassPattern()
Creates a class pattern with an empty vector of slot patterns. |
|
ClassPattern(ClassBox cb,
java.util.Vector<SlotPattern> sp)
Creates a class pattern with a given associated class box and an initial vector of slot patterns. |
|
ClassPattern(java.util.Vector<SlotPattern> sp)
Creates a class pattern with a given initial vector of slot patterns. |
|
| Method Summary | |
|---|---|
void |
addSlotPattern(SlotPattern sp)
Adds the specified slot pattern to the end of the slot pattern vector, increasing its size by one. |
int |
compareTo(java.lang.Object anotherCp)
Compares this class pattern with a given class pattern. |
ClassBox |
getClassBox()
Returns the associated class box that contains the given class pattern. |
java.awt.Point |
getLeftPointNeg()
Returns the negative "incoming" point of the class pattern. |
java.awt.Point |
getLeftPointPos()
Returns the positive "incoming" point of the class pattern. |
java.awt.Point |
getRightPointNeg()
Returns the negative "outgoing" point of the class pattern. |
java.awt.Point |
getRightPointPos()
Returns the positive "outgoing" point of the class pattern. |
java.util.Vector<SlotPattern> |
getSlotPatterns()
Returns the vector containing the slot patterns included in this class pattern. |
void |
paint(java.awt.Graphics g)
Draws the class pattern. |
void |
removeSlotPattern(SlotPattern sp)
Removes the specified slot pattern from the slot pattern vector, reducing its size by one. |
void |
setClassBox(ClassBox cb)
Sets the associated class box that contains the given class pattern. |
void |
setLeftPointNeg(java.awt.Point leftPointNeg)
Sets the negative "incoming" point of the class pattern. |
void |
setLeftPointPos(java.awt.Point leftPointPos)
Sets the positive "incoming" point of the class pattern. |
void |
setRightPointNeg(java.awt.Point rightPointNeg)
Sets the negative "outgoing" point of the class pattern. |
void |
setRightPointPos(java.awt.Point rightPointPos)
Sets the positive "outgoing" point of the class pattern. |
void |
setSlotPatterns(java.util.Vector<SlotPattern> slotPatterns)
Sets the slot pattern vector of this class pattern. |
| 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 ClassPattern()
SlotPatternpublic ClassPattern(java.util.Vector<SlotPattern> sp)
sp - the initial vector of slot patternsSlotPattern
public ClassPattern(ClassBox cb,
java.util.Vector<SlotPattern> sp)
cb - the associated class boxsp - the initial vector of slot patternsClassBox,
SlotPattern| Method Detail |
|---|
public java.util.Vector<SlotPattern> getSlotPatterns()
SlotPatternpublic void setSlotPatterns(java.util.Vector<SlotPattern> slotPatterns)
slotPatterns - the slot pattern vectorSlotPatternpublic void addSlotPattern(SlotPattern sp)
sp - the slot pattern to be addedSlotPatternpublic void removeSlotPattern(SlotPattern sp)
sp - the slot pattern to be removedSlotPatternpublic ClassBox getClassBox()
ClassBoxpublic void setClassBox(ClassBox cb)
cb - the associated class boxClassBoxpublic void paint(java.awt.Graphics g)
g - the Graphics component that draws the class patternGraphics,
SlotPattern
public int compareTo(java.lang.Object anotherCp)
throws java.lang.ClassCastException
compareTo in interface java.lang.ComparableanotherCp - the class pattern to compare this class pattern to
java.lang.ClassCastException - A ClassCastException is thrown if the
Object to compare this object to belongs to a different class.public java.awt.Point getLeftPointPos()
public void setLeftPointPos(java.awt.Point leftPointPos)
leftPointPos - the positive "incoming" point of the class patternpublic java.awt.Point getLeftPointNeg()
public void setLeftPointNeg(java.awt.Point leftPointNeg)
leftPointNeg - the negative "incoming" point of the class patternpublic java.awt.Point getRightPointPos()
public void setRightPointPos(java.awt.Point rightPointPos)
rightPointPos - the positive "outgoing" point of the class pattern.public java.awt.Point getRightPointNeg()
public void setRightPointNeg(java.awt.Point rightPointNeg)
rightPointNeg - the negative "outgoing" point of the class pattern
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||