Klasse ActivityBarRenderer<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>
com.flexganttfx.view.graphics.renderer.ActivityBarRenderer<A>
- Bekannte direkte Unterklassen:
CompletableActivityRenderer
Renders activities as bars or milestone diamonds and can paint labels around them.
It adds bar-specific styling such as bar height, glossy fills, and text placement support on top of
ActivityRenderer.-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifikator und TypKlasseBeschreibungstatic enumDefines the supported positions for text relative to a rendered activity bar or milestone. -
Eigenschaftsübersicht
EigenschaftenTypEigenschaftBeschreibungfinal BooleanPropertyThe autoFixText property.final DoublePropertyThe barHeight property.final ObjectProperty<Font> The font property.final BooleanPropertyThe glossy property.final ObjectProperty<Paint> The textFillHighlight property.final ObjectProperty<Paint> The textFillHover property.final ObjectProperty<Paint> The textFillPressed property.final ObjectProperty<Paint> The textFill property.final ObjectProperty<Paint> The textFillSelected property.final DoublePropertyThe textGap property.Von Klasse geerbte Eigenschaften ActivityRenderer
cornerRadius, cornersRounded, lineWidth, strokeHighlight, strokeHover, strokePressed, stroke, strokeSelectedVon Klasse geerbte Eigenschaften Renderer
fillHighlight, fillHover, fillPressed, fill, fillSelected, paddingVon Klasse geerbte Eigenschaften RendererBase
alpha, enabled, snapToPixel -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungActivityBarRenderer(GraphicsBase<?> graphics, String name) Constructs an activity bar renderer and registers its bar and text styling properties for redraws. -
Methodenübersicht
Modifikator und TypMethodeBeschreibungfinal BooleanPropertyThe autoFixText property.final DoublePropertyThe barHeight property.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 bar or milestone 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 background for the activity bar or milestone.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 border for the activity bar or milestone.protected voiddrawText(ActivityRef<A> activityRef, String text, ActivityBarRenderer.TextPosition position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the given text at the requested position around the activity.final ObjectProperty<Font> The font property.final doubleRuft den Wert derbarHeight-Eigenschaft ab.final FontgetFont()Ruft den Wert derfont-Eigenschaft ab.final PaintRuft den Wert dertextFill-Eigenschaft ab.protected PaintgetTextFill(boolean selected, boolean hover, boolean highlighted, boolean pressed) Returns the text fill paint for the given activity state.final PaintRuft den Wert dertextFillHighlight-Eigenschaft ab.final PaintRuft den Wert dertextFillHover-Eigenschaft ab.final PaintRuft den Wert dertextFillPressed-Eigenschaft ab.final PaintRuft den Wert dertextFillSelected-Eigenschaft ab.final doubleRuft den Wert dertextGap-Eigenschaft ab.final BooleanPropertyThe glossy property.final booleanRuft den Wert derautoFixText-Eigenschaft ab.final booleanisGlossy()Ruft den Wert derglossy-Eigenschaft ab.protected booleanisTextVisible(String text, ActivityBarRenderer.TextPosition position, double availableWidth) Determines if the given text for the given position will be drawn or not depending on the available width.final voidsetAutoFixText(boolean auto) Legt den Wert derautoFixText-Eigenschaft fest.final voidsetBarHeight(double height) Legt den Wert derbarHeight-Eigenschaft fest.final voidLegt den Wert derfont-Eigenschaft fest.final voidsetGlossy(boolean glossy) Legt den Wert derglossy-Eigenschaft fest.final voidsetTextFill(Paint fill) Legt den Wert dertextFill-Eigenschaft fest.final voidsetTextFillHighlight(Paint fill) Legt den Wert dertextFillHighlight-Eigenschaft fest.final voidsetTextFillHover(Paint fill) Legt den Wert dertextFillHover-Eigenschaft fest.final voidsetTextFillPressed(Paint fill) Legt den Wert dertextFillPressed-Eigenschaft fest.final voidsetTextFillSelected(Paint fill) Legt den Wert dertextFillSelected-Eigenschaft fest.final voidsetTextGap(double gap) Legt den Wert dertextGap-Eigenschaft fest.final ObjectProperty<Paint> The textFillHighlight property.final ObjectProperty<Paint> The textFillHover property.final ObjectProperty<Paint> The textFillPressed property.final ObjectProperty<Paint> The textFill property.final ObjectProperty<Paint> The textFillSelected property.final DoublePropertyThe textGap property.Von Klasse geerbte Methoden ActivityRenderer
cornerRadiusProperty, cornersRoundedProperty, draw, getCornerRadius, getLineWidth, getStroke, getStroke, getStrokeHighlight, getStrokeHover, getStrokePressed, getStrokeSelected, isCornersRounded, lineWidthProperty, setCornerRadius, setCornersRounded, setLineWidth, setStroke, setStrokeHighlight, setStrokeHover, setStrokePressed, setStrokeSelected, strokeHighlightProperty, strokeHoverProperty, strokePressedProperty, strokeProperty, strokeSelectedPropertyVon 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
-
barHeight
The barHeight property. Controls the height of the rendered activity bar inside the row.- Siehe auch:
-
textGap
The textGap property. Controls the gap between the activity bar and its text.- Siehe auch:
-
textFill
The textFill property. Defines the default text fill paint used for activity labels.- Siehe auch:
-
textFillHover
The textFillHover property. Defines the text fill paint used while an activity is hovered.- Siehe auch:
-
textFillHighlight
The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.- Siehe auch:
-
textFillPressed
The textFillPressed property. Defines the text fill paint used while an activity is pressed.- Siehe auch:
-
textFillSelected
The textFillSelected property. Defines the text fill paint used while an activity is selected.- Siehe auch:
-
font
The font property. Controls the font used to render activity text.- Siehe auch:
-
glossy
The glossy property. Controls whether a glossy highlight is painted on activity bars.- Siehe auch:
-
autoFixText
The autoFixText property. Controls whether text positions are adjusted to stay within the visible canvas when possible.- Siehe auch:
-
-
Konstruktordetails
-
ActivityBarRenderer
Constructs an activity bar renderer and registers its bar and text styling properties for redraws.- Parameter:
graphics- the graphics control that uses this renderername- the renderer name
-
-
Methodendetails
-
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 bar or milestone and returns the resulting bounds.- Setzt außer Kraft:
drawActivityin KlasseActivityRenderer<A extends Activity>- 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 background for the activity bar or milestone.- Setzt außer Kraft:
drawBackgroundin KlasseActivityRenderer<A extends Activity>- 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 border for the activity bar or milestone.- Setzt außer Kraft:
drawBorderin KlasseActivityRenderer<A extends Activity>- 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
-
drawText
protected void drawText(ActivityRef<A> activityRef, String text, ActivityBarRenderer.TextPosition position, GraphicsContext gc, double x, double y, double w, double h, boolean selected, boolean hover, boolean highlighted, boolean pressed) Draws the given text at the requested position around the activity.- Parameter:
activityRef- the activity reference to rendertext- the text to drawposition- the text 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
-
isTextVisible
protected boolean isTextVisible(String text, ActivityBarRenderer.TextPosition position, double availableWidth) Determines if the given text for the given position will be drawn or not depending on the available width. The default strategy is to not allow the text to show if the available width is less than 10 pixels, the text is null, or the text length multiplied by three is larger than the available width.- Parameter:
text- the text to drawposition- the text positionavailableWidth- the availble width of the entire activity- Gibt zurück:
- true if the text can be drawn
- Seit:
- 1.5
-
getTextFill
Returns the text fill 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 text fill paint to use
-
barHeightProperty
The barHeight property. Controls the height of the rendered activity bar inside the row.- Gibt zurück:
- the barHeight property
- Siehe auch:
-
getBarHeight
public final double getBarHeight()Ruft den Wert derbarHeight-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The barHeight property. Controls the height of the rendered activity bar inside the row.
- Gibt zurück:
- Wert der Eigenschaft
barHeight - Siehe auch:
-
setBarHeight
public final void setBarHeight(double height) Legt den Wert derbarHeight-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The barHeight property. Controls the height of the rendered activity bar inside the row.
- Parameter:
height- Wert für die EigenschaftbarHeight- Siehe auch:
-
textGapProperty
The textGap property. Controls the gap between the activity bar and its text.- Gibt zurück:
- the textGap property
- Siehe auch:
-
setTextGap
public final void setTextGap(double gap) Legt den Wert dertextGap-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textGap property. Controls the gap between the activity bar and its text.
- Parameter:
gap- Wert für die EigenschafttextGap- Siehe auch:
-
getTextGap
public final double getTextGap()Ruft den Wert dertextGap-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textGap property. Controls the gap between the activity bar and its text.
- Gibt zurück:
- Wert der Eigenschaft
textGap - Siehe auch:
-
textFillProperty
The textFill property. Defines the default text fill paint used for activity labels.- Gibt zurück:
- the textFill property
- Siehe auch:
-
setTextFill
Legt den Wert dertextFill-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textFill property. Defines the default text fill paint used for activity labels.
- Parameter:
fill- Wert für die EigenschafttextFill- Siehe auch:
-
getTextFill
Ruft den Wert dertextFill-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textFill property. Defines the default text fill paint used for activity labels.
- Gibt zurück:
- Wert der Eigenschaft
textFill - Siehe auch:
-
textFillHoverProperty
The textFillHover property. Defines the text fill paint used while an activity is hovered.- Gibt zurück:
- the textFillHover property
- Siehe auch:
-
setTextFillHover
Legt den Wert dertextFillHover-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textFillHover property. Defines the text fill paint used while an activity is hovered.
- Parameter:
fill- Wert für die EigenschafttextFillHover- Siehe auch:
-
getTextFillHover
Ruft den Wert dertextFillHover-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textFillHover property. Defines the text fill paint used while an activity is hovered.
- Gibt zurück:
- Wert der Eigenschaft
textFillHover - Siehe auch:
-
textFillHighlightProperty
The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.- Gibt zurück:
- the textFillHighlight property
- Siehe auch:
-
setTextFillHighlight
Legt den Wert dertextFillHighlight-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.
- Parameter:
fill- Wert für die EigenschafttextFillHighlight- Siehe auch:
-
getTextFillHighlight
Ruft den Wert dertextFillHighlight-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.
- Gibt zurück:
- Wert der Eigenschaft
textFillHighlight - Siehe auch:
-
textFillPressedProperty
The textFillPressed property. Defines the text fill paint used while an activity is pressed.- Gibt zurück:
- the textFillPressed property
- Siehe auch:
-
setTextFillPressed
Legt den Wert dertextFillPressed-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textFillPressed property. Defines the text fill paint used while an activity is pressed.
- Parameter:
fill- Wert für die EigenschafttextFillPressed- Siehe auch:
-
getTextFillPressed
Ruft den Wert dertextFillPressed-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textFillPressed property. Defines the text fill paint used while an activity is pressed.
- Gibt zurück:
- Wert der Eigenschaft
textFillPressed - Siehe auch:
-
textFillSelectedProperty
The textFillSelected property. Defines the text fill paint used while an activity is selected.- Gibt zurück:
- the textFillSelected property
- Siehe auch:
-
setTextFillSelected
Legt den Wert dertextFillSelected-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The textFillSelected property. Defines the text fill paint used while an activity is selected.
- Parameter:
fill- Wert für die EigenschafttextFillSelected- Siehe auch:
-
getTextFillSelected
Ruft den Wert dertextFillSelected-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The textFillSelected property. Defines the text fill paint used while an activity is selected.
- Gibt zurück:
- Wert der Eigenschaft
textFillSelected - Siehe auch:
-
fontProperty
The font property. Controls the font used to render activity text.- Gibt zurück:
- the font property
- Siehe auch:
-
setFont
Legt den Wert derfont-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The font property. Controls the font used to render activity text.
- Parameter:
font- Wert für die Eigenschaftfont- Siehe auch:
-
getFont
Ruft den Wert derfont-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The font property. Controls the font used to render activity text.
- Gibt zurück:
- Wert der Eigenschaft
font - Siehe auch:
-
glossyProperty
The glossy property. Controls whether a glossy highlight is painted on activity bars.- Gibt zurück:
- the glossy property
- Siehe auch:
-
setGlossy
public final void setGlossy(boolean glossy) Legt den Wert derglossy-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The glossy property. Controls whether a glossy highlight is painted on activity bars.
- Parameter:
glossy- Wert für die Eigenschaftglossy- Siehe auch:
-
isGlossy
public final boolean isGlossy()Ruft den Wert derglossy-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The glossy property. Controls whether a glossy highlight is painted on activity bars.
- Gibt zurück:
- Wert der Eigenschaft
glossy - Siehe auch:
-
autoFixTextProperty
The autoFixText property. Controls whether text positions are adjusted to stay within the visible canvas when possible.- Gibt zurück:
- the autoFixText property
- Siehe auch:
-
setAutoFixText
public final void setAutoFixText(boolean auto) Legt den Wert derautoFixText-Eigenschaft fest.- Eigenschaftsbeschreibung:
- The autoFixText property. Controls whether text positions are adjusted to stay within the visible canvas when possible.
- Parameter:
auto- Wert für die EigenschaftautoFixText- Siehe auch:
-
isAutoFixText
public final boolean isAutoFixText()Ruft den Wert derautoFixText-Eigenschaft ab.- Eigenschaftsbeschreibung:
- The autoFixText property. Controls whether text positions are adjusted to stay within the visible canvas when possible.
- Gibt zurück:
- Wert der Eigenschaft
autoFixText - Siehe auch:
-