Klasse RendererBase
java.lang.Object
com.flexganttfx.view.graphics.renderer.RendererBase
- Bekannte direkte Unterklassen:
LinkRenderer, Renderer, SystemLayer
The base class of all renderers used by FlexGanttFX.
-
Eigenschaftsübersicht
EigenschaftenTypEigenschaftBeschreibungfinal DoublePropertyThe alpha property.final BooleanPropertyThe enabled property.final BooleanPropertyThe snapToPixel property. -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungRendererBase(GraphicsBase<?> graphics, String name) Constructs a new renderer. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfinal DoublePropertyThe alpha property.protected final voidDisables automatic redrawing of the graphics area when one of the observed properties changes.final BooleanPropertyThe enabled property.protected final voidEnabled automatic redrawing of the graphics area when one of the observed properties changes.final doublegetAlpha()Ruft den Wert deralpha-Eigenschaft ab.final GraphicsBase<?> Returns the graphics control that owns this renderer.protected final doublegetLocation(Instant time, Canvas canvas) Calculates the x coordinate for the given time.final StringgetName()Returns the renderer name.protected final InstantgetTimeAt(double location) Calculates the time at the given x coordinate.final booleanRuft den Wert derenabled-Eigenschaft ab.final booleanRuft den Wert dersnapToPixel-Eigenschaft ab.protected voidredrawObservable(Observable observable) Registers the given observable as something that requires a redraw of the graphics area.final voidsetAlpha(double alpha) Legt den Wert deralpha-Eigenschaft fest.final voidsetEnabled(boolean enabled) Legt den Wert derenabled-Eigenschaft fest.final voidsetSnapToPixel(boolean snap) Legt den Wert dersnapToPixel-Eigenschaft fest.doublesnapPositionX(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.doublesnapPositionY(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.doublesnapSizeX(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.doublesnapSizeY(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.doublesnapSpaceX(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.doublesnapSpaceY(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.final BooleanPropertyThe snapToPixel property.
-
Eigenschaftsdetails
-
enabled
The enabled property. Determines whether this renderer is active during rendering.- Siehe auch:
-
snapToPixel
The snapToPixel property. Controls whether coordinates and sizes are snapped to device pixels.- Siehe auch:
-
alpha
The alpha property. Controls the opacity used when this renderer draws content.- Siehe auch:
-
-
Konstruktordetails
-
RendererBase
Constructs a new renderer.- Parameter:
graphics- the graphics control where the renderer will be usedname- 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
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
-
getGraphics
Returns the graphics control that owns this renderer.- Gibt zurück:
- the owning graphics control
-
getLocation
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 inAgendaLayout.- 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
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 inAgendaLayout.- 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
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 derenabled-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 derenabled-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The enabled property. Determines whether this renderer is active during rendering.
- Parameter:
enabled- Wert für die Eigenschaftenabled- Siehe auch:
-
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 dersnapToPixel-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The snapToPixel property. Controls whether coordinates and sizes are snapped to device pixels.
- Parameter:
snap- Wert für die EigenschaftsnapToPixel- Siehe auch:
-
isSnapToPixel
public final boolean isSnapToPixel()Ruft den Wert dersnapToPixel-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
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 deralpha-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The alpha property. Controls the opacity used when this renderer draws content.
- Parameter:
alpha- Wert für die Eigenschaftalpha- Siehe auch:
-
getAlpha
public final double getAlpha()Ruft den Wert deralpha-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The alpha property. Controls the opacity used when this renderer draws content.
- Gibt zurück:
- Wert der Eigenschaft
alpha - Siehe auch:
-