|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectFigNode
org.argouml.uml.diagram.ui.FigNodeModelElement
org.argouml.uml.diagram.deployment.ui.AbstractFigComponent
public abstract class AbstractFigComponent
Common abstract superclass for FigComponent and FigComponentInstance to encapsulate common behavior.
| Field Summary |
|---|
| Fields inherited from class org.argouml.uml.diagram.ui.FigNodeModelElement |
|---|
ABSTRACT, ACTIVE, invisibleAllowed, LEAF, NAME_FIG_HEIGHT, NAME_V_PADDING, ROOT, WIDTH |
| Fields inherited from interface org.argouml.uml.diagram.ui.ArgoFig |
|---|
DEBUG, DEBUG_COLOR, FILL_COLOR, INVISIBLE_LINE_COLOR, LINE_COLOR, LINE_WIDTH, ROWHEIGHT, SOLID_FILL_COLOR, STEREOHEIGHT, TEXT_COLOR, X0, Y0 |
| Constructor Summary | |
|---|---|
AbstractFigComponent(java.lang.Object owner,
java.awt.Rectangle bounds,
DiagramSettings settings)
Construct a new AbstractFigComponent. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clone this figure. |
java.awt.Rectangle |
getHandleBox()
|
java.awt.Dimension |
getMinimumSize()
Returns the minimum size of the Fig. |
boolean |
getUseTrapRect()
|
protected void |
modelChanged(java.beans.PropertyChangeEvent mee)
This is a template method called by the ArgoUML framework as the result of a change to a model element. |
void |
setHandleBox(int x,
int y,
int w,
int h)
|
void |
setLineColor(java.awt.Color c)
|
protected void |
setStandardBounds(int x,
int y,
int w,
int h)
Replaces FigNodeModelElement.setBoundsImpl(int, int, int, int). |
protected void |
updateListeners(java.lang.Object oldOwner,
java.lang.Object newOwner)
Implementations of this method should register/unregister the fig for all (model)events. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, 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.argouml.cognitive.Highlightable |
|---|
getHighlight, setHighlight |
| Constructor Detail |
|---|
public AbstractFigComponent(java.lang.Object owner,
java.awt.Rectangle bounds,
DiagramSettings settings)
owner - owning UML elementbounds - position and sizesettings - render settings| Method Detail |
|---|
public java.lang.Object clone()
FigNodeModelElementTODO: enclosedFigs, encloser and eventSenders may also need to be cloned.
clone in class FigNodeModelElementObject.clone()protected void modelChanged(java.beans.PropertyChangeEvent mee)
FigNodeModelElementOverride this in any subclasses in order to change what model elements the FigNode is listening to as a result of change to the model.
This method is guaranteed by the framework to be running on the same thread as the model subsystem.
TODO: Lets refactor this at some time to take UmlChangeEvent argument
modelChanged in class FigNodeModelElementmee - the UmlChangeEvent that caused the change
protected void updateListeners(java.lang.Object oldOwner,
java.lang.Object newOwner)
FigNodeModelElementAn explanation of the original purpose of this method is given in issue 1321.
This function is used by the modelChanged() function.
In certain cases, it is imperative that indeed ALL listeners are updated, since they are ALL removed by a call to removeElementListener.
IF this method is called with both the oldOwner and the newOwner equal and not null, AND we listen only to the owner itself, THEN we can safely ignore the call, but ELSE we need to update the listeners of the related elements, since the related elements may have been replaced.
updateListeners in class FigNodeModelElementoldOwner - null, or the previous owner
The former means that all listeners have to be set.newOwner - null, or the owner of this.
The former means that all listeners have to be removed.public void setLineColor(java.awt.Color c)
public java.awt.Dimension getMinimumSize()
FigNodeModelElementDo not call this function if the Fig is not resizable! In ArgoUML we decided that it is not needed to implement suitable getMinimumSize() methods for Figs that are not resizable.
getMinimumSize in class FigNodeModelElement
protected void setStandardBounds(int x,
int y,
int w,
int h)
FigNodeModelElementFigNodeModelElement.setBoundsImpl(int, int, int, int).
setStandardBounds in class FigNodeModelElementx - Desired X coordinate of upper left cornery - Desired Y coordinate of upper left cornerw - Desired width of the FigClassh - Desired height of the FigClassorg.tigris.gef.presentation.Fig#setBoundsImpl(int, int, int, int)public boolean getUseTrapRect()
public java.awt.Rectangle getHandleBox()
public void setHandleBox(int x,
int y,
int w,
int h)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| ArgoUML © 1996-2006 | ArgoUML Homepage | ArgoUML Developers' page | ArgoUML Cookbook |