- All Known Implementing Classes:
AbstractDrawingEditor,SimpleDrawingEditor
public interface DrawingEditor
The DrawingEditor can be used to edit multiple
DrawingViews with a
single Tool.
The DrawingEditor invokes activate() and deactivate() methods
on the Tool if it becomes the active tool or loses this status.
- Author:
- Werner Randelshofer
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<DrawingView> The currently active drawing view.javafx.beans.property.ObjectProperty<Tool> The currently active tool.javafx.beans.property.ObjectProperty<HandleType> The handle type used for marking the anchor of a selection.javafx.beans.property.ObjectProperty<Tool> The default tool.javafx.beans.property.ReadOnlySetProperty<DrawingView> The drawing views associated with this editor.Holds the color of the handles.javafx.beans.property.DoublePropertyHolds the size (width and height) of a handle.javafx.beans.property.DoublePropertyHolds the stroke width of a handle.The handle type for single selection.javafx.beans.property.ObjectProperty<String> Holds the curent help text associated with this drawing view.javafx.beans.property.ObjectProperty<HandleType> The handle type used for marking the lead of a selection.The handle type for multiple selection.javafx.beans.property.DoublePropertyHolds the tolerance for finding figures.The undo manager is responsible for providing undo/redo functionality. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the activeDrawingView property.static final StringThe name of the activeTool property.static final StringThe name of the defaultTool property.static final StringThe name of the drawingViews property.static final Stringstatic final Stringstatic final Stringstatic final StringThe name of the handle type property for single selection.static final StringThe name of the helpText property.static final StringThe name of the handle type property for multiple selection.static final Stringstatic final StringThe name of the undoManager property. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ObjectProperty<DrawingView> The currently active drawing view.javafx.beans.property.ObjectProperty<Tool> The currently active tool.default voidaddDrawingView(DrawingView drawingView) Adds a drawing view to this editor.javafx.beans.property.ObjectProperty<HandleType> The handle type used for marking the anchor of a selection.javafx.beans.property.ObjectProperty<Tool> The default tool.javafx.beans.property.ReadOnlySetProperty<DrawingView> The drawing views associated with this editor.default @Nullable DrawingViewGets the active drawing view.default @Nullable ToolGets the active tool.default @Nullable HandleTypeGets the value of theanchorHandleTypeproperty.default @Nullable ToolGets the default tool.default javafx.collections.ObservableSet<DrawingView> Gets the drawing views.default CssColorGets the value of thehandleColorproperty.default doubleGets the value of thehandleSizeproperty.default doubleGets the value of thehandleStrokeWidthproperty.default @Nullable HandleTypeGets the value of thehandleTypeproperty.default StringGets the value of thehelpTextproperty.default @Nullable HandleTypeGets the value of theleadHandleTypeproperty.default @Nullable HandleTypeGets the value of themultiHandleTypeproperty.default doubleTolerance (radius) in view coordinates.default FXUndoManagerGets the value of theundoManagerproperty.Holds the color of the handles.javafx.beans.property.DoublePropertyHolds the size (width and height) of a handle.javafx.beans.property.DoublePropertyHolds the stroke width of a handle.The handle type for single selection.javafx.beans.property.ObjectProperty<String> Holds the curent help text associated with this drawing view.javafx.beans.property.ObjectProperty<HandleType> The handle type used for marking the lead of a selection.The handle type for multiple selection.default voiddefault voidremoveDrawingView(DrawingView drawingView) Removes a drawing view to this editor.default voidsetActiveDrawingView(@Nullable DrawingView drawingView) Sets the active drawing view.default voidsetActiveTool(@Nullable Tool tool) Sets the active tool.default voidsetAnchorHandleType(@Nullable HandleType newValue) Sets the value of theanchorHandleTypeproperty.default voidsetDefaultTool(@Nullable Tool tool) Sets the default tool.default voidsetHandleColor(CssColor newValue) Sets the value of thehandleColorproperty.default voidsetHandleSize(double newValue) Sets the value of thehandleSizeproperty.default voidsetHandleStrokeWidth(double newValue) Sets the value of thehandleStrokeWidthproperty.default voidsetHandleType(@Nullable HandleType newValue) Sets the value of thehandleTypeproperty.default voidsetHelpText(String newValue) Sets the value of thehelpTextproperty.default voidsetLeadHandleType(@Nullable HandleType newValue) Sets the value of theleadHandleTypeproperty.default voidsetMultiHandleType(@Nullable HandleType newValue) Sets the value of themultiHandleTypeproperty.default voidsetTolerance(double newValue) Sets the value of thetoleranceproperty.default voidsetUndoManager(FXUndoManager newValue) Sets the value of theundoManagerproperty.javafx.beans.property.DoublePropertyHolds the tolerance for finding figures.The undo manager is responsible for providing undo/redo functionality.
-
Property Details
-
drawingViews
javafx.beans.property.ReadOnlySetProperty<DrawingView> drawingViewsPropertyThe drawing views associated with this editor.- See Also:
-
activeDrawingView
javafx.beans.property.ObjectProperty<DrawingView> activeDrawingViewPropertyThe currently active drawing view.- See Also:
-
activeTool
javafx.beans.property.ObjectProperty<Tool> activeToolPropertyThe currently active tool.- See Also:
-
defaultTool
javafx.beans.property.ObjectProperty<Tool> defaultToolPropertyThe default tool. When the value is not null, the default tool is made the active tool whenever another tool firesToolEvent.TOOL_DONE.- See Also:
-
helpText
javafx.beans.property.ObjectProperty<String> helpTextPropertyHolds the curent help text associated with this drawing view.- See Also:
-
handleSize
javafx.beans.property.DoubleProperty handleSizePropertyHolds the size (width and height) of a handle.- See Also:
-
tolerance
javafx.beans.property.DoubleProperty tolerancePropertyHolds the tolerance for finding figures.- See Also:
-
handleStrokeWidth
javafx.beans.property.DoubleProperty handleStrokeWidthPropertyHolds the stroke width of a handle.- See Also:
-
handleColor
NonNullObjectProperty<CssColor> handleColorPropertyHolds the color of the handles.- See Also:
-
anchorHandleType
javafx.beans.property.ObjectProperty<HandleType> anchorHandleTypePropertyThe handle type used for marking the anchor of a selection.- See Also:
-
leadHandleType
javafx.beans.property.ObjectProperty<HandleType> leadHandleTypePropertyThe handle type used for marking the lead of a selection.- See Also:
-
handleType
NonNullObjectProperty<HandleType> handleTypePropertyThe handle type for single selection.- See Also:
-
multiHandleType
NonNullObjectProperty<HandleType> multiHandleTypePropertyThe handle type for multiple selection.- See Also:
-
undoManager
NonNullObjectProperty<FXUndoManager> undoManagerPropertyThe undo manager is responsible for providing undo/redo functionality.- See Also:
-
-
Field Details
-
HELP_TEXT_PROPERTY
The name of the helpText property.- See Also:
-
HANDLE_TYPE_PROPERTY
The name of the handle type property for single selection.- See Also:
-
MULTI_HANDLE_TYPE_PROPERTY
The name of the handle type property for multiple selection.- See Also:
-
HANDLE_SIZE_PROPERTY
- See Also:
-
TOLERANCE_PROPERTY
- See Also:
-
HANDLE_STROKE_WDITH_PROPERTY
- See Also:
-
HANDLE_COLOR_PROPERTY
- See Also:
-
DRAWING_VIEWS_PROPERTY
The name of the drawingViews property.- See Also:
-
ACTIVE_DRAWING_VIEW_PROPERTY
The name of the activeDrawingView property.- See Also:
-
ACTIVE_TOOL_PROPERTY
The name of the activeTool property.- See Also:
-
DEFAULT_TOOL_PROPERTY
The name of the defaultTool property.- See Also:
-
UNDO_MANAGER_PROPERTY
The name of the undoManager property.- See Also:
-
-
Method Details
-
drawingViewsProperty
javafx.beans.property.ReadOnlySetProperty<DrawingView> drawingViewsProperty()The drawing views associated with this editor.- Returns:
- the property
- See Also:
-
activeDrawingViewProperty
javafx.beans.property.ObjectProperty<DrawingView> activeDrawingViewProperty()The currently active drawing view.- Returns:
- the property
- See Also:
-
activeToolProperty
javafx.beans.property.ObjectProperty<Tool> activeToolProperty()The currently active tool.- Returns:
- the property
- See Also:
-
defaultToolProperty
javafx.beans.property.ObjectProperty<Tool> defaultToolProperty()The default tool. When the value is not null, the default tool is made the active tool whenever another tool firesToolEvent.TOOL_DONE.- Returns:
- the property
- See Also:
-
addDrawingView
Adds a drawing view to this editor.- Parameters:
drawingView- the drawing view
-
removeDrawingView
Removes a drawing view to this editor.- Parameters:
drawingView- the drawing view
-
getActiveDrawingView
Gets the active drawing view.- Returns:
- the active drawing view or empty
-
getDrawingViews
Gets the drawing views.- Returns:
- the active drawing view or empty
-
setActiveDrawingView
Sets the active drawing view.- Parameters:
drawingView- the drawing view or null if none is active
-
getActiveTool
Gets the active tool.- Returns:
- the active tool or null
-
setActiveTool
Sets the active tool.- Parameters:
tool- the active tool or null if none is active
-
getDefaultTool
Gets the default tool.- Returns:
- the default tool or null
-
setDefaultTool
Sets the default tool.- Parameters:
tool- the default tool or null if no default tool is desired
-
helpTextProperty
javafx.beans.property.ObjectProperty<String> helpTextProperty()Holds the curent help text associated with this drawing view.- Returns:
- the help text property.
- See Also:
-
getHelpText
Gets the value of thehelpTextproperty.- Property description:
- Holds the curent help text associated with this drawing view.
- Returns:
- the value of the
helpTextproperty - See Also:
-
setHelpText
Sets the value of thehelpTextproperty.- Property description:
- Holds the curent help text associated with this drawing view.
- Parameters:
newValue- the value for thehelpTextproperty- See Also:
-
handleSizeProperty
javafx.beans.property.DoubleProperty handleSizeProperty()Holds the size (width and height) of a handle.- Returns:
- size of handle
- See Also:
-
toleranceProperty
javafx.beans.property.DoubleProperty toleranceProperty()Holds the tolerance for finding figures.- Returns:
- the
toleranceproperty - See Also:
-
handleStrokeWidthProperty
javafx.beans.property.DoubleProperty handleStrokeWidthProperty()Holds the stroke width of a handle.- Returns:
- size of handle
- See Also:
-
getHandleSize
default double getHandleSize()Gets the value of thehandleSizeproperty.- Property description:
- Holds the size (width and height) of a handle.
- Returns:
- the value of the
handleSizeproperty - See Also:
-
setHandleSize
default void setHandleSize(double newValue) Sets the value of thehandleSizeproperty.- Property description:
- Holds the size (width and height) of a handle.
- Parameters:
newValue- the value for thehandleSizeproperty- See Also:
-
setTolerance
default void setTolerance(double newValue) Sets the value of thetoleranceproperty.- Property description:
- Holds the tolerance for finding figures.
- Parameters:
newValue- the value for thetoleranceproperty- See Also:
-
handleColorProperty
NonNullObjectProperty<CssColor> handleColorProperty()Holds the color of the handles.- Returns:
- color of handle
- See Also:
-
getHandleColor
Gets the value of thehandleColorproperty.- Property description:
- Holds the color of the handles.
- Returns:
- the value of the
handleColorproperty - See Also:
-
setHandleColor
Sets the value of thehandleColorproperty.- Property description:
- Holds the color of the handles.
- Parameters:
newValue- the value for thehandleColorproperty- See Also:
-
getHandleStrokeWidth
default double getHandleStrokeWidth()Gets the value of thehandleStrokeWidthproperty.- Property description:
- Holds the stroke width of a handle.
- Returns:
- the value of the
handleStrokeWidthproperty - See Also:
-
setHandleStrokeWidth
default void setHandleStrokeWidth(double newValue) Sets the value of thehandleStrokeWidthproperty.- Property description:
- Holds the stroke width of a handle.
- Parameters:
newValue- the value for thehandleStrokeWidthproperty- See Also:
-
recreateHandles
default void recreateHandles() -
setHandleType
Sets the value of thehandleTypeproperty.- Property description:
- The handle type for single selection.
- Parameters:
newValue- the value for thehandleTypeproperty- See Also:
-
getHandleType
Gets the value of thehandleTypeproperty.- Property description:
- The handle type for single selection.
- Returns:
- the value of the
handleTypeproperty - See Also:
-
anchorHandleTypeProperty
javafx.beans.property.ObjectProperty<HandleType> anchorHandleTypeProperty()The handle type used for marking the anchor of a selection.- Returns:
- the handle key
- See Also:
-
leadHandleTypeProperty
javafx.beans.property.ObjectProperty<HandleType> leadHandleTypeProperty()The handle type used for marking the lead of a selection.- Returns:
- the handle key
- See Also:
-
setAnchorHandleType
Sets the value of theanchorHandleTypeproperty.- Property description:
- The handle type used for marking the anchor of a selection.
- Parameters:
newValue- the value for theanchorHandleTypeproperty- See Also:
-
getAnchorHandleType
Gets the value of theanchorHandleTypeproperty.- Property description:
- The handle type used for marking the anchor of a selection.
- Returns:
- the value of the
anchorHandleTypeproperty - See Also:
-
setLeadHandleType
Sets the value of theleadHandleTypeproperty.- Property description:
- The handle type used for marking the lead of a selection.
- Parameters:
newValue- the value for theleadHandleTypeproperty- See Also:
-
getLeadHandleType
Gets the value of theleadHandleTypeproperty.- Property description:
- The handle type used for marking the lead of a selection.
- Returns:
- the value of the
leadHandleTypeproperty - See Also:
-
handleTypeProperty
NonNullObjectProperty<HandleType> handleTypeProperty()The handle type for single selection.- Returns:
- the handle key
- See Also:
-
getTolerance
default double getTolerance()Tolerance (radius) in view coordinates.- Returns:
- the tolerance radius
-
multiHandleTypeProperty
NonNullObjectProperty<HandleType> multiHandleTypeProperty()The handle type for multiple selection.- Returns:
- the handle key
- See Also:
-
setMultiHandleType
Sets the value of themultiHandleTypeproperty.- Property description:
- The handle type for multiple selection.
- Parameters:
newValue- the value for themultiHandleTypeproperty- See Also:
-
getMultiHandleType
Gets the value of themultiHandleTypeproperty.- Property description:
- The handle type for multiple selection.
- Returns:
- the value of the
multiHandleTypeproperty - See Also:
-
undoManagerProperty
NonNullObjectProperty<FXUndoManager> undoManagerProperty()The undo manager is responsible for providing undo/redo functionality.- Returns:
- the undo manager
- See Also:
-
setUndoManager
Sets the value of theundoManagerproperty.- Property description:
- The undo manager is responsible for providing undo/redo functionality.
- Parameters:
newValue- the value for theundoManagerproperty- See Also:
-
getUndoManager
Gets the value of theundoManagerproperty.- Property description:
- The undo manager is responsible for providing undo/redo functionality.
- Returns:
- the value of the
undoManagerproperty - See Also:
-