|
|||||||||||
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 | |
private NotationName |
_currentNotationName
The current notation for this fig. |
private ItemUID |
_id
|
protected org.tigris.gef.presentation.FigText |
_name
|
protected org.tigris.gef.presentation.FigText |
_stereo
|
protected static java.lang.String |
BUNDLE
|
protected static org.apache.log4j.Logger |
cat
Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your class. This will be removed. |
static java.awt.Font |
ITALIC_LABEL_FONT
|
static java.awt.Font |
LABEL_FONT
|
private static org.apache.log4j.Logger |
LOG
|
int |
MARGIN
|
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. |
Fields inherited from class org.tigris.gef.presentation.FigEdgePoly |
_initiallyLaidOut |
Fields inherited from class org.tigris.gef.presentation.FigEdge |
_arrowHeadEnd, _arrowHeadStart, _destFigNode, _destPortFig, _fig, _highlight, _pathItems, _sourceFigNode, _sourcePortFig, _useNearest |
Fields inherited from class org.tigris.gef.presentation.Fig |
_allowsSaving, _context, _dashes, _displayed, _fillColor, _filled, _g2dashes, _group, _h, _layer, _lineColor, _lineWidth, _locked, _resource, _selected, _shown, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, DASH_ARRAYS, DASHED_CHOICES, MIN_SIZE |
Constructor Summary | |
FigEdgeModelElement()
Partially construct a new FigNode. |
|
FigEdgeModelElement(java.lang.Object edge)
|
Method Summary | |
protected boolean |
canEdit(org.tigris.gef.presentation.Fig f)
|
void |
damage()
|
void |
delayedVetoableChange(java.beans.PropertyChangeEvent pce)
|
void |
delete()
|
void |
dispose()
|
void |
finalize()
|
NotationName |
getContextNotation()
This default implementation simply requests the default notation. |
protected java.lang.Object |
getDestination()
Returns the destination of the edge. |
ItemUID |
getItemUID()
|
org.tigris.gef.presentation.FigText |
getNameFig()
|
java.util.Vector |
getPopUpActions(java.awt.event.MouseEvent me)
|
protected java.lang.Object |
getSource()
Returns the source of the edge. |
int |
getSquaredDistance(java.awt.Point p1,
java.awt.Point p2)
|
org.tigris.gef.presentation.FigText |
getStereotypeFig()
|
java.lang.String |
getTipString(java.awt.event.MouseEvent me)
|
ToDoItem |
hitClarifier(int x,
int y)
|
private boolean |
isPolyDistLessThan(java.awt.Polygon poly,
int x,
int y,
double maxDist)
helper method for hit(Rectangle). |
void |
keyPressed(java.awt.event.KeyEvent ke)
|
void |
keyReleased(java.awt.event.KeyEvent ke)
not used, do nothing. |
void |
keyTyped(java.awt.event.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. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent mee)
|
org.tigris.gef.base.Selection |
makeSelection()
Returns a SelectionRerouteEdge object that manages selection and rerouting of the edge. |
protected void |
modelChanged(ru.novosoft.uml.MElementEvent e)
This is called aftern any part of the UML MModelElement has changed. |
void |
mouseClicked(java.awt.event.MouseEvent me)
If the user double clicks on anu part of this FigNode, pass it down to one of the internal Figs. |
void |
mouseEntered(java.awt.event.MouseEvent me)
|
void |
mouseExited(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent me)
|
void |
mouseReleased(java.awt.event.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(java.awt.Graphics g)
|
void |
postLoad()
|
void |
propertyChange(java.beans.PropertyChangeEvent pve)
|
void |
propertySet(ru.novosoft.uml.MElementEvent mee)
|
void |
recovered(ru.novosoft.uml.MElementEvent mee)
|
void |
removed(ru.novosoft.uml.MElementEvent mee)
|
void |
renderingChanged()
Rerenders the fig if needed. |
void |
roleAdded(ru.novosoft.uml.MElementEvent mee)
|
void |
roleRemoved(ru.novosoft.uml.MElementEvent mee)
|
void |
setItemUID(ItemUID id)
|
void |
setOwner(java.lang.Object newOwner)
|
void |
setPoints(org.tigris.gef.presentation.Handle h,
int x,
int y)
Overridden to notify project that save is needed when edge is moved. |
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()
|
protected void |
updateStereotypeText()
|
void |
vetoableChange(java.beans.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, getPoints, getPrivateData, getSourceArrowHead, getSourceFigNode, getSourcePortFig, getXs, getYs, hasFillColor, hit, hitFig, intersects, isReshapable, isResizable, isRotatable, paintArrowHeads, paintHighlightLine, paintPathItems, removePathItem, removePathItem, setBetweenNearestPoints, setDashed, setDestArrowHead, setDestFigNode, setDestPortFig, setFig, setHighlight, setLineColor, setLineWidth, setNumPoints, setPoint, 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, 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, getPreferedSize, getResource, getSingle, getSize, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getY, hasLineColor, initAnnotations, intersectsPerimeter, isAnnotation, isCopieable, isCopyable, isCutable, isDisplayed, isFactoryConstructed, 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, 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 |
protected static org.apache.log4j.Logger cat
private static final org.apache.log4j.Logger LOG
protected static final java.lang.String BUNDLE
public static java.awt.Font LABEL_FONT
public static java.awt.Font ITALIC_LABEL_FONT
public final int MARGIN
protected static final int POPUP_ADD_OFFSET
protected org.tigris.gef.presentation.FigText _name
protected org.tigris.gef.presentation.FigText _stereo
private ItemUID _id
private NotationName _currentNotationName
Constructor Detail |
public FigEdgeModelElement()
public FigEdgeModelElement(java.lang.Object edge)
Method Detail |
public void finalize()
public void setItemUID(ItemUID id)
public ItemUID getItemUID()
public java.lang.String getTipString(java.awt.event.MouseEvent me)
public java.util.Vector getPopUpActions(java.awt.event.MouseEvent me)
getPopUpActions
in interface org.tigris.gef.ui.PopupGenerator
public int getSquaredDistance(java.awt.Point p1, java.awt.Point p2)
public void paintClarifiers(java.awt.Graphics g)
public ToDoItem hitClarifier(int x, int y)
public org.tigris.gef.base.Selection makeSelection()
public org.tigris.gef.presentation.FigText getNameFig()
public org.tigris.gef.presentation.FigText getStereotypeFig()
public void vetoableChange(java.beans.PropertyChangeEvent pce)
vetoableChange
in interface java.beans.VetoableChangeListener
public void delayedVetoableChange(java.beans.PropertyChangeEvent pce)
delayedVetoableChange
in interface DelayedVChangeListener
public void propertyChange(java.beans.PropertyChangeEvent pve)
propertyChange
in interface java.beans.PropertyChangeListener
protected void textEdited(org.tigris.gef.presentation.FigText ft) throws java.beans.PropertyVetoException
java.beans.PropertyVetoException
protected boolean canEdit(org.tigris.gef.presentation.Fig f)
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent me)
mouseExited
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked
in interface java.awt.event.MouseListener
public void keyPressed(java.awt.event.KeyEvent ke)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent ke)
keyReleased
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent ke)
keyTyped
in interface java.awt.event.KeyListener
protected void modelChanged(ru.novosoft.uml.MElementEvent e)
protected void updateNameText()
protected void updateStereotypeText()
public void setOwner(java.lang.Object newOwner)
public void propertySet(ru.novosoft.uml.MElementEvent mee)
propertySet
in interface ru.novosoft.uml.MElementListener
public void listRoleItemSet(ru.novosoft.uml.MElementEvent mee)
listRoleItemSet
in interface ru.novosoft.uml.MElementListener
public void recovered(ru.novosoft.uml.MElementEvent mee)
recovered
in interface ru.novosoft.uml.MElementListener
public void removed(ru.novosoft.uml.MElementEvent mee)
removed
in interface ru.novosoft.uml.MElementListener
public void roleAdded(ru.novosoft.uml.MElementEvent mee)
roleAdded
in interface ru.novosoft.uml.MElementListener
public void roleRemoved(ru.novosoft.uml.MElementEvent mee)
roleRemoved
in interface ru.novosoft.uml.MElementListener
public void dispose()
Fig.dispose()
public NotationName getContextNotation()
getContextNotation
in interface NotationContext
public void notationChanged(ArgoNotationEvent event)
ArgoNotationEventListener
notationChanged
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the change.public void notationAdded(ArgoNotationEvent event)
ArgoNotationEventListener
notationAdded
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the added notation.public void notationRemoved(ArgoNotationEvent event)
ArgoNotationEventListener
notationRemoved
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing the removed notation.public void notationProviderAdded(ArgoNotationEvent event)
ArgoNotationEventListener
notationProviderAdded
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing
the added notation provider.public void notationProviderRemoved(ArgoNotationEvent event)
ArgoNotationEventListener
notationProviderRemoved
in interface ArgoNotationEventListener
event
- ArgoNotationEvent
describing
the removed notation provider.public void renderingChanged()
private boolean isPolyDistLessThan(java.awt.Polygon poly, int x, int y, double maxDist)
poly
- is the Polygon.x
- is the x-coordinate of the point.y
- is the y-coordinate of the point.maxDist
- is the longest acceptable distance.
public void delete()
Fig.delete()
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 java.lang.Object getSource()
protected java.lang.Object getDestination()
public void postLoad()
Fig.postLoad()
public void setPoints(org.tigris.gef.presentation.Handle h, int x, int y)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ArgoUML © 1996-2004 (20040316) | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |