All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.figures.TextTool
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractTool
|
+----CH.ifa.draw.standard.CreationTool
|
+----CH.ifa.draw.figures.TextTool
- public class TextTool
- extends CreationTool
Tool to create new or edit existing text figures.
The editing behavior is implemented by overlaying the
Figure providing the text with a FloatingTextField.
A tool interaction is done once a Figure that is not
a TextHolder is clicked.
- See Also:
- TextHolder, FloatingTextField
-
TextTool(DrawingView, Figure)
-
-
activate()
- Sets the text cursor.
-
beginEdit(TextHolder)
-
-
deactivate()
- Terminates the editing of a text figure.
-
endEdit()
-
-
mouseDown(MouseEvent, int, int)
- If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created.
-
mouseDrag(MouseEvent, int, int)
- Adjusts the extent of the created figure
-
mouseUp(MouseEvent, int, int)
- Checks if the created figure is empty.
TextTool
public TextTool(DrawingView view,
Figure prototype)
mouseDown
public void mouseDown(MouseEvent e,
int x,
int y)
- If the pressed figure is a TextHolder it can be edited otherwise
a new text figure is created.
- Overrides:
- mouseDown in class CreationTool
mouseDrag
public void mouseDrag(MouseEvent e,
int x,
int y)
- Adjusts the extent of the created figure
- Overrides:
- mouseDrag in class CreationTool
mouseUp
public void mouseUp(MouseEvent e,
int x,
int y)
- Checks if the created figure is empty.
- Overrides:
- mouseUp in class CreationTool
deactivate
public void deactivate()
- Terminates the editing of a text figure.
- Overrides:
- deactivate in class AbstractTool
activate
public void activate()
- Sets the text cursor.
- Overrides:
- activate in class CreationTool
beginEdit
protected void beginEdit(TextHolder figure)
endEdit
protected void endEdit()
All Packages Class Hierarchy This Package Previous Next Index