org.argouml.uml.diagram.static_structure.ui
Class FigClassifierBox

java.lang.Object
  extended byorg.tigris.gef.presentation.Fig
      extended byorg.tigris.gef.presentation.FigGroup
          extended byorg.tigris.gef.presentation.FigNode
              extended byorg.argouml.uml.diagram.ui.FigNodeModelElement
                  extended byorg.argouml.uml.diagram.static_structure.ui.FigClassifierBox
All Implemented Interfaces:
ArgoEventListener, ArgoNotationEventListener, Cloneable, Connecter, DelayedVChangeListener, EventListener, org.tigris.gef.di.GraphicElement, org.tigris.gef.di.GraphNode, Highlightable, KeyListener, MouseListener, NotationContext, OperationsCompartmentContainer, PathContainer, PopupGenerator, PropertyChangeListener, Serializable, VetoableChangeListener
Direct Known Subclasses:
FigClass, FigDataType, FigInterface, FigStereotypeDeclaration

public abstract class FigClassifierBox
extends FigNodeModelElement
implements OperationsCompartmentContainer

Class to display graphics for a UML Class in a diagram.

Note that the upper line of the name box will be blanked out if there is eventually a stereotype above.

See Also:
Serialized Form

Field Summary
protected  Fig borderFig
           
protected  CompartmentFigText highlightedFigText
          Text highlighted by mouse actions on the diagram.
protected  FigOperationsCompartment operationsFig
          The Fig for the operations compartment (if any).
 
Fields inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement
ABSTRACT, ACTIVE, invisibleAllowed, LEAF, notationProviderName, ROOT, ROWHEIGHT, SHADOW_COLOR_ALPHA, SHADOW_COLOR_VALUE, STEREOHEIGHT
 
Fields inherited from class org.tigris.gef.presentation.FigNode
_blinkPorts, _highlight, ang135, ang225, ang315, ang45
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE, plotter
 
Method Summary
 Object clone()
          After the base clone method has been called determine which child figs of the clone represent the name, stereotype and port.
protected  void createFeatureIn(FigGroup fg, InputEvent ie)
          Create a new feature in the owner fig.
 Rectangle getOperationsBounds()
          Get the bounds of the operations compartment.
protected  FigOperationsCompartment getOperationsFig()
           
 boolean isOperationsVisible()
          Returns the visibility status of the operations compartment.
 void mouseClicked(MouseEvent mouseEvent)
          If the user double clicks on any part of this FigNode, pass it down to one of the internal Figs.
 void mouseExited(MouseEvent me)
           
 void translate(int dx, int dy)
           
protected  CompartmentFigText unhighlight()
          Remove the highlight from the currently highlit FigText.
protected  CompartmentFigText unhighlight(FigFeaturesCompartment fc)
          Search the given compartment for a highlighted CompartmentFigText and unhighlight it.
protected  void updateOperations()
          Updates the operations box.
 
Methods inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement
addElementListener, addElementListener, addElementListener, addEnclosedFig, allowRemoveFromDiagram, buildModifierPopUp, buildVisibilityPopUp, calcBounds, classNameAndBounds, damage, delayedVetoableChange, deleteFromModel, displace, elementOrdering, enableSizeChecking, finalize, forceRepaintShadow, getBigPort, getContextNotation, getDiElement, getEnclosedFigs, getEncloser, getEnclosingFig, getItalicLabelFont, getItemUID, getLabelFont, getName, getNameBounds, getNameFig, getPopUpActions, getPopupAddOffset, getRemoveDelegate, getShadowSize, getStereotypeFig, getTipString, hit, hitClarifier, initNotationProviders, isCheckSize, isDragConnectable, isEditable, isPartlyOwner, isPartlyOwner, isPathVisible, isReadyToEdit, keyPressed, keyReleased, keyTyped, makeSelection, modelChanged, notationAdded, notationChanged, notationProviderAdded, notationProviderRemoved, notationRemoved, paint, paintClarifiers, placeString, postLoad, propertyChange, removeAllElementListeners, removeElementListener, removeEnclosedFig, removeFromDiagram, removeFromDiagramImpl, renderingChanged, setBigPort, setContextNotation, setDiElement, setEditable, setEncloser, setEnclosingFig, setItemUID, setLayer, setName, setNameFig, setOwner, setPathVisible, setReadyToEdit, setShadowSize, setShadowSizeFriend, setSuppressCalcBounds, setVisible, showHelp, textEdited, textEditStarted, updateBounds, updateListeners, updateNameText, updateStereotypeText, vetoableChange
 
Methods inherited from class org.tigris.gef.presentation.FigNode
addFigEdge, bindPort, cleanUp, contains, deepHitPort, dispose, endTrans, getFigEdges, getFigEdges, getHighlight, getPortFig, getPortFigs, getPortSector, hidePorts, hitPort, hitPort, isBlinkPorts, mouseEntered, mousePressed, mouseReleased, paint, removeFigEdge, removePort, setBlinkPorts, setBoundsImpl, setHighlight, showPorts, superTranslate, translateImpl, updateEdges
 
