org.argouml.uml.diagram.ui
Class CompartmentFigText

java.lang.Object
  |
  +--FigText
        |
        +--org.argouml.uml.diagram.ui.CompartmentFigText
Direct Known Subclasses:
FigFeature

public class CompartmentFigText
extends FigText

A FigText class extension for FigClass/FigInterface/FigUseCase compartments.

This implementation now supports the extension point compartment in a use case.

See Also:
Serialized Form

Field Summary
protected  boolean _isHighlighted
          Record whether we are currently highlighted.
protected  java.lang.Object _modelElement
          The model element with which we are associated.
protected  Fig _refFig
          The bounding figure of the compartment containing this fig text.
protected static Logger cat
          Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your class. This will be removed.
 
Constructor Summary
CompartmentFigText(int x, int y, int w, int h, Fig aFig)
          Build a new compartment figText of the given dimensions, within the compartment described by aFig.
 
Method Summary
 java.awt.Color getFillColor()
          Override for correct graphical behaviour.
 boolean getFilled()
          Override for correct graphical behaviour.
 java.awt.Color getLineColor()
          Override for correct graphical behaviour.
 int getLineWidth()
          Override for correct graphical behaviour.
 boolean isHighlighted()
          Return whether this item is highlighted.
 void setHighlighted(boolean flag)
          Mark whether this item is to be highlighted.
 void setLineWidth(int w)
          Override for correct graphical behaviour.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cat

protected static Logger cat
Deprecated. by Linus Tolke as of 0.15.4. Use your own logger in your class. This will be removed.


_refFig

protected Fig _refFig
The bounding figure of the compartment containing this fig text.


_isHighlighted

protected boolean _isHighlighted
Record whether we are currently highlighted.


_modelElement

protected java.lang.Object _modelElement
The model element with which we are associated.

Constructor Detail

CompartmentFigText

public CompartmentFigText(int x,
                          int y,
                          int w,
                          int h,
                          Fig aFig)
Build a new compartment figText of the given dimensions, within the compartment described by aFig.

Invoke the parent constructor, then set the reference to the associated compartment figure. The associated FigText is marked as expand only.

Warning. Won't work properly if aFig is null. A warning is printed.

Parameters:
x - X coordinate of the top left of the FigText.
y - Y coordinate of the top left of the FigText.
w - Width of the FigText.
h - Height of the FigText.
aFig - The figure describing the whole compartment
Method Detail

setLineWidth

public void setLineWidth(int w)
Override for correct graphical behaviour.

Parameters:
w - Desired line width. Overridden and set to zero anyway.

getLineWidth

public int getLineWidth()
Override for correct graphical behaviour.

Returns:
Current line width—always 1.

getFilled

public boolean getFilled()
Override for correct graphical behaviour.

Returns:
Current fill status—always true.

getFillColor

public java.awt.Color getFillColor()
Override for correct graphical behaviour.

Returns:
Current fill colour—always the fill colour of the associated compartment fig.

getLineColor

public java.awt.Color getLineColor()
Override for correct graphical behaviour.

Returns:
Current fill colour—always the fill colour of the associated compartment fig.

setHighlighted

public void setHighlighted(boolean flag)
Mark whether this item is to be highlighted.

If it is highlighted, make the superclass line width 1 rather than 0 and set the associated component fig as the target in the browser.

Parameters:
flag - true if the entry is to be highlighted, false otherwise.

isHighlighted

public boolean isHighlighted()
Return whether this item is highlighted.

Returns:
true if the entry is highlighted, false otherwise.


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