|
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
public abstract class AbstractTool
AbstractTool.
| Field Summary | |
|---|---|
protected java.awt.Point |
anchor
|
protected DrawingEditor |
editor
|
protected boolean |
isWorking
This is set to true, while the tool is doing some work. |
protected javax.swing.event.EventListenerList |
listenerList
|
| Constructor Summary | |
|---|---|
AbstractTool()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
activate(DrawingEditor editor)
Activates the tool for the given view. |
void |
addToolListener(ToolListener l)
Adds a listener for this tool. |
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener l)
|
protected java.awt.geom.Point2D.Double |
constrainPoint(java.awt.Point p)
|
protected java.awt.geom.Point2D.Double |
constrainPoint(java.awt.geom.Point2D.Double p)
|
void |
deactivate(DrawingEditor editor)
Deactivates the tool. |
void |
draw(java.awt.Graphics2D g)
Draws the tool. |
void |
editCopy()
Copies the selection into the clipboard. |
void |
editCut()
Cuts the selection into the clipboard. |
void |
editDelete()
Deletes the selection. |
void |
editDuplicate()
Duplicates the selection. |
void |
editPaste()
Pastes the contents of the clipboard. |
protected void |
fireAreaInvalidated(java.awt.Rectangle invalidatedArea)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireAreaInvalidated(java.awt.geom.Rectangle2D.Double r)
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireToolDone()
Notify all listenerList that have registered interest for notification on this event type. |
protected void |
fireToolStarted(DrawingView view)
Notify all listenerList that have registered interest for notification on this event type. |
protected Drawing |
getDrawing()
|
protected DrawingEditor |
getEditor()
|
protected DrawingView |
getView()
|
boolean |
isActive()
|
void |
keyPressed(java.awt.event.KeyEvent evt)
|
void |
keyReleased(java.awt.event.KeyEvent evt)
|
void |
keyTyped(java.awt.event.KeyEvent evt)
|
void |
mouseClicked(java.awt.event.MouseEvent evt)
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
void |
mouseMoved(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
void |
removeToolListener(ToolListener l)
Removes a listener for this tool. |
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
|
void |
updateCursor(DrawingView view,
java.awt.Point p)
|
protected java.awt.geom.Point2D.Double |
viewToDrawing(java.awt.Point p)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.MouseMotionListener |
|---|
mouseDragged |
| Field Detail |
|---|
protected boolean isWorking
protected DrawingEditor editor
protected java.awt.Point anchor
protected javax.swing.event.EventListenerList listenerList
| Constructor Detail |
|---|
public AbstractTool()
| Method Detail |
|---|
public void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
public void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
public void activate(DrawingEditor editor)
Tool
activate in interface Toolpublic void deactivate(DrawingEditor editor)
Tool
deactivate in interface Toolpublic boolean isActive()
protected DrawingView getView()
protected DrawingEditor getEditor()
protected Drawing getDrawing()
protected java.awt.geom.Point2D.Double viewToDrawing(java.awt.Point p)
protected java.awt.geom.Point2D.Double constrainPoint(java.awt.Point p)
protected java.awt.geom.Point2D.Double constrainPoint(java.awt.geom.Point2D.Double p)
public void editDelete()
editDelete in interface Toolpublic void editCut()
editCut in interface Toolpublic void editCopy()
editCopy in interface Toolpublic void editDuplicate()
editDuplicate in interface Toolpublic void editPaste()
editPaste in interface Toolpublic void keyReleased(java.awt.event.KeyEvent evt)
keyReleased in interface java.awt.event.KeyListenerpublic void keyTyped(java.awt.event.KeyEvent evt)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent evt)
keyPressed in interface java.awt.event.KeyListenerpublic void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent evt)
mouseExited in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenerpublic void addToolListener(ToolListener l)
Tool
addToolListener in interface Toolpublic void removeToolListener(ToolListener l)
Tool
removeToolListener in interface Toolprotected void fireToolStarted(DrawingView view)
protected void fireToolDone()
protected void fireAreaInvalidated(java.awt.geom.Rectangle2D.Double r)
protected void fireAreaInvalidated(java.awt.Rectangle invalidatedArea)
public void draw(java.awt.Graphics2D g)
Tool
draw in interface Tool
public void updateCursor(DrawingView view,
java.awt.Point p)
|
Copyright 1996-2006 © JHotDraw.org | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||