All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.work.Labels
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractFigure
|
+----CH.ifa.draw.standard.CompositeFigure
|
+----CH.ifa.draw.standard.PanelComposite
|
+----CH.ifa.draw.standard.CompartmentPanel
|
+----CH.ifa.draw.work.Labels
- public class Labels
- extends CompartmentPanel
A test implementation of a holder for connection labels. A Labels is a
CompartmentPanel with an invisible frame. It has a single LabelList-holder
as the compartment. A Labels keeps its display box at exactly the preferred
size of its compartment.
-
fLocator
-
-
fObservedFigure
-
-
Labels()
-
-
Labels(Point, Point)
-
-
acceptChange(Point, Point)
- Return true if the change in the display box is acceptable.
-
canConnect()
- Labels can not be explicitly connected.
-
changed()
- Updates the location whenever the figure changes itself.
-
connect(Figure)
- Connect with figure using the connectedTextLocator() of figure.
-
connect(Figure, Locator)
- Connect with figure using locator as the locator that computes
the position of this relative to the figure.
-
constrainDisplayBox(Point, Point, Point)
- Constrain the display box to the preferred size of the compartment and
to the current location.
-
createCompartments(Point, Point)
- Creates one FigureHolder compartment.
-
createRootFigure()
- Creates a HiddenFrame.
-
createRootFigure(Point, Point)
- Creates a HiddenFrame.
-
disconnect()
- Disconnects the text figure.
-
figureChanged(FigureChangeEvent)
- Handle a subfigure change.
-
figureRemoved(FigureChangeEvent)
-
-
figureRequestRemove(FigureChangeEvent)
- Propagates the removeFromDrawing request up to the container.
-
findSelectable(int, int)
- Return true only if the point is inside the displayBox and this
is not empty.
-
getLabels()
- Returns a Vector of the label Figures held by this.
-
getLabelString()
- Returns the string contents of the label figures held by this.
-
getLayout(Point, Point)
- Returns a rectangle at origin with
the preferred size of the compartment (a LabelList).
-
getLocator()
-
-
getMinimumLayout()
- Returns a rectangle at current location of the display box with
the preferred size of the compartment (a LabelList).
-
handles()
- This has no handles.
-
hasLabels()
- Returns true if this has labels.
-
isConnected()
-
-
merge(Labels)
- Moves the label Figures of other to this by dropping them onto the
LabelList compartment ot this.
-
release()
- Releases the figure and all its children.
-
updateLocation()
- Updates the location relative to the connected figure.
fObservedFigure
protected Figure fObservedFigure
fLocator
protected Locator fLocator
Labels
public Labels()
Labels
public Labels(Point origin,
Point corner)
createRootFigure
protected RootFigure createRootFigure()
- Creates a HiddenFrame.
- Overrides:
- createRootFigure in class PanelComposite
createRootFigure
protected RootFigure createRootFigure(Point origin,
Point corner)
- Creates a HiddenFrame.
- Overrides:
- createRootFigure in class PanelComposite
createCompartments
protected void createCompartments(Point origin,
Point corner)
- Creates one FigureHolder compartment.
- Overrides:
- createCompartments in class CompartmentPanel
getLocator
public Locator getLocator()
acceptChange
protected boolean acceptChange(Point origin,
Point corner)
- Return true if the change in the display box is acceptable.
- Overrides:
- acceptChange in class PanelComposite
getMinimumLayout
protected Vector getMinimumLayout()
- Returns a rectangle at current location of the display box with
the preferred size of the compartment (a LabelList).
- Overrides:
- getMinimumLayout in class CompartmentPanel
getLayout
protected Vector getLayout(Point origin,
Point corner)
- Returns a rectangle at origin with
the preferred size of the compartment (a LabelList).
- Overrides:
- getLayout in class CompartmentPanel
constrainDisplayBox
protected Pair constrainDisplayBox(Point minimum,
Point origin,
Point corner)
- Constrain the display box to the preferred size of the compartment and
to the current location.
- Overrides:
- constrainDisplayBox in class PanelComposite
handles
public Vector handles()
- This has no handles.
- Overrides:
- handles in class PanelComposite
canConnect
public boolean canConnect()
- Labels can not be explicitly connected.
- Overrides:
- canConnect in class AbstractFigure
updateLocation
protected void updateLocation()
- Updates the location relative to the connected figure.
The TextFigure is centered around the located point.
release
public void release()
- Releases the figure and all its children.
- Overrides:
- release in class PanelComposite
figureRemoved
public void figureRemoved(FigureChangeEvent e)
- Overrides:
- figureRemoved in class CompositeFigure
figureRequestRemove
public void figureRequestRemove(FigureChangeEvent e)
- Propagates the removeFromDrawing request up to the container.
- Overrides:
- figureRequestRemove in class PanelComposite
- See Also:
- FigureChangeListener
disconnect
public void disconnect()
- Disconnects the text figure.
changed
public void changed()
- Updates the location whenever the figure changes itself.
- Overrides:
- changed in class AbstractFigure
isConnected
public boolean isConnected()
connect
public void connect(Figure figure)
- Connect with figure using the connectedTextLocator() of figure.
Deprecated?
figureChanged
public void figureChanged(FigureChangeEvent e)
- Handle a subfigure change.
- Overrides:
- figureChanged in class PanelComposite
connect
public void connect(Figure figure,
Locator locator)
- Connect with figure using locator as the locator that computes
the position of this relative to the figure.
getLabelString
public String getLabelString()
- Returns the string contents of the label figures held by this.
hasLabels
public boolean hasLabels()
- Returns true if this has labels.
getLabels
public Vector getLabels()
- Returns a Vector of the label Figures held by this.
merge
public void merge(Labels other)
- Moves the label Figures of other to this by dropping them onto the
LabelList compartment ot this.
findSelectable
public Figure findSelectable(int x,
int y)
- Return true only if the point is inside the displayBox and this
is not empty. This is to ensure that empty label holders can not
be selected by tools.
- Overrides:
- findSelectable in class PanelComposite
All Packages Class Hierarchy This Package Previous Next Index