org.argouml.uml.diagram.ui
Class FigTextGroup

java.lang.Object
  extended byorg.tigris.gef.presentation.Fig
      extended byorg.tigris.gef.presentation.FigGroup
          extended byorg.argouml.uml.diagram.ui.FigTextGroup
All Implemented Interfaces:
Cloneable, EventListener, MouseListener, org.tigris.gef.ui.PopupGenerator, PropertyChangeListener, Serializable

public class FigTextGroup
extends org.tigris.gef.presentation.FigGroup
implements MouseListener

Custom class to group FigTexts in such a way that they don't overlap and that the group is shrinked to fit (no whitespace in group).

See Also:
Serialized Form

Field Summary
private static int ROWHEIGHT
           
private  boolean supressCalcBounds
           
 
Fields inherited from class org.tigris.gef.presentation.FigGroup
_dynObjects, _extraFrameSpace
 
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
FigTextGroup()
           
 
Method Summary
 void addFig(org.tigris.gef.presentation.Fig f)
          Adds a FigText to the list with figs.
 void calcBounds()
           
 void deleteFromModel()
           
 void mouseClicked(MouseEvent me)
          If the user double clicks on anu part of this FigGroup, 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 removeFromDiagram()
           
protected  void updateFigTexts()
          Updates the FigTexts.
 
Methods inherited from class org.tigris.gef.presentation.FigGroup
addFigs, clone, contains, deepSelect, elements, getDisplayedFigs, getExtraFrameSpace, getFigAt, getFigs, getFigs, getFont, getFontFamily, getFontSize, getPrivateData, getSize, getSubFigBounds, getTextColor, getTextFillColor, getTextFilled, hit, hitFig, isReshapable, isRotatable, iterator, paint, parseDynObjects, removeAll, removeFig, setBounds, setExtraFrameSpace, setFigs, setFigs, setFillColor, setFilled, setFont, setFontFamily, setFontSize, setLineColor, setLineWidth, setPrivateData, setTextColor, setTextFillColor, setTextFilled, translate
 
Methods inherited from class org.tigris.gef.presentation.Fig
addAnnotation, addPoint, addPropertyChangeListener, align, center, classNameAndBounds, cleanUp, connectionPoint, contains, contains, countCornersContained, createDrag, damage, delete, dispose, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLineColor, getLineWidth, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoint, getPoints, getPopUpActions, getPreferredSize, getResource, getSingle, getTipString, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopieable, isCopyable, isCutable, isDisplayed, isLowerRightResizable, isMovable, isResizable, isSelected, isVisible, makeSelection, OK, pointAlongPerimeter, postLoad, postSave, preSave, print, propertyChange, redraw, removeAnnotation, removeAnnotation, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setCenter, setContext, setDashed, setDashedString, setDisplayed, setEnclosingFig, setGroup, setHandleBox, setHeight, setLayer, setLocation, setLocation, setLocked, setMovable, setNumPoints, setOwner, setPoint, setPoint, setPoint, setPoint, 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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROWHEIGHT

private static final int ROWHEIGHT
See Also:
Constant Field Values

supressCalcBounds

private boolean supressCalcBounds
Constructor Detail

FigTextGroup

public FigTextGroup()
Method Detail

addFig

public void addFig(org.tigris.gef.presentation.Fig f)
Adds a FigText to the list with figs. Makes sure that the figtexts do not overlap.

See Also:
FigGroup.addFig(Fig)

updateFigTexts

protected void updateFigTexts()
Updates the FigTexts. FigTexts without text (equals "") are not shown. The rest of the figtexts are shown non-overlapping. The first figtext added (via addFig) is shown at the bottom of the FigTextGroup.


calcBounds

public void calcBounds()
See Also:
Fig.calcBounds()

removeFromDiagram

public void removeFromDiagram()
See Also:
Fig.removeFromDiagram()

deleteFromModel

public void deleteFromModel()
See Also:
Fig.deleteFromModel()

mousePressed

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

mouseReleased

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

mouseEntered

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

mouseExited

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

mouseClicked

public void mouseClicked(MouseEvent me)
If the user double clicks on anu part of this FigGroup, pass it down to one of the internal Figs. This allows the user to initiate direct text editing.

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


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook