|
|||||||||||
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.FigGroup
org.tigris.gef.presentation.FigNode
org.argouml.uml.diagram.ui.FigNodeModelElement
Abstract class to display diagram icons for UML ModelElements that look like nodes and that have editiable names and can be resized.
Field Summary | |
protected org.tigris.gef.presentation.FigRect |
_bigPort
Deprecated. 0.15.3 visibility will change use getter/setter. TODO: What is the name of the getter? What is the name of the setter? |
private int |
_cachedHeight
|
private int |
_cachedWidth
|
private NotationName |
_currentNotationName
|
protected java.util.Vector |
_enclosedFigs
|
protected org.tigris.gef.presentation.Fig |
_encloser
|
private java.util.Set |
_eventSenders
A set of object arrays consisting of a sender of events and the event types this object is interested in. |
private ItemUID |
_id
|
org.tigris.gef.presentation.FigText |
_name
Deprecated. 0.15.3 visibility will change use getNameFig() and setNameFig() to access the Figs. Use getName() and setName() to just change the text. |
protected boolean |
_readyToEdit
|
private static java.awt.image.ConvolveOp |
_shadowConvolveOp
|
private java.awt.image.BufferedImage |
_shadowImage
|
private static java.awt.image.LookupOp |
_shadowLookupOp
|
int |
_shadowSize
Deprecated. 0.15.3 visibility will change use getter/setter |
org.tigris.gef.presentation.FigText |
_stereo
Deprecated. 0.15.3 visibility will change use getter/setter getStereotypeFig() and setStereoTypeFig() to access the Figs. Use getStereotype() and setStereotype() to change stereotype text. TODO: How shall the calls _stereo.setJustificationByName("Center"); _stereo.setAllowsTab(false); _stereo.setEditable(false); _stereo.setExpandOnly(true); center(getStereotypeFig()); where private void center(FigText figText); be converted? |
protected static java.lang.String |
BUNDLE
|
private org.apache.log4j.Logger |
cat
|
protected boolean |
checkSize
|
static java.awt.Font |
ITALIC_LABEL_FONT
|
static java.awt.Font |
LABEL_FONT
|
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. |
protected static int |
ROWHEIGHT
|
protected static int |
SHADOW_COLOR_ALPHA
The transparency value of the shadow color (0-255). |
protected static int |
SHADOW_COLOR_VALUE
The intensity value of the shadow color (0-255). |
protected static int |
STEREOHEIGHT
|
protected boolean |
suppressCalcBounds
|
Fields inherited from class org.tigris.gef.presentation.FigNode |
_blinkPorts, _figEdges, _highlight, ang135, ang225, ang315, ang45 |
Fields inherited from class org.tigris.gef.presentation.FigGroup |
_dynObjects, _extraFrameSpace |
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 | |
FigNodeModelElement()
|
|
FigNodeModelElement(org.tigris.gef.graph.GraphModel gm,
java.lang.Object node)
Partially construct a new FigNode. |
Method Summary | |
void |
addFig(org.tigris.gef.presentation.Fig f)
Adds a fig to this FigNodeModelElement and removes it from the group it belonged to if any. |
void |
calcBounds()
|
protected void |
createFeatureIn(org.tigris.gef.presentation.FigGroup fg,
java.awt.event.InputEvent me)
|
void |
damage()
|
void |
delayedVetoableChange(java.beans.PropertyChangeEvent pce)
|
void |
delete()
|
void |
dispose()
|
void |
elementOrdering(java.util.Vector figures)
Update the order of this fig and the order of the figs that are inside of this fig |
void |
enableSizeChecking(boolean flag)
|
void |
finalize()
|
NotationName |
getContextNotation()
Returns the notation name for this fig. |
java.util.Vector |
getEnclosedFigs()
|
org.tigris.gef.presentation.Fig |
getEnclosingFig()
|
ItemUID |
getItemUID()
|
java.lang.String |
getName()
Get the name of the model element this Fig represents |
org.tigris.gef.presentation.FigText |
getNameFig()
Get the Fig that displays the model element name |
java.util.Vector |
getPopUpActions(java.awt.event.MouseEvent me)
|
int |
getShadowSize()
|
java.lang.String |
getStereotype()
Get the text describing the stereotype |
protected org.tigris.gef.presentation.Fig |
getStereotypeFig()
Get the Fig containing the stereotype |
java.lang.String |
getTipString(java.awt.event.MouseEvent me)
|
protected java.awt.Dimension |
getUpdatedSize(org.tigris.gef.presentation.FigGroup fg,
int x,
int y,
int w,
int h)
returns the new size of the FigGroup (either attributes or operations) after calculation new bounds for all sub-figs, considering their minimal sizes; FigGroup need not be displayed; no update event is fired |
boolean |
hit(java.awt.Rectangle r)
Necessary since GEF contains some errors regarding the hit subject. |
ToDoItem |
hitClarifier(int x,
int y)
|
protected boolean |
isPartlyOwner(org.tigris.gef.presentation.Fig fig,
java.lang.Object o)
|
protected boolean |
isPartlyOwner(java.lang.Object o)
|
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)
not used, do nothing. |
void |
listRoleItemSet(ru.novosoft.uml.MElementEvent mee)
|
org.tigris.gef.base.Selection |
makeSelection()
|
protected void |
modelChanged(ru.novosoft.uml.MElementEvent mee)
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 any part of this FigNode, pass it down to one of the internal Figs. |
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 |
paint(java.awt.Graphics g)
Overridden to paint shadows. |
void |
paintClarifiers(java.awt.Graphics g)
Displays visual indications of pending ToDoItems. |
java.lang.String |
placeString()
Reply text to be shown while placing node in diagram |
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 |
setEnclosingFig(org.tigris.gef.presentation.Fig encloser)
Updates the modelelement container if the fig is moved in or out another fig. |
void |
setHandleBox(int x,
int y,
int w,
int h)
Overridden to notify project that save is needed when figure is resized. |
void |
setItemUID(ItemUID id)
|
void |
setName(java.lang.String name)
Change the name of the model element this Fig represents |
protected void |
setNameFig(org.tigris.gef.presentation.FigText fig)
Set the Fig that displays the model element name |
void |
setOwner(java.lang.Object own)
|
void |
setShadowSize(int size)
|
void |
setStereotype(java.lang.String stereotype)
Set the text describing the stereotype |
protected void |
setStereotypeFig(org.tigris.gef.presentation.Fig fig)
Set the Fig containing the stereotype |
void |
superTranslate(int dx,
int dy)
Overridden to notify project that save is needed when figure 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 FigNodeModelElement. |
protected void |
updateBounds()
|
protected void |
updateListeners(java.lang.Object newOwner)
Implementations of this method should register/unregister the fig for all (model)events. |
protected void |
updateNameText()
Updates the text of the name FigText. |
protected void |
updateStereotypeText()
Updates the text of the sterotype FigText. |
void |
vetoableChange(java.beans.PropertyChangeEvent pce)
|
Methods inherited from class org.tigris.gef.presentation.FigNode |
addFigEdge, bindPort, cleanUp, clone, contains, deepHitPort, endTrans, getBlinkPorts, getFigEdges, getHighlight, getPortFig, getPortFigs, getPortFigs, getPortSector, hidePorts, hitPort, hitPort, isBlinkPorts, isDragConnectable, mouseEntered, mouseExited, mousePressed, mouseReleased, removeFigEdge, removePort, setBlinkPorts, setBounds, setHighlight, showPorts, translate, updateEdges |
Methods inherited from class org.tigris.gef.presentation.FigGroup |
addFigs, deepSelect, elements, getDisplayedFigs, getExtraFrameSpace, getFigAt, getFigs, getFigs, getFillColor, getFilled, getFont, getFontFamily, getFontSize, getLineColor, getLineWidth, getPrivateData, getSize, getSubFigBounds, getTextColor, getTextFillColor, getTextFilled, hitFig, isReshapable, isRotatable, iterator, parseDynObjects, removeAll, removeFig, setExtraFrameSpace, setFigs, setFigs, setFillColor, setFilled, setFont, setFontFamily, setFontSize, setLineColor, setLineWidth, setPrivateData, setTextColor, setTextFillColor, setTextFilled |
Methods inherited from class org.tigris.gef.presentation.Fig |
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, connectionPoint, contains, contains, countCornersContained, createDrag, drawDashedLine, drawDashedPerimeter, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoints, getPoints, getPreferedSize, getResource, getSingle, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopieable, isCopyable, isCutable, isDisplayed, isFactoryConstructed, isLowerRightResizable, isMovable, isResizable, isSelected, isVisible, OK, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setCenter, setContext, setDashed, setDashedString, setDisplayed, setGroup, setHeight, setLayer, setLocation, setLocation, setLocked, setMovable, setNumPoints, setPoints, setPoints, setPoints, setPoints, setPoints, setResizable, setResource, setSavingAllowed, setSelected, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, 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 java.awt.event.MouseListener |
mouseEntered, mouseExited, mousePressed, mouseReleased |
Methods inherited from interface org.tigris.gef.ui.Highlightable |
addPropertyChangeListener, removePropertyChangeListener |
Field Detail |
private org.apache.log4j.Logger cat
private NotationName _currentNotationName
public static java.awt.Font LABEL_FONT
public static java.awt.Font ITALIC_LABEL_FONT
public final int MARGIN
protected static final int ROWHEIGHT
protected static final int STEREOHEIGHT
protected boolean checkSize
protected static final int POPUP_ADD_OFFSET
private java.awt.image.BufferedImage _shadowImage
private int _cachedWidth
private int _cachedHeight
private static final java.awt.image.LookupOp _shadowLookupOp
private static final java.awt.image.ConvolveOp _shadowConvolveOp
protected static final int SHADOW_COLOR_VALUE
protected static final int SHADOW_COLOR_ALPHA
protected static final java.lang.String BUNDLE
protected org.tigris.gef.presentation.FigRect _bigPort
public org.tigris.gef.presentation.FigText _name
public org.tigris.gef.presentation.FigText _stereo
protected java.util.Vector _enclosedFigs
protected org.tigris.gef.presentation.Fig _encloser
protected boolean _readyToEdit
protected boolean suppressCalcBounds
public int _shadowSize
private ItemUID _id
private java.util.Set _eventSenders
Constructor Detail |
public FigNodeModelElement()
public FigNodeModelElement(org.tigris.gef.graph.GraphModel gm, java.lang.Object node)
Method Detail |
public void finalize()
public java.lang.String placeString()
public void setItemUID(ItemUID id)
public ItemUID getItemUID()
public org.tigris.gef.presentation.FigText getNameFig()
protected void setNameFig(org.tigris.gef.presentation.FigText fig)
fig
- the name Figpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the name of the model elementpublic java.util.Vector getPopUpActions(java.awt.event.MouseEvent me)
getPopUpActions
in interface org.tigris.gef.ui.PopupGenerator
public org.tigris.gef.presentation.Fig getEnclosingFig()
public void setEnclosingFig(org.tigris.gef.presentation.Fig encloser)
Fig.setEnclosingFig(Fig)
public java.util.Vector getEnclosedFigs()
public void elementOrdering(java.util.Vector figures)
public org.tigris.gef.base.Selection makeSelection()
public void paint(java.awt.Graphics g)
TODO: If g is not a Graphics2D shadows cannot be painted. This is a problem when saving the diagram as SVG.
g
- is a Graphics that we paint this object on.public void paintClarifiers(java.awt.Graphics g)
ClAttributeCompartment
public ToDoItem hitClarifier(int x, int y)
public java.lang.String getTipString(java.awt.event.MouseEvent me)
public void vetoableChange(java.beans.PropertyChangeEvent pce)
vetoableChange
in interface java.beans.VetoableChangeListener
public void delayedVetoableChange(java.beans.PropertyChangeEvent pce)
delayedVetoableChange
in interface DelayedVChangeListener
protected void updateBounds()
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
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 mee)
protected void createFeatureIn(org.tigris.gef.presentation.FigGroup fg, java.awt.event.InputEvent me)
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
protected boolean isPartlyOwner(java.lang.Object o)
protected boolean isPartlyOwner(org.tigris.gef.presentation.Fig fig, java.lang.Object o)
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()
public void setOwner(java.lang.Object own)
protected void updateStereotypeText()
protected void updateNameText()
protected void updateListeners(java.lang.Object newOwner)
newOwner
- public NotationName getContextNotation()
getContextNotation
in interface NotationContext
NotationContext.getContextNotation()
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()
public void calcBounds()
public void enableSizeChecking(boolean flag)
protected java.awt.Dimension getUpdatedSize(org.tigris.gef.presentation.FigGroup fg, int x, int y, int w, int h)
public void setShadowSize(int size)
public int getShadowSize()
public boolean hit(java.awt.Rectangle r)
Fig.hit(Rectangle)
public void delete()
Fig.delete()
public void damage()
Fig.damage()
public void postLoad()
Fig.postLoad()
public void superTranslate(int dx, int dy)
public void setHandleBox(int x, int y, int w, int h)
public void addFig(org.tigris.gef.presentation.Fig f)
TODO: remove this once GEF0.10 is in place and tested
protected void setStereotypeFig(org.tigris.gef.presentation.Fig fig)
fig
- the stereotype Figprotected org.tigris.gef.presentation.Fig getStereotypeFig()
public void setStereotype(java.lang.String stereotype)
stereotype
- the stereotype textpublic java.lang.String getStereotype()
|
|||||||||||
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 |