org.jhotdraw.figures
Class ConnectedTextTool
java.lang.Object
org.jhotdraw.standard.AbstractTool
org.jhotdraw.standard.CreationTool
org.jhotdraw.figures.TextTool
org.jhotdraw.figures.ConnectedTextTool
- All Implemented Interfaces:
- Tool
public class ConnectedTextTool
- extends TextTool
Tool to create new or edit existing text figures.
A new text figure is connected with the clicked figure.
- Version:
- <$CURRENT_VERSION$>
- See Also:
TextHolder
Method Summary |
void |
activate()
If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created. |
Figure |
getConnectedFigure()
|
void |
mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created. |
Methods inherited from class org.jhotdraw.standard.AbstractTool |
addToolListener, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isEnabled, isUsable, keyDown, mouseMove, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectedTextTool
public ConnectedTextTool(DrawingEditor editor,
Figure prototype)
mouseDown
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
- If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created.
- Specified by:
mouseDown
in interface Tool
- Overrides:
mouseDown
in class TextTool
getConnectedFigure
public Figure getConnectedFigure()
activate
public void activate()
- If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created.
- Specified by:
activate
in interface Tool
- Overrides:
activate
in class TextTool