|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLabel | +--pipe.dataLayer.PetriNetObject | +--pipe.dataLayer.ArrowLabel
ArrowLabel - Class which depicts an arrow attached to an ArcLabel. This class instead of the Arc will have MouseListeners attached to it.
Field Summary |
Fields inherited from class pipe.dataLayer.PetriNetObject |
pnname |
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ArrowLabel(Arc _parent)
|
Method Summary | |
void |
calcShapeSettings(int quad,
double angle)
This calculates the rotation angle we need to apply to the arrow, and will also handle setting the bounds as that would require this same switch statement. |
Arc |
getArc()
Returns Label's Arc |
NameLabel |
getNameLabel()
Returns label which displays the weighting of the arc it's attached to. |
int |
height()
Returns height without overriding the superclass methods |
void |
modify(double startX,
double startY,
double endX,
double endY)
required by PetrinetObject, does nothing for now |
void |
paintComponent(Graphics g)
|
void |
updateSize(MouseEvent e)
required by PetrinetObject, does nothing for now |
int |
width()
Returns width without overriding the superclass methods |
Methods inherited from class pipe.dataLayer.PetriNetObject |
getColor, getId, getMovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setColor, setId, setMovable |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ArrowLabel(Arc _parent)
Method Detail |
public void calcShapeSettings(int quad, double angle)
quad
- The quadrant in which the arc has been drawn (relates to the angle)angle
- The angle of the drawn arcpublic void paintComponent(Graphics g)
paintComponent
in class PetriNetObject
public void updateSize(MouseEvent e)
updateSize
in class PetriNetObject
e
- Mouse Eventpublic void modify(double startX, double startY, double endX, double endY)
modify
in class PetriNetObject
startX
- Start X-axis positionstartY
- Start Y-axis positionendX
- End X-axis positionendY
- End Y-axis positionpublic int width()
public int height()
public Arc getArc()
public NameLabel getNameLabel()
getNameLabel
in class PetriNetObject
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |