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.
-
fLocator
-
-
fObservedFigure
-
-
LabelPanel()
-
-
LabelPanel(Point, Point)
-
-
accept(Figure)
- Default is to accept all figures.
-
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.
-
disconnect()
- Disconnects the text figure.
-
drawBackground(Graphics)
- If highlighted, draws an orange oval inside the display box of this.
-
drawCorners(Graphics)
- Does nothing.
-
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.
-
getDefaultLayoutManager()
-
-
getLabels()
- Returns a Vector of the label Figures held by this in the layout order.
-
getLabelString()
- Returns the string contents of the label figures held by this.
-
getLocator()
-
-
getObservedFigure()
-
-
handles()
- This has no handles.
-
hasLabels()
- Returns true if this has text labels.
-
highlight(Graphics)
- Does nothing.
-
isConnected()
-
-
merge(LabelPanel)
- 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
LabelPanel
public LabelPanel()
LabelPanel
public LabelPanel(Point origin,
Point corner)
getDefaultLayoutManager
protected DrawLayoutManager getDefaultLayoutManager()
- Overrides:
- getDefaultLayoutManager in class CompositeFigure
getLocator
public Locator getLocator()
getObservedFigure
public Figure getObservedFigure()
accept
public boolean accept(Figure figure)
- Default is to accept all figures.
- Overrides:
- accept in class FigurePanel
handles
public Vector handles()
- This has no handles.
- Overrides:
- handles in class FigurePanel
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 panel is centered around the located point.
release
public void release()
- Releases the figure and all its children.
- Overrides:
- release in class CompositeFigure
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 FigurePanel
- 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 FigurePanel
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. 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
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 text labels.
getLabels
public Vector getLabels()
- Returns a Vector of the label Figures held by this in the layout order.
merge
public void merge(LabelPanel 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 FigurePanel
drawCorners
public void drawCorners(Graphics g)
- Does nothing.
- Overrides:
- drawCorners in class FigurePanel
drawBackground
public void drawBackground(Graphics g)
- If highlighted, draws an orange oval inside the display box of this.
- Overrides:
- drawBackground in class FigurePanel
highlight
public void highlight(Graphics g)
- Does nothing.
- Overrides:
- highlight in class FigurePanel
All Packages Class Hierarchy This Package Previous Next Index