org.jhotdraw.draw.tool
Class BezierTool
- java.lang.Object
-
- org.jhotdraw.beans.AbstractBean
-
- org.jhotdraw.draw.tool.AbstractTool
-
- org.jhotdraw.draw.tool.BezierTool
-
- All Implemented Interfaces:
- java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Tool
public class BezierTool extends AbstractTool
AToolwhich allows to create a newBezierFigureby drawing its path.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BezierTool(BezierFigure prototype)Creates a new instance.BezierTool(BezierFigure prototype, java.util.Map<AttributeKey,java.lang.Object> attributes)Creates a new instance.BezierTool(BezierFigure prototype, java.util.Map<AttributeKey,java.lang.Object> attributes, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidactivate(DrawingEditor editor)Activates the tool for the given editor.voiddeactivate(DrawingEditor editor)Deactivates the tool.voiddraw(java.awt.Graphics2D g)Draws the tool.java.lang.StringgetPresentationName()booleanisToolDoneAfterCreation()voidmouseClicked(java.awt.event.MouseEvent evt)voidmouseDragged(java.awt.event.MouseEvent evt)voidmouseMoved(java.awt.event.MouseEvent evt)voidmousePressed(java.awt.event.MouseEvent evt)voidmouseReleased(java.awt.event.MouseEvent evt)voidsetToolDoneAfterCreation(boolean b)-
Methods inherited from class org.jhotdraw.draw.tool.AbstractTool
addToolListener, addUndoableEditListener, editCopy, editCut, editDelete, editDuplicate, editPaste, getActionMap, getInputMap, getToolTipText, isActive, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, supportsHandleInteraction, updateCursor
-
Methods inherited from class org.jhotdraw.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, clone, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
BezierTool
public BezierTool(BezierFigure prototype)
Creates a new instance.
-
BezierTool
public BezierTool(BezierFigure prototype, @Nullable java.util.Map<AttributeKey,java.lang.Object> attributes)
Creates a new instance.
-
BezierTool
public BezierTool(BezierFigure prototype, @Nullable java.util.Map<AttributeKey,java.lang.Object> attributes, @Nullable java.lang.String name)
-
-
Method Detail
-
getPresentationName
public java.lang.String getPresentationName()
-
activate
public void activate(DrawingEditor editor)
Description copied from interface:ToolActivates the tool for the given editor. This method is called whenever the user switches to this tool.- Specified by:
activatein interfaceTool- Overrides:
activatein classAbstractTool
-
deactivate
public void deactivate(DrawingEditor editor)
Description copied from interface:ToolDeactivates the tool. This method is called whenever the user switches to another tool.- Specified by:
deactivatein interfaceTool- Overrides:
deactivatein classAbstractTool
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent evt)
- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classAbstractTool
-
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent evt)
- Specified by:
mouseClickedin interfacejava.awt.event.MouseListener- Overrides:
mouseClickedin classAbstractTool
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent evt)
- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin classAbstractTool
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent evt)
-
draw
public void draw(java.awt.Graphics2D g)
Description copied from interface:ToolDraws the tool.- Specified by:
drawin interfaceTool- Overrides:
drawin classAbstractTool
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent evt)
- Specified by:
mouseMovedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseMovedin classAbstractTool
-
setToolDoneAfterCreation
public void setToolDoneAfterCreation(boolean b)
-
isToolDoneAfterCreation
public boolean isToolDoneAfterCreation()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG