All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.contrib.xcomp.LabelPanel

CH.ifa.draw.standard.AbstractFigure
   |
   +----CH.ifa.draw.standard.CompositeFigure
           |
           +----CH.ifa.draw.contrib.xcomp.ManagedComposite
                   |
                   +----CH.ifa.draw.contrib.xcomp.FigurePanel
                           |
                           +----CH.ifa.draw.contrib.xcomp.LabelPanel

public class LabelPanel
extends FigurePanel
implements Sovereign
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 LabelPanel()
 o LabelPanel(Point, Point)

Method Index

 o accept(Figure)
Default is to accept all figures.
 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 disconnect()
Disconnects the text figure.
 o drawBackground(Graphics)
If highlighted, draws an orange oval inside the display box of this.
 o drawCorners(Graphics)
Does nothing.
 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 getDefaultLayoutManager()
 o getLabels()
Returns a Vector of the label Figures held by this in the layout order.
 o getLabelString()
Returns the string contents of the label figures held by this.
 o getLocator()
 o getObservedFigure()
 o handles()
This has no handles.
 o hasLabels()
Returns true if this has text labels.
 o highlight(Graphics)
Does nothing.
 o isConnected()
 o merge(LabelPanel)
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 LabelPanel
 public LabelPanel()
 o LabelPanel
 public LabelPanel(Point origin,
                   Point corner)

Methods

 o getDefaultLayoutManager
 protected DrawLayoutManager getDefaultLayoutManager()
Overrides:
getDefaultLayoutManager in class CompositeFigure
 o getLocator
 public Locator getLocator()
 o getObservedFigure
 public Figure getObservedFigure()
 o accept
 public boolean accept(Figure figure)
Default is to accept all figures.

Overrides:
accept in class FigurePanel
 o handles
 public Vector handles()
This has no handles.

Overrides:
handles in class FigurePanel
 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 panel is centered around the located point.

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

Overrides:
release in class CompositeFigure
 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 FigurePanel
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 FigurePanel
 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. Ignore subfigures in transit (being dragged), connection figures, subfigures brought to front, and event if itself in transit. Otherwise accommodate the changed subfigure.

Overrides:
figureChanged in class FigurePanel
 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 text labels.

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

 o merge
 public void merge(LabelPanel 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 FigurePanel
 o drawCorners
 public void drawCorners(Graphics g)
Does nothing.

Overrides:
drawCorners in class FigurePanel
 o drawBackground
 public void drawBackground(Graphics g)
If highlighted, draws an orange oval inside the display box of this.

Overrides:
drawBackground in class FigurePanel
 o highlight
 public void highlight(Graphics g)
Does nothing.

Overrides:
highlight in class FigurePanel

All Packages  Class Hierarchy  This Package  Previous  Next  Index