Methods inherited from class org.tigris.gef.presentation.FigGroup
addFig, addFigs, deepSelect, elements, getDisplayedFigs, getExtraFrameSpace, getFigAt, getFigCount, getFigPosn, getFigs, getFont, getFontFamily, getFontSize, getPrivateData, 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, connectionPoint, contains, contains, countCornersContained, createDrag, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getCenter, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getFillColor, getFilled, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLineColor, getLineWidth, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoint, getPoints, getPreferredSize, getResource, getSingle, getSize, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopyable, isCutable, isLowerRightResizable, isMovable, isRemoveStarted, isResizable, isSelectable, isSelected, isVisible, pointAlongPerimeter, postSave, preSave, print, redraw, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setCenter, setContext, setDashed, setDashedString, setGroup, setHandleBox, setHeight, setLocation, setLocation, setLocked, setMovable, setNumPoints, setPoint, setPoint, setPoint, setPoint, setPoints, setResizable, setResource, setSavingAllowed, setSize, setSize, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, within
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.argouml.uml.diagram.ui.OperationsCompartmentContainer
setOperationsVisible
 
Methods inherited from interface java.awt.event.MouseListener
mouseEntered, mousePressed, mouseReleased
 
Methods inherited from interface org.argouml.cognitive.Highlightable
getHighlight, setHighlight
 
Methods inherited from interface org.tigris.gef.di.GraphicElement
getId, getOwner, routingRect
 

Field Detail

operationsFig

protected FigOperationsCompartment operationsFig
The Fig for the operations compartment (if any).


highlightedFigText

protected CompartmentFigText highlightedFigText
Text highlighted by mouse actions on the diagram.


borderFig

protected Fig borderFig
Method Detail

clone

public Object clone()
Description copied from class: FigNodeModelElement
After the base clone method has been called determine which child figs of the clone represent the name, stereotype and port.

The clone function is used by Copy/Paste operations.

Overrides:
clone in class FigNodeModelElement
See Also:
Object.clone()

updateOperations

protected void updateOperations()
Updates the operations box. Called from modelchanged if there is a modelevent effecting the attributes and from renderingChanged in all cases.


getOperationsFig

protected FigOperationsCompartment getOperationsFig()
Returns:
The vector of graphics for operations (if any). First one is the rectangle for the entire operations box.

getOperationsBounds

public Rectangle getOperationsBounds()
Get the bounds of the operations compartment.

Specified by:
getOperationsBounds in interface OperationsCompartmentContainer
Returns:
the bounds of the operations compartment

isOperationsVisible

public boolean isOperationsVisible()
Returns the visibility status of the operations compartment.

Specified by:
isOperationsVisible in interface OperationsCompartmentContainer
Returns:
true if the operations are visible, false otherwise
See Also:
OperationsCompartmentContainer.isOperationsVisible()

translate

public void translate(int dx,
                      int dy)
See Also:
Fig.translate(int, int)

mouseClicked

public void mouseClicked(MouseEvent mouseEvent)
Description copied from class: FigNodeModelElement
If the user double clicks on any part of this FigNode, pass it down to one of the internal Figs. This allows the user to initiate direct text editing.

Specified by:
mouseClicked in interface MouseListener
Overrides:
mouseClicked in class FigNodeModelElement
See Also:
MouseListener.mouseClicked(java.awt.event.MouseEvent)

mouseExited

public void mouseExited(MouseEvent me)
Specified by:
mouseExited in interface MouseListener
See Also:
MouseListener.mouseExited(java.awt.event.MouseEvent)

unhighlight

protected CompartmentFigText unhighlight()
Remove the highlight from the currently highlit FigText.

Returns:
the FigText that had highlight removed

unhighlight

protected final CompartmentFigText unhighlight(FigFeaturesCompartment fc)
Search the given compartment for a highlighted CompartmentFigText and unhighlight it.

Parameters:
fc - compartment to search for highlight item
Returns:
item that was unhighlighted or null if no action was taken

createFeatureIn

protected void createFeatureIn(FigGroup fg,
                               InputEvent ie)
Description copied from class: FigNodeModelElement
Create a new feature in the owner fig. must be overridden to make sense (I didn't want to make it abstract because it might not be required)

Overrides:
createFeatureIn in class FigNodeModelElement
Parameters:
fg - The fig group to which this applies
ie - The input event that triggered us. In the current implementation a mouse double click.
See Also:
FigNodeModelElement.createFeatureIn( org.tigris.gef.presentation.FigGroup, java.awt.event.InputEvent)


ArgoUML © 1996-2006ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook