Module org.jhotdraw8.draw
Package org.jhotdraw8.draw.tool
Class AbstractCreationTool<F extends Figure>
java.lang.Object
org.jhotdraw8.application.AbstractDisableable
org.jhotdraw8.draw.tool.AbstractTool
org.jhotdraw8.draw.tool.AbstractCreationTool<F>
- Type Parameters:
F- the type of the figures that can be created by this tool
- All Implemented Interfaces:
Tool,PropertyBean,Disableable
- Direct Known Subclasses:
BezierCreationTool,CreationTool,PolyCreationTool,TextCreationTool
AbstractCreationTool.
- Author:
- Werner Randelshofer
-
Property Summary
Properties inherited from class org.jhotdraw8.draw.tool.AbstractTool
drawingEditor, drawingView, focusedProperties inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperties inherited from interface org.jhotdraw8.fxbase.control.Disableable
disabled -
Field Summary
FieldsFields inherited from class org.jhotdraw8.draw.tool.AbstractTool
drawPane, eventPane, node, undoHelperFields inherited from class org.jhotdraw8.application.AbstractDisableable
disabled, disablersFields inherited from interface org.jhotdraw8.fxbase.control.Disableable
DISABLED_PROPERTYFields inherited from interface org.jhotdraw8.draw.tool.Tool
ACCELERATOR_KEY, DRAWING_EDITOR_PROPERTY, DRAWING_VIEW_PROPERTY, LABEL, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON, STYLE_CLASS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Fprotected @Nullable FiguregetOrCreateParent(DrawingView dv, Figure newFigure) Finds a layer for the specified figure.voidsetFigureFactory(Supplier<F> factory) voidsetLayerFactory(Supplier<Layer> factory) Methods inherited from class org.jhotdraw8.draw.tool.AbstractTool
activate, addToolListener, applyResources, deactivate, drawingEditorProperty, drawingViewProperty, editCopy, editCut, editDelete, editDuplicate, editPaste, fire, fireToolDone, fireToolStarted, focusedProperty, forwardUndoableEdit, getNode, getProperties, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onZoom, onZoomFinished, onZoomStarted, removeToolListener, requestFocus, stopEditingMethods inherited from class org.jhotdraw8.application.AbstractDisableable
disabledProperty, disablersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.control.Disableable
addDisabler, disabledProperty, disablers, isDisabled, removeDisablerMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
get, getNonNull, getProperty, put, remove, set, setNonNull, valueAtMethods inherited from interface org.jhotdraw8.draw.tool.Tool
getDrawingEditor, getDrawingView, getHelpText, getLabel, getName, setDrawingEditor, setDrawingView
-
Field Details
-
layerFactory
-
figureFactory
-
createdFigure
The created figure.
-
-
Constructor Details
-
AbstractCreationTool
-
-
Method Details
-
setFigureFactory
-
setLayerFactory
-
createFigure
-
getOrCreateParent
Finds a layer for the specified figure. Creates a new layer if no suitable layer can be found.- Parameters:
dv- the drawing viewnewFigure- the figure- Returns:
- a suitable parent for the figure
-