|
JHotDraw 7.5.1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.tool.AbstractTool
org.jhotdraw.draw.tool.BezierTool
public class BezierTool
A Tool which allows to create a new BezierFigure by
drawing its path.
| Field Summary | |
|---|---|
protected java.util.Map<AttributeKey,java.lang.Object> |
attributes
|
protected BezierFigure |
createdFigure
The created figure. |
| Fields inherited from class org.jhotdraw.draw.tool.AbstractTool |
|---|
anchor, editor, isWorking, listenerList |
| Fields inherited from class org.jhotdraw.beans.AbstractBean |
|---|
propertySupport |
| Constructor Summary | |
|---|---|
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 | |
|---|---|
void |
activate(DrawingEditor editor)
Activates the tool for the given editor. |
protected void |
addPointToFigure(java.awt.geom.Point2D.Double newPoint)
|
protected BezierPath |
calculateFittedCurve(BezierPath path)
|
protected BezierFigure |
createFigure()
|
void |
deactivate(DrawingEditor editor)
Deactivates the tool. |
void |
draw(java.awt.Graphics2D g)
Draws the tool. |
protected void |
finishCreation(BezierFigure createdFigure,
DrawingView creationView)
|
protected void |
fireUndoEvent(Figure createdFigure,
DrawingView creationView)
|
protected Figure |
getAddedFigure()
|
protected Figure |
getCreatedFigure()
|
java.lang.String |
getPresentationName()
|
boolean |
isToolDoneAfterCreation()
|
void |
mouseClicked(java.awt.event.MouseEvent evt)
|
void |
mouseDragged(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 |
setToolDoneAfterCreation(boolean b)
|
| Methods inherited from class org.jhotdraw.beans.AbstractBean |
|---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<AttributeKey,java.lang.Object> attributes
protected BezierFigure createdFigure
| Constructor Detail |
|---|
public BezierTool(BezierFigure prototype)
public BezierTool(BezierFigure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes)
public BezierTool(BezierFigure prototype,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name)
| Method Detail |
|---|
public java.lang.String getPresentationName()
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 BezierFigure createFigure()
protected Figure getCreatedFigure()
protected Figure getAddedFigure()
protected void addPointToFigure(java.awt.geom.Point2D.Double newPoint)
public void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractTool
protected void fireUndoEvent(Figure createdFigure,
DrawingView creationView)
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class AbstractTool
protected void finishCreation(BezierFigure createdFigure,
DrawingView creationView)
public void mouseDragged(java.awt.event.MouseEvent evt)
public void draw(java.awt.Graphics2D g)
Tool
draw in interface Tooldraw in class AbstractToolpublic void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractToolprotected BezierPath calculateFittedCurve(BezierPath path)
public void setToolDoneAfterCreation(boolean b)
public boolean isToolDoneAfterCreation()
|
Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project. Some rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||