Klasse RendererBase

java.lang.Object
com.flexganttfx.view.graphics.renderer.RendererBase
Bekannte direkte Unterklassen:
LinkRenderer, Renderer, SystemLayer

public abstract class RendererBase extends Object
The base class of all renderers used by FlexGanttFX.
  • Eigenschaftsübersicht

    Eigenschaften
    Typ
    Eigenschaft
    Beschreibung
    The alpha property.
    The enabled property.
    The snapToPixel property.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    RendererBase(GraphicsBase<?> graphics, String name)
    Constructs a new renderer.
  • Methodenübersicht

    Modifikator und Typ
    Methode
    Beschreibung
    The alpha property.
    protected final void
    Disables automatic redrawing of the graphics area when one of the observed properties changes.
    The enabled property.
    protected final void
    Enabled automatic redrawing of the graphics area when one of the observed properties changes.
    final double
    Ruft den Wert der alpha-Eigenschaft ab.
    final GraphicsBase<?>
    Returns the graphics control that owns this renderer.
    protected final double
    getLocation(Instant time, Canvas canvas)
    Calculates the x coordinate for the given time.
    final String
    Returns the renderer name.
    protected final Instant
    getTimeAt(double location)
    Calculates the time at the given x coordinate.
    final boolean
    Ruft den Wert der enabled-Eigenschaft ab.
    final boolean
    Ruft den Wert der snapToPixel-Eigenschaft ab.
    protected void
    Registers the given observable as something that requires a redraw of the graphics area.
    final void
    setAlpha(double alpha)
    Legt den Wert der alpha-Eigenschaft fest.
    final void
    setEnabled(boolean enabled)
    Legt den Wert der enabled-Eigenschaft fest.
    final void
    setSnapToPixel(boolean snap)
    Legt den Wert der snapToPixel-Eigenschaft fest.
    double
    snapPositionX(double value)
    If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
    double
    snapPositionY(double value)
    If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
    double
    snapSizeX(double value)
    If this renderer's snapToPixel property is true, returns a value ceiled to the nearest pixel in the horizontal direction, else returns the same value.
    double
    snapSizeY(double value)
    If this renderer's snapToPixel property is true, returns a value ceiled to the nearest pixel in the vertical direction, else returns the same value.
    double
    snapSpaceX(double value)
    If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
    double
    snapSpaceY(double value)
    If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
    The snapToPixel property.

    Von Klasse geerbte Methoden Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Eigenschaftsdetails

  • Konstruktordetails

    • RendererBase

      public RendererBase(GraphicsBase<?> graphics, String name)
      Constructs a new renderer.
      Parameter:
      graphics - the graphics control where the renderer will be used
      name - the name of the renderer (useful for tooling)
  • Methodendetails

    • snapSpaceX

      public double snapSpaceX(double value)
      If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
      Parameter:
      value - the space value to be snapped
      Gibt zurück:
      value rounded to nearest pixel
    • snapSpaceY

      public double snapSpaceY(double value)
      If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
      Parameter:
      value - the space value to be snapped
      Gibt zurück:
      value rounded to nearest pixel
    • snapSizeX

      public double snapSizeX(double value)
      If this renderer's snapToPixel property is true, returns a value ceiled to the nearest pixel in the horizontal direction, else returns the same value.
      Parameter:
      value - the size value to be snapped
      Gibt zurück:
      value ceiled to nearest pixel
    • snapSizeY

      public double snapSizeY(double value)
      If this renderer's snapToPixel property is true, returns a value ceiled to the nearest pixel in the vertical direction, else returns the same value.
      Parameter:
      value - the size value to be snapped
      Gibt zurück:
      value ceiled to nearest pixel
    • snapPositionX

      public double snapPositionX(double value)
      If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the horizontal direction, else returns the same value.
      Parameter:
      value - the position value to be snapped
      Gibt zurück:
      value rounded to nearest pixel
    • snapPositionY

      public double snapPositionY(double value)
      If this renderer's snapToPixel property is true, returns a value rounded to the nearest pixel in the vertical direction, else returns the same value.
      Parameter:
      value - the position value to be snapped
      Gibt zurück:
      value rounded to nearest pixel
    • disableRedrawAfterPropertyChange

      protected final void disableRedrawAfterPropertyChange()
      Disables automatic redrawing of the graphics area when one of the observed properties changes. Useful for not going into infinite loops.
    • enableRedrawAfterPropertyChange

      protected final void enableRedrawAfterPropertyChange()
      Enabled automatic redrawing of the graphics area when one of the observed properties changes. Useful for not going into infinite loops.
    • redrawObservable

      protected void redrawObservable(Observable observable)
      Registers the given observable as something that requires a redraw of the graphics area. E.g.: the stroke color has changed.
      Parameter:
      observable - the observable to monitor for changes
    • getName

      public final String getName()
      Returns the renderer name.
      Gibt zurück:
      the renderer name
    • getGraphics

      public final GraphicsBase<?> getGraphics()
      Returns the graphics control that owns this renderer.
      Gibt zurück:
      the owning graphics control
    • getLocation

      protected final double getLocation(Instant time, Canvas canvas)
      Calculates the x coordinate for the given time. This method only returns valid results when the renderer is used in a layout with horizontal orientation. It will not work in AgendaLayout.
      Parameter:
      time - the time for which to calculate the x coordinate
      Gibt zurück:
      the location of the given time point
      Seit:
      1.0
      Siehe auch:
    • getTimeAt

      protected final Instant getTimeAt(double location)
      Calculates the time at the given x coordinate. This method only returns valid results when the renderer is used in a layout with horizontal orientation. It will not work in AgendaLayout.
      Parameter:
      location - the location for which to return the time
      Gibt zurück:
      the time at the given x coordinate
      Seit:
      1.0
      Siehe auch:
    • enabledProperty

      public final BooleanProperty enabledProperty()
      The enabled property. Determines whether this renderer is active during rendering.
      Gibt zurück:
      the enabled property
      Siehe auch:
    • isEnabled

      public final boolean isEnabled()
      Ruft den Wert der enabled-Eigenschaft ab.
      Eigenschaftsbeschreibung:
      The enabled property. Determines whether this renderer is active during rendering.
      Gibt zurück:
      Wert der Eigenschaft enabled
      Siehe auch:
    • setEnabled

      public final void setEnabled(boolean enabled)
      Legt den Wert der enabled-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The enabled property. Determines whether this renderer is active during rendering.
      Parameter:
      enabled - Wert für die Eigenschaft enabled
      Siehe auch:
    • snapToPixelProperty

      public final BooleanProperty snapToPixelProperty()
      The snapToPixel property. Controls whether coordinates and sizes are snapped to device pixels.
      Gibt zurück:
      the snapToPixel property
      Siehe auch:
    • setSnapToPixel

      public final void setSnapToPixel(boolean snap)
      Legt den Wert der snapToPixel-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The snapToPixel property. Controls whether coordinates and sizes are snapped to device pixels.
      Parameter:
      snap - Wert für die Eigenschaft snapToPixel
      Siehe auch:
    • isSnapToPixel

      public final boolean isSnapToPixel()
      Ruft den Wert der snapToPixel-Eigenschaft ab.
      Eigenschaftsbeschreibung:
      The snapToPixel property. Controls whether coordinates and sizes are snapped to device pixels.
      Gibt zurück:
      Wert der Eigenschaft snapToPixel
      Siehe auch:
    • alphaProperty

      public final DoubleProperty alphaProperty()
      The alpha property. Controls the opacity used when this renderer draws content.
      Gibt zurück:
      the alpha property
      Siehe auch:
    • setAlpha

      public final void setAlpha(double alpha)
      Legt den Wert der alpha-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The alpha property. Controls the opacity used when this renderer draws content.
      Parameter:
      alpha - Wert für die Eigenschaft alpha
      Siehe auch:
    • getAlpha

      public final double getAlpha()
      Ruft den Wert der alpha-Eigenschaft ab.
      Eigenschaftsbeschreibung:
      The alpha property. Controls the opacity used when this renderer draws content.
      Gibt zurück:
      Wert der Eigenschaft alpha
      Siehe auch: