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.


Variable Index

 o fLocator
 o fObservedFigure

Constructor Index

 o Labels()
 o Labels(Point, Point)

Method Index

 o acceptChange(Point, Point)
Return true if the change in the display box is acceptable.
 o canConnect()
Labels can not be explicitly connected.
 o changed()
Updates the location whenever the figure changes itself.
 o connect(Figure)
Connect with figure using the connectedTextLocator() of figure.
 o connect(Figure, Locator)
Connect with figure using locator as the locator that computes the position of this relative to the figure.
 o constrainDisplayBox(Point, Point, Point)
Constrain the display box to the preferred size of the compartment and to the current location.
 o createCompartments(Point, Point)
Creates one FigureHolder compartment.
 o createRootFigure()
Creates a HiddenFrame.
 o createRootFigure(Point, Point)
Creates a HiddenFrame.
 o disconnect()
Disconnects the text figure.
 o figureChanged(FigureChangeEvent)
Handle a subfigure change.
 o figureRemoved(FigureChangeEvent)
 o figureRequestRemove(FigureChangeEvent)
Propagates the removeFromDrawing request up to the container.
 o findSelectable(int, int)
Return true only if the point is inside the displayBox and this is not empty.
 o getLabels()
Returns a Vector of the label Figures held by this.
 o getLabelString()
Returns the string contents of the label figures held by this.
 o getLayout(Point, Point)
Returns a rectangle at origin with the preferred size of the compartment (a LabelList).
 o getLocator()
 o getMinimumLayout()
Returns a rectangle at current location of the display box with the preferred size of the compartment (a LabelList).
 o handles()
This has no handles.
 o hasLabels()
Returns true if this has labels.
 o isConnected()
 o merge(Labels)
Moves the label Figures of other to this by dropping them onto the LabelList compartment ot this.
 o release()
Releases the figure and all its children.
 o updateLocation()
Updates the location relative to the connected figure.

Variables

 o fObservedFigure
 protected Figure fObservedFigure
 o fLocator
 protected Locator fLocator

Constructors

 o Labels
 public Labels()
 o Labels
 public Labels(Point origin,
               Point corner)

Methods

 o createRootFigure
 protected RootFigure createRootFigure()
Creates a HiddenFrame.

Overrides:
createRootFigure in class PanelComposite
 o createRootFigure
 protected RootFigure createRootFigure(Point origin,
                                       Point corner)
Creates a HiddenFrame.

Overrides:
createRootFigure in class PanelComposite
 o createCompartments
 protected void createCompartments(Point origin,
                                   Point corner)
Creates one FigureHolder compartment.

Overrides:
createCompartments in class CompartmentPanel
 o getLocator
 public Locator getLocator()
 o acceptChange
 protected boolean acceptChange(Point origin,
                                Point corner)
Return true if the change in the display box is acceptable.

Overrides:
acceptChange in class PanelComposite
 o 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
 o 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
 o 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
 o handles
 public Vector handles()
This has no handles.

Overrides:
handles in class PanelComposite
 o canConnect
 public boolean canConnect()
Labels can not be explicitly connected.

Overrides:
canConnect in class AbstractFigure
 o updateLocation
 protected void updateLocation()
Updates the location relative to the connected figure. The TextFigure is centered around the located point.

 o release
 public void release()
Releases the figure and all its children.

Overrides:
release in class PanelComposite
 o figureRemoved
 public void figureRemoved(FigureChangeEvent e)
Overrides:
figureRemoved in class CompositeFigure
 o figureRequestRemove
 public void figureRequestRemove(FigureChangeEvent e)
Propagates the removeFromDrawing request up to the container.

Overrides:
figureRequestRemove in class PanelComposite
See Also:
FigureChangeListener
 o disconnect
 public void disconnect()
Disconnects the text figure.

 o changed
 public void changed()
Updates the location whenever the figure changes itself.

Overrides:
changed in class AbstractFigure
 o isConnected
 public boolean isConnected()
 o connect
 public void connect(Figure figure)
Connect with figure using the connectedTextLocator() of figure. Deprecated?

 o figureChanged
 public void figureChanged(FigureChangeEvent e)
Handle a subfigure change.

Overrides:
figureChanged in class PanelComposite
 o 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.

 o getLabelString
 public String getLabelString()
Returns the string contents of the label figures held by this.

 o hasLabels
 public boolean hasLabels()
Returns true if this has labels.

 o getLabels
 public Vector getLabels()
Returns a Vector of the label Figures held by this.

 o merge
 public void merge(Labels other)
Moves the label Figures of other to this by dropping them onto the LabelList compartment ot this.

 o 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