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
Eigenschaften -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungRendererBase(GraphicsBase<?> graphics, String name) Constructs a new renderer. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal DoublePropertyprotected final voidDisables automatic redrawing of the graphics area when one of the observed properties changes.final BooleanPropertyprotected 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<?> protected final doublegetLocation(Instant time, Canvas canvas) Calculates the x coordinate for the given time.final StringgetName()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 BooleanProperty
-
Eigenschaftsdetails
-
enabled
- Siehe auch:
-
snapToPixel
- Siehe auch:
-
alpha
- 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
-
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
- Gibt zurück:
- die Eigenschaft
enabled - Siehe auch:
-
isEnabled
public final boolean isEnabled()Ruft den Wert derenabled-Eigenschaft ab.- Eigenschaftsbeschreibung:
- Gibt zurück:
- Wert der Eigenschaft
enabled - Siehe auch:
-
setEnabled
public final void setEnabled(boolean enabled) Legt den Wert derenabled-Eigenschaft fest.- Eigenschaftsbeschreibung:
- Parameter:
enabled- Wert für die Eigenschaftenabled- Siehe auch:
-
snapToPixelProperty
- Gibt zurück:
- die Eigenschaft
snapToPixel - Siehe auch:
-
setSnapToPixel
public final void setSnapToPixel(boolean snap) Legt den Wert dersnapToPixel-Eigenschaft fest.- Eigenschaftsbeschreibung:
- Parameter:
snap- Wert für die EigenschaftsnapToPixel- Siehe auch:
-
isSnapToPixel
public final boolean isSnapToPixel()Ruft den Wert dersnapToPixel-Eigenschaft ab.- Eigenschaftsbeschreibung:
- Gibt zurück:
- Wert der Eigenschaft
snapToPixel - Siehe auch:
-
alphaProperty
- Gibt zurück:
- die Eigenschaft
alpha - Siehe auch:
-
setAlpha
public final void setAlpha(double alpha) Legt den Wert deralpha-Eigenschaft fest.- Eigenschaftsbeschreibung:
- Parameter:
alpha- Wert für die Eigenschaftalpha- Siehe auch:
-
getAlpha
public final double getAlpha()Ruft den Wert deralpha-Eigenschaft ab.- Eigenschaftsbeschreibung:
- Gibt zurück:
- Wert der Eigenschaft
alpha - Siehe auch:
-