|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.presentation.Fig
org.tigris.gef.presentation.FigEdge
org.tigris.gef.presentation.FigEdgePoly
org.argouml.uml.diagram.ui.FigEdgeModelElement
Abstract class to display diagram arcs for UML ModelElements that look like arcs and that have editiable names.
Nested Class Summary |
Nested classes inherited from class org.tigris.gef.presentation.FigEdge |
|
Field Summary | |
protected static String |
BUNDLE
BUNDLE |
private NotationName |
currentNotationName
The current notation for this fig. |
private ItemUID |
id
|
private static Font |
ITALIC_LABEL_FONT
|
private static Font |
LABEL_FONT
|
private static Logger |
LOG
|
private org.tigris.gef.presentation.FigText |
name
The Fig that displays the name of this model element. |
protected static int |
POPUP_ADD_OFFSET
Offset from the end of the set of popup actions at which new items should be inserted by concrete figures. |
private boolean |
removeFromDiagram
Set the removeFromDiagram to false if this edge may not be removed from the diagram. |
private org.tigris.gef.presentation.FigText |
stereo
The Fig that displays the stereotype of this model element. |
Fields inherited from class org.tigris.gef.presentation.FigEdgePoly |
_initiallyLaidOut |
Fields inherited from class org.tigris.gef.presentation.FigEdge |
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _fig, _highlight, _pathItems, _sourceFigNode, _useNearest |
Fields inherited from class org.tigris.gef.presentation.Fig |
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _displayed, _fillColor, _filled, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _selected, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE |
Constructor Summary | |
FigEdgeModelElement()
Partially construct a new FigNode. |
|
FigEdgeModelElement(Object edge)
the constructor that hooks the Fig into the UML model element |
Method Summary | |
protected void |
allowRemoveFromDiagram(boolean allowed)
|
protected boolean |
canEdit(org.tigris.gef.presentation.Fig f)
|
void |
damage()
|
void |
delayedVetoableChange(PropertyChangeEvent pce)
|
void |
deleteFromModel()
|
void |
finalize()
|
NotationName |
getContextNotation()
This default implementation simply requests the default notation. |
protected Object |
getDestination()
Returns the destination of the edge. |
static Font |
getItalicLabelFont()
|
ItemUID |
getItemUID()
Getter for the UID |
static Font |
getLabelFont()
|
org.tigris.gef.presentation.FigText |
getNameFig()
Getter for name, the name Fig |
Vector |
getPopUpActions(MouseEvent me)
|
protected Object |
getSource()
Returns the source of the edge. |
int |
getSquaredDistance(Point p1,
Point p2)
distance formula: (x-h)^2 + (y-k)^2 = distance^2 |
org.tigris.gef.presentation.FigText |
getStereotypeFig()
Getter for stereo, the stereotype Fig |
String |
getTipString(MouseEvent me)
|
boolean |
hit(Rectangle r)
|
ToDoItem |
hitClarifier(int x,
int y)
The user clicked on the clarifier. |
void |
keyPressed(KeyEvent ke)
|
void |
keyReleased(KeyEvent ke)
|
void |
keyTyped(KeyEvent ke)
|
private void |
layoutThisToSelf()
helper method for updateClassifiers() in order to automatically layout an edge that is now from and to the same node type. |
org.tigris.gef.base.Selection |
makeSelection()
Returns a SelectionRerouteEdge object that manages selection
and rerouting of the edge. |
protected void |
modelChanged(PropertyChangeEvent e)
This is called after any part of the UML MModelElement has changed. |
void |
mouseClicked(MouseEvent me)
If the user double clicks on anu part of this FigNode, pass it down to one of the internal Figs. |
void |
mouseEntered(MouseEvent me)
|
void |
mouseExited(MouseEvent me)
|
void |
mousePressed(MouseEvent me)
|
void |
mouseReleased(MouseEvent me)
|
void |
notationAdded(ArgoNotationEvent event)
Invoked when a notation has been added. |
void |
notationChanged(ArgoNotationEvent event)
Invoked when any aspect of the notation has been changed. |
void |
notationProviderAdded(ArgoNotationEvent event)
Invoked when a notation provider has been added. |
void |
notationProviderRemoved(ArgoNotationEvent event)
Invoked when a notation provider has been removed. |
void |
notationRemoved(ArgoNotationEvent event)
Invoked when a notation has been removed. |
void |
paintClarifiers(Graphics g)
|
void |
postLoad()
|
void |
propertyChange(PropertyChangeEvent pve)
|
void |
removeFromDiagram()
|
void |
renderingChanged()
Rerenders the fig if needed. |
void |
setItemUID(ItemUID newId)
Setter for the UID |
void |
setOwner(Object newOwner)
|
protected void |
textEdited(org.tigris.gef.presentation.FigText ft)
This method is called after the user finishes editing a text field that is in the FigEdgeModelElement. |
protected boolean |
updateClassifiers()
Updates the classifiers the edge is attached to. |
protected void |
updateNameText()
generate the notation for the modelelement and stuff it into the text Fig |
protected void |
updateStereotypeText()
generate the notation for the stereotype and stuff it into the text Fig |
void |
vetoableChange(PropertyChangeEvent pce)
|
Methods inherited from class org.tigris.gef.presentation.FigEdgePoly |
computeRoute, findAvoidPt, insertPoint, layoutEdge, makeEdgeFig, moveVertex, paint, routingRectPoint, segOK, setEndPoints, setInitiallyLaidOut, setPoint, tryRoute |
Methods inherited from class org.tigris.gef.presentation.FigEdge |
addPathItem, calcBounds, cleanUp, contains, getBetweenNearestPoints, getBounds, getBounds, getDashed, getDestArrowHead, getDestFigNode, getDestPortFig, getFig, getFirstPoint, getHighlight, getLastPoint, getLineColor, getLineWidth, getNumPoints, getPathItem, getPathItemFig, getPathItemFigs, getPathItemsRaw, getPerimeterLength, getPoint, getPoints, getPrivateData, getSourceArrowHead, getSourceFigNode, getSourcePortFig, getXs, getYs, hasFillColor, hitFig, intersects, isReshapable, isResizable, isRotatable, paintArrowHeads, paintHighlightLine, paintPathItems, removePathItem, removePathItem, setBetweenNearestPoints, setDashed, setDestArrowHead, setDestFigNode, setDestPortFig, setFig, setHighlight, setLineColor, setLineWidth, setNumPoints, setPoint, setPoints, setPoints, setPoints, setPrivateData, setSourceArrowHead, setSourceFigNode, setSourcePortFig, setXs, setYs, stuffPointAlongPerimeter, translateEdge, updatePathItemLocations |
Methods inherited from class org.tigris.gef.presentation.Fig |
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, clone, connectionPoint, contains, contains, countCornersContained, createDrag, delete, dispose, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getClosestPoint, getContext, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLayer, getLocation, getLocked, getMinimumSize, getOwner, getPreferredSize, getResource, getSingle, getSize, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getY, hasLineColor, initAnnotations, intersectsPerimeter, isAnnotation, isCopieable, isCopyable, isCutable, isDisplayed, isLowerRightResizable, isMovable, isSelected, isVisible, OK, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setCenter, setContext, setDashedString, setDisplayed, setEnclosingFig, setFillColor, setFilled, setGroup, setHandleBox, setHeight, setLayer, setLocation, setLocation, setLocked, setMovable, setPoint, setPoint, setPoints, setPoints, setResizable, setResource, setSavingAllowed, setSelected, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setY, stuffBounds, translate, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.tigris.gef.ui.Highlightable |
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
private static final Logger LOG
private boolean removeFromDiagram
protected static final String BUNDLE
BUNDLE
private static final Font LABEL_FONT
private static final Font ITALIC_LABEL_FONT
protected static final int POPUP_ADD_OFFSET
private org.tigris.gef.presentation.FigText name
private org.tigris.gef.presentation.FigText stereo
private ItemUID id
private NotationName currentNotationName
Constructor Detail |
public FigEdgeModelElement()
public FigEdgeModelElement(Object edge)
edge
- the UML elementMethod Detail |
public void finalize()
Object.finalize()
public void setItemUID(ItemUID newId)
newId
- the new UIDpublic ItemUID getItemUID()
public String getTipString(MouseEvent me)
Fig.getTipString(java.awt.event.MouseEvent)
public Vector getPopUpActions(MouseEvent me)
getPopUpActions
in interface org.tigris.gef.ui.PopupGenerator
PopupGenerator.getPopUpActions(java.awt.event.MouseEvent)
public int getSquaredDistance(Point p1, Point p2)
p1
- pointp2
- point
public void paintClarifiers(Graphics g)
g
- the Graphics
objectpublic ToDoItem hitClarifier(int x, int y)
x
- the x of the point clickedy
- the y of the point clicked
public org.tigris.gef.base.Selection makeSelection()
SelectionRerouteEdge
object that manages selection
and rerouting of the edge.
public org.tigris.gef.presentation.FigText getNameFig()
public org.tigris.gef.presentation.FigText getStereotypeFig()
public void vetoableChange(PropertyChangeEvent pce)
vetoableChange
in interface VetoableChangeListener
VetoableChangeListener.vetoableChange(java.beans.PropertyChangeEvent)
public void delayedVetoableChange(PropertyChangeEvent pce)
delayedVetoableChange
in interface DelayedVChangeListener
pce
- the eventDelayedVChangeListener.delayedVetoableChange(java.beans.PropertyChangeEvent)
public void propertyChange(PropertyChangeEvent pve)
propertyChange
in interface PropertyChangeListener
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
protected void textEdited(org.tigris.gef.presentation.FigText ft)
ft
- the text Fig that has been editedprotected boolean canEdit(org.tigris.gef.presentation.Fig f)
f
- the Fig
public void mousePressed(MouseEvent me)
mousePressed
in interface MouseListener
MouseListener.mousePressed(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent me)
mouseReleased
in interface MouseListener
MouseListener.mouseReleased(java.awt.event.MouseEvent)
public void mouseEntered(MouseEvent me)
mouseEntered
in interface MouseListener
MouseListener.mouseEntered(java.awt.event.MouseEvent)
public void mouseExited(MouseEvent me)
mouseExited
in interface MouseListener
MouseListener.mouseExited(java.awt.event.MouseEvent)
public void mouseClicked(MouseEvent me)
mouseClicked
in interface MouseListener
MouseListener.mouseClicked(java.awt.event.MouseEvent)
public void keyPressed(KeyEvent ke)
keyPressed
in interface KeyListener
KeyListener.keyPressed(java.awt.event.KeyEvent)
public void keyReleased(KeyEvent ke)
keyReleased
in interface KeyListener
Not used, do nothing.
public void keyTyped(KeyEvent ke)
keyTyped
in interface KeyListener
KeyListener.keyTyped(java.awt.event.KeyEvent)
protected void modelChanged(PropertyChangeEvent e)
e
- the eventprotected void updateNameText()
protected void updateStereotypeText()
public void setOwner(Object newOwner)
Fig.setOwner(java.lang.Object)
public void deleteFromModel()
Fig.deleteFromModel()
public NotationName getContextNotation()
getContextNotation
in interface NotationContext
NotationContext.getContextNotation()
public void notationChanged(ArgoNotationEvent event)
ArgoNotationEventListener
notationChanged
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the change.ArgoNotationEventListener.notationChanged(org.argouml.application.events.ArgoNotationEvent)
public void notationAdded(ArgoNotationEvent event)
ArgoNotationEventListener
notationAdded
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the added notation.ArgoNotationEventListener.notationAdded(org.argouml.application.events.ArgoNotationEvent)
public void notationRemoved(ArgoNotationEvent event)
ArgoNotationEventListener
notationRemoved
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the removed notation.ArgoNotationEventListener.notationRemoved(org.argouml.application.events.ArgoNotationEvent)
public void notationProviderAdded(ArgoNotationEvent event)
ArgoNotationEventListener
notationProviderAdded
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing
the added notation provider.ArgoNotationEventListener.notationProviderAdded(org.argouml.application.events.ArgoNotationEvent)
public void notationProviderRemoved(ArgoNotationEvent event)
ArgoNotationEventListener
notationProviderRemoved
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing
the removed notation provider.ArgoNotationEventListener.notationProviderRemoved(org.argouml.application.events.ArgoNotationEvent)
public void renderingChanged()
public boolean hit(Rectangle r)
Fig.hit(java.awt.Rectangle)
public void removeFromDiagram()
Fig.removeFromDiagram()
public void damage()
Fig.damage()
protected boolean updateClassifiers()
Updates the classifiers the edge is attached to.
Calls a helper method (layoutThisToSelf) to avoid this edge disappearing if the new source and dest are the same node.
private void layoutThisToSelf()
adapted from SelectionWButtons from line 280
protected Object getSource()
protected Object getDestination()
public void postLoad()
Fig.postLoad()
public static Font getLabelFont()
public static Font getItalicLabelFont()
protected void allowRemoveFromDiagram(boolean allowed)
allowed
- true if the function RemoveFromDiagram is allowed
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20050222) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |