- All Implemented Interfaces:
PropertyBean
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.geometry.Bounds> @NonNull javafx.beans.property.ObjectProperty<DrawingView> @NonNull javafx.beans.property.ObjectProperty<DrawingEditor> javafx.beans.property.IntegerPropertyThe maximal number of figures which are updated in one repaint.@NonNull javafx.beans.property.DoubleProperty -
Field Summary
FieldsFields inherited from class org.jhotdraw8.fxbase.beans.AbstractPropertyBean
properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ObjectProperty<javafx.geometry.Bounds> @NonNull javafx.beans.property.ObjectProperty<DrawingView> @NonNull javafx.beans.property.ObjectProperty<DrawingEditor> @Nullable javafx.scene.NodefindFigureNode(@NonNull Figure figure, double vx, double vy) Given a figure and a point in view coordinates, finds the front-most JavaFX Node of the figure that intersects with the point.findFigures(double vx, double vy, boolean decompose, @NonNull Predicate<Figure> predicate) Finds figures that intersect with the specified point in view coordinates, or that have a distance that is less than the tolerance of the editor.findFiguresInside(double vx, double vy, double vwidth, double vheight, boolean decompose, Predicate<Figure> predicate) findFiguresIntersecting(double vx, double vy, double vwidth, double vheight, boolean decompose, Predicate<Figure> predicate) javafx.geometry.BoundsGets the value of theclipBoundsproperty.Gets the value of thedrawingViewproperty.getModel()Gets the value of themodelproperty.javafx.scene.NodegetNode()@Nullable javafx.scene.NodeGets the value of therenderContextproperty.intGets the value of theupdateLimitproperty.doubleGets the value of thezoomFactorproperty.voidFor testing: paints the drawing immediately.voidrepaint()voidsetClipBounds(javafx.geometry.Bounds clipBounds) Sets the value of theclipBoundsproperty.voidsetDrawingView(DrawingView drawingView) Sets the value of thedrawingViewproperty.voidsetModel(DrawingModel model) Sets the value of themodelproperty.voidsetRenderContext(@NonNull WritableRenderContext newValue) Sets the value of therenderContextproperty.voidsetUpdateLimit(int updateLimit) Sets the value of theupdateLimitproperty.voidsetZoomFactor(double newValue) Sets the value of thezoomFactorproperty.javafx.beans.property.IntegerPropertyThe maximal number of figures which are updated in one repaint.@NonNull javafx.beans.property.DoublePropertyMethods inherited from class org.jhotdraw8.fxbase.beans.AbstractPropertyBean
get, getNonNull, getPropertiesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.fxbase.beans.PropertyBean
getProperty, put, remove, set, setNonNull, valueAt
-
Property Details
-
clipBounds
public javafx.beans.property.ObjectProperty<javafx.geometry.Bounds> clipBoundsProperty- See Also:
-
drawingView
- See Also:
-
editor
- See Also:
-
renderContext
- See Also:
-
model
- See Also:
-
zoomFactor
- See Also:
-
updateLimit
public javafx.beans.property.IntegerProperty updateLimitPropertyThe maximal number of figures which are updated in one repaint.The value should be sufficiently large, because a repaint is only done once per frame. If the value is low, it will take many frames until the drawing is completed.
If the value is set too high, then the editor may be become unresponsive if lots of figures change. (For example, when new stylesheets are applied to all figures).
If this is set to a value smaller or equal to zero, then no figures are updated.
- See Also:
-
-
Field Details
-
RENDER_CONTEXT_PROPERTY
- See Also:
-
MODEL_PROPERTY
- See Also:
-
DRAWING_VIEW_PROPERTY
- See Also:
-
-
Constructor Details
-
InteractiveDrawingRenderer
public InteractiveDrawingRenderer()
-
-
Method Details
-
clipBoundsProperty
public javafx.beans.property.ObjectProperty<javafx.geometry.Bounds> clipBoundsProperty()- Returns:
- the
clipBoundsproperty - See Also:
-
drawingViewProperty
- Returns:
- the
drawingViewproperty - See Also:
-
editorProperty
- Returns:
- the
editorproperty
-
getDrawingView
Gets the value of thedrawingViewproperty.- Property description:
- Returns:
- the value of the
drawingViewproperty - See Also:
-
setDrawingView
Sets the value of thedrawingViewproperty.- Property description:
- Parameters:
drawingView- the value for thedrawingViewproperty- See Also:
-
findFigureNode
Given a figure and a point in view coordinates, finds the front-most JavaFX Node of the figure that intersects with the point.- Parameters:
figure- a figurevx- x coordinate of a point in view coordinatesvy- y coordinate of a point in view coordinates- Returns:
- the front-most JavaFX Node of the figure that intersects with the point
-
findFigures
public @NonNull List<Map.Entry<Figure,Double>> findFigures(double vx, double vy, boolean decompose, @NonNull Predicate<Figure> predicate) Finds figures that intersect with the specified point in view coordinates, or that have a distance that is less than the tolerance of the editor.- Parameters:
vx- x-coordinate of the point in view coordinatesvy- y-coordinate of the point in view coordinatesdecompose- If true, a figure is decomposed in sub-figures and the sub-figure is returned instead of the figure.predicate- a predicate for selecting figures- Returns:
- a mutable list of figures with their distance to the point
-
findFiguresInside
-
findFiguresIntersecting
-
getClipBounds
public javafx.geometry.Bounds getClipBounds()Gets the value of theclipBoundsproperty.- Property description:
- Returns:
- the value of the
clipBoundsproperty - See Also:
-
setClipBounds
public void setClipBounds(javafx.geometry.Bounds clipBounds) Sets the value of theclipBoundsproperty.- Property description:
- Parameters:
clipBounds- the value for theclipBoundsproperty- See Also:
-
getDrawing
-
getModel
Gets the value of themodelproperty.- Property description:
- Returns:
- the value of the
modelproperty - See Also:
-
setModel
Sets the value of themodelproperty.- Property description:
- Parameters:
model- the value for themodelproperty- See Also:
-
getNode
public javafx.scene.Node getNode() -
getNode
-
renderContextProperty
- Returns:
- the
renderContextproperty - See Also:
-
getRenderContext
Gets the value of therenderContextproperty.- Property description:
- Returns:
- the value of the
renderContextproperty - See Also:
-
setRenderContext
Sets the value of therenderContextproperty.- Property description:
- Parameters:
newValue- the value for therenderContextproperty- See Also:
-
getZoomFactor
public double getZoomFactor()Gets the value of thezoomFactorproperty.- Property description:
- Returns:
- the value of the
zoomFactorproperty - See Also:
-
setZoomFactor
public void setZoomFactor(double newValue) Sets the value of thezoomFactorproperty.- Property description:
- Parameters:
newValue- the value for thezoomFactorproperty- See Also:
-
modelProperty
- Returns:
- the
modelproperty - See Also:
-
paintImmediately
public void paintImmediately()For testing: paints the drawing immediately. -
repaint
public void repaint() -
zoomFactorProperty
- Returns:
- the
zoomFactorproperty - See Also:
-
getUpdateLimit
public int getUpdateLimit()Gets the value of theupdateLimitproperty.- Property description:
- The maximal number of figures which are updated in one repaint.
The value should be sufficiently large, because a repaint is only done once per frame. If the value is low, it will take many frames until the drawing is completed.
If the value is set too high, then the editor may be become unresponsive if lots of figures change. (For example, when new stylesheets are applied to all figures).
If this is set to a value smaller or equal to zero, then no figures are updated.
- Returns:
- the value of the
updateLimitproperty - See Also:
-
updateLimitProperty
public javafx.beans.property.IntegerProperty updateLimitProperty()The maximal number of figures which are updated in one repaint.The value should be sufficiently large, because a repaint is only done once per frame. If the value is low, it will take many frames until the drawing is completed.
If the value is set too high, then the editor may be become unresponsive if lots of figures change. (For example, when new stylesheets are applied to all figures).
If this is set to a value smaller or equal to zero, then no figures are updated.
- Returns:
- the update limit
- See Also:
-
setUpdateLimit
public void setUpdateLimit(int updateLimit) Sets the value of theupdateLimitproperty.- Property description:
- The maximal number of figures which are updated in one repaint.
The value should be sufficiently large, because a repaint is only done once per frame. If the value is low, it will take many frames until the drawing is completed.
If the value is set too high, then the editor may be become unresponsive if lots of figures change. (For example, when new stylesheets are applied to all figures).
If this is set to a value smaller or equal to zero, then no figures are updated.
- Parameters:
updateLimit- the value for theupdateLimitproperty- See Also:
-