|
JHotDraw 7.0.9 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.draw.AbstractTool
org.jhotdraw.draw.CreationTool
org.jhotdraw.draw.TextTool
public class TextTool
A tool to create new or edit existing figures that implement the TextHolderFigure interface, such as TextFigure. The figure to be created is specified by a prototype.
To create a figure using the TextTool, the user does the following mouse gestures on a DrawingView:
To edit an existing text figure using the TextTool, the user does the following mouse gesture on a DrawingView:
TextHolderFigure
,
FloatingTextField
Field Summary |
---|
Fields inherited from class org.jhotdraw.draw.CreationTool |
---|
createdFigure |
Fields inherited from class org.jhotdraw.draw.AbstractTool |
---|
anchor, editor, isWorking, listenerList |
Constructor Summary | |
---|---|
TextTool(TextHolderFigure prototype)
Creates a new instance. |
|
TextTool(TextHolderFigure prototype,
java.util.Map attributes)
Creates a new instance. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
|
protected void |
beginEdit(TextHolderFigure textHolder)
|
protected void |
creationFinished(Figure createdFigure)
This method allows subclasses to do perform additonal user interactions after the new figure has been created. |
void |
deactivate(DrawingEditor editor)
Deactivates the tool. |
protected void |
endEdit()
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
If the pressed figure is a TextHolderFigure it can be edited otherwise a new text figure is created. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
Methods inherited from class org.jhotdraw.draw.CreationTool |
---|
activate, createFigure, getAddedFigure, getCreatedFigure, getPrototype |
Methods inherited from class org.jhotdraw.draw.AbstractTool |
---|
addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, createActionMap, createInputMap, draw, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireToolDone, fireToolStarted, getActionMap, getDrawing, getEditor, getInputMap, getView, isActive, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, updateCursor, viewToDrawing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextTool(TextHolderFigure prototype)
public TextTool(TextHolderFigure prototype, java.util.Map attributes)
Method Detail |
---|
public void deactivate(DrawingEditor editor)
Tool
deactivate
in interface Tool
deactivate
in class CreationTool
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class CreationTool
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class CreationTool
protected void beginEdit(TextHolderFigure textHolder)
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class CreationTool
protected void endEdit()
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
protected void creationFinished(Figure createdFigure)
creationFinished
in class CreationTool
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |