public class LabelFigure extends TextFigure implements FigureListener
editable, origin, textLayoutchangingDepth, listenerListpropertySupportCONNECTABLE_PROPERTY, REMOVABLE_PROPERTY, SELECTABLE_PROPERTY, TRANSFORMABLE_PROPERTY| Constructor and Description |
|---|
LabelFigure()
Creates a new instance.
|
LabelFigure(java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
void |
areaInvalidated(FigureEvent e)
Sent when the drawing area used by the figure needs to be repainted.
|
void |
attributeChanged(FigureEvent e)
Sent when an attribute of the figure has changed.
|
void |
figureAdded(FigureEvent e)
Sent when a figure was added to a drawing.
|
void |
figureChanged(FigureEvent e)
Sent when the geometry (for example the bounds) of the figure has changed.
|
void |
figureHandlesChanged(FigureEvent e)
Sent when handles of a Figure have been added, removed or replaced.
|
void |
figureRemoved(FigureEvent e)
Sent when a figure was removed from a drawing.
|
void |
figureRequestRemove(FigureEvent e)
Sent when the figure requests to be removed from a drawing.
|
TextHolderFigure |
getLabelFor()
Sometimes we want to use a TextHolderFigure as a label for another
TextHolderFigure.
|
Tool |
getTool(java.awt.geom.Point2D.Double p)
Returns a specialized tool for the given coordinate.
|
void |
remap(java.util.Map<Figure,Figure> oldToNew,
boolean disconnectIfNotInMap)
After cloning a collection of figures, the ConnectionFigures contained
in this collection still connect to the original figures instead of
to the clones.
|
void |
setLabelFor(TextHolderFigure target) |
clone, createHandles, drawFill, drawStroke, drawText, figureContains, getBaseline, getBounds, getFigureDrawingArea, getFillColor, getFont, getFontSize, getInsets, getPreferredSize, getTabSize, getText, getTextColor, getTextColumns, getTextLayout, getTransformRestoreData, invalidate, isEditable, isTextOverflow, read, restoreTransformTo, setBounds, setEditable, setFontSize, setText, transform, validate, writecontains, draw, drawDecorator, drawFigure, getDecorator, getDrawingArea, readDecorator, setDecorator, updateDecoratorBounds, writeDecoratorapplyAttributesTo, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, set, setAttributeEnabled, setAttributes, writeAttributesaddFigureListener, addNotify, changed, findCompatibleConnector, findConnector, findFigureInside, fireAreaInvalidated, fireAreaInvalidated, fireAreaInvalidated, fireAttributeChanged, fireFigureAdded, fireFigureChanged, fireFigureChanged, fireFigureChanged, fireFigureHandlesChanged, fireFigureRemoved, fireFigureRequestRemove, fireUndoableEditHappened, getActions, getChangingDepth, getConnectors, getCursor, getDecomposition, getDrawing, getEndPoint, getFontRenderContext, getLayer, getLock, getStartPoint, getToolTipText, handleDrop, handleMouseClick, includes, isChanging, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, removeFigureListener, removeNotify, requestRemove, setBounds, setConnectable, setRemovable, setSelectable, setTransformable, setVisible, toString, willChangeaddPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListenerequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddFigureListener, addNotify, addPropertyChangeListener, changed, contains, draw, findCompatibleConnector, findConnector, findFigureInside, get, getActions, getAttributes, getAttributesRestoreData, getConnectors, getCursor, getDecomposition, getDrawingArea, getEndPoint, getLayer, getStartPoint, getToolTipText, handleDrop, handleMouseClick, includes, isConnectable, isRemovable, isSelectable, isTransformable, isVisible, removeFigureListener, removeNotify, removePropertyChangeListener, requestRemove, restoreAttributesTo, set, willChangepublic LabelFigure()
public LabelFigure(java.lang.String text)
public void setLabelFor(TextHolderFigure target)
public TextHolderFigure getLabelFor()
TextHolderFiguregetLabelFor in interface TextHolderFiguregetLabelFor in class TextFigurepublic Tool getTool(java.awt.geom.Point2D.Double p)
Returns null, if no specialized tool is available.
getTool in interface FiguregetTool in class TextFigurepublic void areaInvalidated(FigureEvent e)
FigureListenerareaInvalidated in interface FigureListenerpublic void attributeChanged(FigureEvent e)
FigureListenerattributeChanged in interface FigureListenerpublic void figureAdded(FigureEvent e)
FigureListenerfigureAdded in interface FigureListenerpublic void figureChanged(FigureEvent e)
FigureListenerfigureChanged in interface FigureListenerpublic void figureRemoved(FigureEvent e)
FigureListenerfigureRemoved in interface FigureListenerpublic void figureRequestRemove(FigureEvent e)
FigureListenerfigureRequestRemove in interface FigureListenerpublic void remap(java.util.Map<Figure,Figure> oldToNew, boolean disconnectIfNotInMap)
Figureremap in interface Figureremap in class AbstractFigurepublic void figureHandlesChanged(FigureEvent e)
FigureListenerDrawingViews listen to this event to repopulate the Handles.
A Figure should not fire this event, if just the state or the location of Handle has changed.
figureHandlesChanged in interface FigureListener