Klasse ActivityRenderer<A extends Activity>
java.lang.Object
com.flexganttfx.view.graphics.renderer.RendererBase
com.flexganttfx.view.graphics.renderer.Renderer
com.flexganttfx.view.graphics.renderer.ActivityRenderer<A>
- Bekannte direkte Unterklassen:
ActivityBarRenderer, CalendarActivityRenderer, ChartActivityRenderer
-
Eigenschaftsübersicht
EigenschaftenTypEigenschaftBeschreibungfinal DoublePropertyThe cornerRadius property.final BooleanPropertyThe cornersRounded property.final DoublePropertyThe lineWidth property.final ObjectProperty<Paint> The strokeHighlight property.final ObjectProperty<Paint> The strokeHover property.final ObjectProperty<Paint> The strokePressed property.final ObjectProperty<Paint> The stroke property.final ObjectProperty<Paint> The strokeSelected property.Von Klasse geerbte Eigenschaften Renderer
fillHighlight, fillHover, fillPressed, fill, fillSelected, paddingVon Klasse geerbte Eigenschaften RendererBase
alpha, enabled, snapToPixel -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungActivityRenderer(GraphicsBase<?> graphics, String name) Constructs an activity renderer and registers its stroke and corner styling properties for redraws. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfinal DoublePropertyThe cornerRadius property.final BooleanPropertyThe cornersRounded property.final ActivityBoundsdraw(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the given activity and returns the resulting bounds.protected ActivityBoundsdrawActivity(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity contents and returns the resulting bounds.protected voiddrawBackground(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity background.protected voiddrawBorder(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity border.final doubleRuft den Wert dercornerRadius-Eigenschaft ab.final doubleRuft den Wert derlineWidth-Eigenschaft ab.final PaintRuft den Wert derstroke-Eigenschaft ab.protected PaintgetStroke(boolean selected, boolean hover, boolean highlighted, boolean pressed) Returns the stroke paint for the given activity state.final PaintRuft den Wert derstrokeHighlight-Eigenschaft ab.final PaintRuft den Wert derstrokeHover-Eigenschaft ab.final PaintRuft den Wert derstrokePressed-Eigenschaft ab.final PaintRuft den Wert derstrokeSelected-Eigenschaft ab.final booleanRuft den Wert dercornersRounded-Eigenschaft ab.final DoublePropertyThe lineWidth property.final voidsetCornerRadius(double radius) Legt den Wert dercornerRadius-Eigenschaft fest.final voidsetCornersRounded(boolean rounded) Legt den Wert dercornersRounded-Eigenschaft fest.final voidsetLineWidth(double lineWidth) Legt den Wert derlineWidth-Eigenschaft fest.final voidLegt den Wert derstroke-Eigenschaft fest.final voidsetStrokeHighlight(Paint paint) Legt den Wert derstrokeHighlight-Eigenschaft fest.final voidsetStrokeHover(Paint paint) Legt den Wert derstrokeHover-Eigenschaft fest.final voidsetStrokePressed(Paint paint) Legt den Wert derstrokePressed-Eigenschaft fest.final voidsetStrokeSelected(Paint paint) Legt den Wert derstrokeSelected-Eigenschaft fest.final ObjectProperty<Paint> The strokeHighlight property.final ObjectProperty<Paint> The strokeHover property.final ObjectProperty<Paint> The strokePressed property.final ObjectProperty<Paint> The stroke property.final ObjectProperty<Paint> The strokeSelected property.Von Klasse geerbte Methoden Renderer
fillHighlightProperty, fillHoverProperty, fillPressedProperty, fillProperty, fillSelectedProperty, getFill, getFill, getFillHighlight, getFillHover, getFillPressed, getFillSelected, getPadding, paddingProperty, setFill, setFillHighlight, setFillHover, setFillPressed, setFillSelected, setPaddingVon Klasse geerbte Methoden RendererBase
alphaProperty, disableRedrawAfterPropertyChange, enabledProperty, enableRedrawAfterPropertyChange, getAlpha, getGraphics, getLocation, getName, getTimeAt, isEnabled, isSnapToPixel, redrawObservable, setAlpha, setEnabled, setSnapToPixel, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty
-
Eigenschaftsdetails
-
cornersRounded
The cornersRounded property. Controls whether activity corners are rendered rounded.- Siehe auch:
-
cornerRadius
The cornerRadius property. Controls the radius used for rounded activity corners.- Siehe auch:
-
lineWidth
The lineWidth property. Controls the stroke width used to draw activity borders.- Siehe auch:
-
stroke
The stroke property. Defines the default stroke paint used for activities.- Siehe auch:
-
strokePressed
The strokePressed property. Defines the stroke paint used while an activity is pressed.- Siehe auch:
-
strokeHover
The strokeHover property. Defines the stroke paint used while an activity is hovered.- Siehe auch:
-
strokeSelected
The strokeSelected property. Defines the stroke paint used while an activity is selected.- Siehe auch:
-
strokeHighlight
The strokeHighlight property. Defines the stroke paint used while an activity is highlighted.- Siehe auch:
-
-
Konstruktordetails
-
ActivityRenderer
Constructs an activity renderer and registers its stroke and corner styling properties for redraws.- Parameter:
graphics- the graphics control that uses this renderername- the renderer name
-
-
Methodendetails
-
draw
public final ActivityBounds draw(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the given activity and returns the resulting bounds.- Parameter:
activityRef- the activity reference to renderposition- the activity positiongc- the graphics contextx- the x coordinatey- the y coordinatew- the widthh- the heightselected- whether the activity is selectedhover- whether the activity is hoveredhighlighted- whether the activity is highlightedpressed- whether the activity is pressed- Gibt zurück:
- the bounds of the rendered activity
-
drawActivity
protected ActivityBounds drawActivity(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity contents and returns the resulting bounds.- Parameter:
activityRef- the activity reference to renderposition- the activity positiongc- the graphics contextx- the x coordinatey- the y coordinatew- the widthh- the heightselected- whether the activity is selectedhover- whether the activity is hoveredhighlighted- whether the activity is highlightedpressed- whether the activity is pressed- Gibt zurück:
- the bounds of the rendered activity
-
drawBackground
protected void drawBackground(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity background.- Parameter:
activityRef- the activity reference to renderposition- the activity positiongc- the graphics contextx- the x coordinatey- the y coordinatew- the widthh- the heightselected- whether the activity is selectedhover- whether the activity is hoveredhighlighted- whether the activity is highlightedpressed- whether the activity is pressed
-
drawBorder
protected void drawBorder(ActivityRef<A> activityRef, Position position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the activity border.- Parameter:
activityRef- the activity reference to renderposition- the activity positiongc- the graphics contextx- the x coordinatey- the y coordinatew- the widthh- the heightselected- whether the activity is selectedhover- whether the activity is hoveredhighlighted- whether the activity is highlightedpressed- whether the activity is pressed
-
getStroke
Returns the stroke paint for the given activity state.- Parameter:
selected- whether the activity is selectedhover- whether the activity is hoveredhighlighted- whether the activity is highlightedpressed- whether the activity is pressed- Gibt zurück:
- the stroke paint to use
-
cornersRoundedProperty
The cornersRounded property. Controls whether activity corners are rendered rounded.- Gibt zurück:
- the cornersRounded property
- Siehe auch:
-
cornerRadiusProperty
The cornerRadius property. Controls the radius used for rounded activity corners.- Gibt zurück:
- the cornerRadius property
- Siehe auch:
-
lineWidthProperty
The lineWidth property. Controls the stroke width used to draw activity borders.- Gibt zurück:
- the lineWidth property
- Siehe auch:
-
strokeProperty
The stroke property. Defines the default stroke paint used for activities.- Gibt zurück:
- the stroke property
- Siehe auch:
-
strokePressedProperty
The strokePressed property. Defines the stroke paint used while an activity is pressed.- Gibt zurück:
- the strokePressed property
- Siehe auch:
-
strokeHoverProperty
The strokeHover property. Defines the stroke paint used while an activity is hovered.- Gibt zurück:
- the strokeHover property
- Siehe auch:
-
strokeSelectedProperty
The strokeSelected property. Defines the stroke paint used while an activity is selected.- Gibt zurück:
- the strokeSelected property
- Siehe auch:
-
strokeHighlightProperty
The strokeHighlight property. Defines the stroke paint used while an activity is highlighted.- Gibt zurück:
- the strokeHighlight property
- Siehe auch:
-
getStroke
Ruft den Wert derstroke-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The stroke property. Defines the default stroke paint used for activities.
- Gibt zurück:
- Wert der Eigenschaft
stroke - Siehe auch:
-
setStroke
Legt den Wert derstroke-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The stroke property. Defines the default stroke paint used for activities.
- Parameter:
paint- Wert für die Eigenschaftstroke- Siehe auch:
-
getStrokePressed
Ruft den Wert derstrokePressed-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The strokePressed property. Defines the stroke paint used while an activity is pressed.
- Gibt zurück:
- Wert der Eigenschaft
strokePressed - Siehe auch:
-
setStrokePressed
Legt den Wert derstrokePressed-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The strokePressed property. Defines the stroke paint used while an activity is pressed.
- Parameter:
paint- Wert für die EigenschaftstrokePressed- Siehe auch:
-
getStrokeHighlight
Ruft den Wert derstrokeHighlight-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The strokeHighlight property. Defines the stroke paint used while an activity is highlighted.
- Gibt zurück:
- Wert der Eigenschaft
strokeHighlight - Siehe auch:
-
setStrokeHighlight
Legt den Wert derstrokeHighlight-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The strokeHighlight property. Defines the stroke paint used while an activity is highlighted.
- Parameter:
paint- Wert für die EigenschaftstrokeHighlight- Siehe auch:
-
getStrokeSelected
Ruft den Wert derstrokeSelected-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The strokeSelected property. Defines the stroke paint used while an activity is selected.
- Gibt zurück:
- Wert der Eigenschaft
strokeSelected - Siehe auch:
-
setStrokeSelected
Legt den Wert derstrokeSelected-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The strokeSelected property. Defines the stroke paint used while an activity is selected.
- Parameter:
paint- Wert für die EigenschaftstrokeSelected- Siehe auch:
-
getStrokeHover
Ruft den Wert derstrokeHover-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The strokeHover property. Defines the stroke paint used while an activity is hovered.
- Gibt zurück:
- Wert der Eigenschaft
strokeHover - Siehe auch:
-
setStrokeHover
Legt den Wert derstrokeHover-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The strokeHover property. Defines the stroke paint used while an activity is hovered.
- Parameter:
paint- Wert für die EigenschaftstrokeHover- Siehe auch:
-
setCornerRadius
public final void setCornerRadius(double radius) Legt den Wert dercornerRadius-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The cornerRadius property. Controls the radius used for rounded activity corners.
- Parameter:
radius- Wert für die EigenschaftcornerRadius- Siehe auch:
-
getCornerRadius
public final double getCornerRadius()Ruft den Wert dercornerRadius-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The cornerRadius property. Controls the radius used for rounded activity corners.
- Gibt zurück:
- Wert der Eigenschaft
cornerRadius - Siehe auch:
-
setCornersRounded
public final void setCornersRounded(boolean rounded) Legt den Wert dercornersRounded-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The cornersRounded property. Controls whether activity corners are rendered rounded.
- Parameter:
rounded- Wert für die EigenschaftcornersRounded- Siehe auch:
-
isCornersRounded
public final boolean isCornersRounded()Ruft den Wert dercornersRounded-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The cornersRounded property. Controls whether activity corners are rendered rounded.
- Gibt zurück:
- Wert der Eigenschaft
cornersRounded - Siehe auch:
-
setLineWidth
public final void setLineWidth(double lineWidth) Legt den Wert derlineWidth-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The lineWidth property. Controls the stroke width used to draw activity borders.
- Parameter:
lineWidth- Wert für die EigenschaftlineWidth- Siehe auch:
-
getLineWidth
public final double getLineWidth()Ruft den Wert derlineWidth-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The lineWidth property. Controls the stroke width used to draw activity borders.
- Gibt zurück:
- Wert der Eigenschaft
lineWidth - Siehe auch:
-