Class InteractiveDrawingRenderer

java.lang.Object
org.jhotdraw8.fxbase.beans.AbstractPropertyBean
org.jhotdraw8.draw.render.InteractiveDrawingRenderer
All Implemented Interfaces:
PropertyBean

public class InteractiveDrawingRenderer extends AbstractPropertyBean
  • Property Details

  • Field Details

  • Constructor Details

    • InteractiveDrawingRenderer

      public InteractiveDrawingRenderer()
  • Method Details

    • clipBoundsProperty

      public javafx.beans.property.ObjectProperty<javafx.geometry.Bounds> clipBoundsProperty()
      Returns:
      the clipBounds property
      See Also:
    • drawingViewProperty

      public javafx.beans.property.ObjectProperty<DrawingView> drawingViewProperty()
      Returns:
      the drawingView property
      See Also:
    • editorProperty

      public javafx.beans.property.ObjectProperty<DrawingEditor> editorProperty()
      Returns:
      the editor property
    • getDrawingView

      public DrawingView getDrawingView()
      Gets the value of the drawingView property.
      Property description:
      Returns:
      the value of the drawingView property
      See Also:
    • setDrawingView

      public void setDrawingView(DrawingView drawingView)
      Sets the value of the drawingView property.
      Property description:
      Parameters:
      drawingView - the value for the drawingView property
      See Also:
    • findFigureNode

      public @Nullable javafx.scene.Node findFigureNode(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.
      Parameters:
      figure - a figure
      vx - x coordinate of a point in view coordinates
      vy - y coordinate of a point in view coordinates
      Returns:
      the front-most JavaFX Node of the figure that intersects with the point
    • findFigures

      public List<Map.Entry<Figure,Double>> findFigures(double vx, double vy, boolean decompose, 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 coordinates
      vy - y-coordinate of the point in view coordinates
      decompose - 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

      public List<Map.Entry<Figure,Double>> findFiguresInside(double vx, double vy, double vwidth, double vheight, boolean decompose, Predicate<Figure> predicate)
    • findFiguresIntersecting

      public List<Map.Entry<Figure,Double>> findFiguresIntersecting(double vx, double vy, double vwidth, double vheight, boolean decompose, Predicate<Figure> predicate)
    • getClipBounds

      public javafx.geometry.Bounds getClipBounds()
      Gets the value of the clipBounds property.
      Property description:
      Returns:
      the value of the clipBounds property
      See Also:
    • setClipBounds

      public void setClipBounds(javafx.geometry.Bounds clipBounds)
      Sets the value of the clipBounds property.
      Property description:
      Parameters:
      clipBounds - the value for the clipBounds property
      See Also:
    • getDrawing

      public @Nullable Drawing getDrawing()
    • getModel

      public DrawingModel getModel()
      Gets the value of the model property.
      Property description:
      Returns:
      the value of the model property
      See Also:
    • setModel

      public void setModel(DrawingModel model)
      Sets the value of the model property.
      Property description:
      Parameters:
      model - the value for the model property
      See Also:
    • getNode

      public javafx.scene.Node getNode()
    • getNode

      public @Nullable javafx.scene.Node getNode(@Nullable Figure f)
    • renderContextProperty

      public NonNullObjectProperty<WritableRenderContext> renderContextProperty()
      Returns:
      the renderContext property
      See Also:
    • getRenderContext

      public WritableRenderContext getRenderContext()
      Gets the value of the renderContext property.
      Property description:
      Returns:
      the value of the renderContext property
      See Also:
    • setRenderContext

      public void setRenderContext(WritableRenderContext newValue)
      Sets the value of the renderContext property.
      Property description:
      Parameters:
      newValue - the value for the renderContext property
      See Also:
    • getZoomFactor

      public double getZoomFactor()
      Gets the value of the zoomFactor property.
      Property description:
      Returns:
      the value of the zoomFactor property
      See Also:
    • setZoomFactor

      public void setZoomFactor(double newValue)
      Sets the value of the zoomFactor property.
      Property description:
      Parameters:
      newValue - the value for the zoomFactor property
      See Also:
    • modelProperty

      public NonNullObjectProperty<DrawingModel> modelProperty()
      Returns:
      the model property
      See Also:
    • paintImmediately

      public void paintImmediately()
      For testing: paints the drawing immediately.
    • repaint

      public void repaint()
    • zoomFactorProperty

      public javafx.beans.property.DoubleProperty zoomFactorProperty()
      Returns:
      the zoomFactor property
      See Also:
    • getUpdateLimit

      public int getUpdateLimit()
      Gets the value of the updateLimit property.
      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 updateLimit property
      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 the updateLimit property.
      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 the updateLimit property
      See Also: