public class LabelFigure extends TextFigure implements FigureListener
editable, origin, textLayout
changingDepth, listenerList
propertySupport
CONNECTABLE_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, write
contains, draw, drawDecorator, drawFigure, getDecorator, getDrawingArea, readDecorator, setDecorator, updateDecoratorBounds, writeDecorator
applyAttributesTo, get, getAttributeKey, getAttributes, getAttributesRestoreData, getStroke, getStrokeMiterLimitFactor, hasAttribute, isAttributeEnabled, readAttributes, removeAttribute, restoreAttributesTo, set, setAttributeEnabled, setAttributes, writeAttributes
addFigureListener, 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, willChange
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFigureListener, 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, willChange
public LabelFigure()
public LabelFigure(java.lang.String text)
public void setLabelFor(TextHolderFigure target)
public TextHolderFigure getLabelFor()
TextHolderFigure
getLabelFor
in interface TextHolderFigure
getLabelFor
in class TextFigure
public Tool getTool(java.awt.geom.Point2D.Double p)
Returns null, if no specialized tool is available.
getTool
in interface Figure
getTool
in class TextFigure
public void areaInvalidated(FigureEvent e)
FigureListener
areaInvalidated
in interface FigureListener
public void attributeChanged(FigureEvent e)
FigureListener
attributeChanged
in interface FigureListener
public void figureAdded(FigureEvent e)
FigureListener
figureAdded
in interface FigureListener
public void figureChanged(FigureEvent e)
FigureListener
figureChanged
in interface FigureListener
public void figureRemoved(FigureEvent e)
FigureListener
figureRemoved
in interface FigureListener
public void figureRequestRemove(FigureEvent e)
FigureListener
figureRequestRemove
in interface FigureListener
public void remap(java.util.Map<Figure,Figure> oldToNew, boolean disconnectIfNotInMap)
Figure
remap
in interface Figure
remap
in class AbstractFigure
public void figureHandlesChanged(FigureEvent e)
FigureListener
DrawingViews 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