|
JHotDraw 7.0.6 | |||||||||
| 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
public class CreationTool
A tool to create new figures. The figure to be created is specified by a prototype.
| Field Summary | |
|---|---|
protected Figure |
createdFigure
The created figure. |
protected CompositeEdit |
creationEdit
|
| Fields inherited from class org.jhotdraw.draw.AbstractTool |
|---|
anchor, editor, isWorking, listenerList |
| Constructor Summary | |
|---|---|
CreationTool(Figure prototype)
|
|
CreationTool(Figure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes)
Creates a new instance. |
|
CreationTool(Figure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name)
Creates a new instance. |
|
CreationTool(java.lang.String prototypeClassName)
Creates a new instance. |
|
CreationTool(java.lang.String prototypeClassName,
java.util.Map<AttributeKey,java.lang.Object> attributes)
|
|
CreationTool(java.lang.String prototypeClassName,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name)
|
|
| Method Summary | |
|---|---|
void |
activate(DrawingEditor editor)
Activates the tool for the given view. |
protected Figure |
createFigure()
|
void |
deactivate(DrawingEditor editor)
Deactivates the tool. |
protected Figure |
getAddedFigure()
|
protected Figure |
getCreatedFigure()
|
Figure |
getPrototype()
|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
| Methods inherited from class org.jhotdraw.draw.AbstractTool |
|---|
addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, draw, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireToolDone, fireToolStarted, getDrawing, getEditor, getView, isActive, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mouseMoved, removeToolListener, removeUndoableEditListener, updateCursor, viewToDrawing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Figure createdFigure
protected CompositeEdit creationEdit
| Constructor Detail |
|---|
public CreationTool(java.lang.String prototypeClassName)
public CreationTool(java.lang.String prototypeClassName,
java.util.Map<AttributeKey,java.lang.Object> attributes)
public CreationTool(java.lang.String prototypeClassName,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name)
public CreationTool(Figure prototype)
public CreationTool(Figure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes)
public CreationTool(Figure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name)
| Method Detail |
|---|
public Figure getPrototype()
public void activate(DrawingEditor editor)
Tool
activate in interface Toolactivate in class AbstractToolpublic void deactivate(DrawingEditor editor)
Tool
deactivate in interface Tooldeactivate in class AbstractToolpublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface java.awt.event.MouseListenermousePressed in class AbstractToolprotected Figure createFigure()
protected Figure getCreatedFigure()
protected Figure getAddedFigure()
public void mouseDragged(java.awt.event.MouseEvent evt)
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractTool
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||