Module com.flexganttfx.view
Class 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>
- Direct Known Subclasses:
CompletableActivityRenderer
-
Property Summary
PropertiesTypePropertyDescriptionfinal BooleanProperty
final DoubleProperty
final ObjectProperty<Font>
final BooleanProperty
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final DoubleProperty
Properties inherited from class com.flexganttfx.view.graphics.renderer.ActivityRenderer
cornerRadius, cornersRounded, lineWidth, strokeHighlight, strokeHover, strokePressed, stroke, strokeSelected
Properties inherited from class com.flexganttfx.view.graphics.renderer.Renderer
fillHighlight, fillHover, fillPressed, fill, fillSelected, padding
Properties inherited from class com.flexganttfx.view.graphics.renderer.RendererBase
alpha, enabled, snapToPixel
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanProperty
final DoubleProperty
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) 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) 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) 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) final ObjectProperty<Font>
final double
Gets the value of thebarHeight
property.final Font
getFont()
Gets the value of thefont
property.final Paint
Gets the value of thetextFill
property.protected Paint
getTextFill
(boolean selected, boolean hover, boolean highlighted, boolean pressed) final Paint
Gets the value of thetextFillHighlight
property.final Paint
Gets the value of thetextFillHover
property.final Paint
Gets the value of thetextFillPressed
property.final Paint
Gets the value of thetextFillSelected
property.final double
Gets the value of thetextGap
property.final BooleanProperty
final boolean
Gets the value of theautoFixText
property.final boolean
isGlossy()
Gets the value of theglossy
property.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.final void
setAutoFixText
(boolean auto) Sets the value of theautoFixText
property.final void
setBarHeight
(double height) Sets the value of thebarHeight
property.final void
Sets the value of thefont
property.final void
setGlossy
(boolean glossy) Sets the value of theglossy
property.final void
setTextFill
(Paint fill) Sets the value of thetextFill
property.final void
setTextFillHighlight
(Paint fill) Sets the value of thetextFillHighlight
property.final void
setTextFillHover
(Paint fill) Sets the value of thetextFillHover
property.final void
setTextFillPressed
(Paint fill) Sets the value of thetextFillPressed
property.final void
setTextFillSelected
(Paint fill) Sets the value of thetextFillSelected
property.final void
setTextGap
(double gap) Sets the value of thetextGap
property.final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final ObjectProperty<Paint>
final DoubleProperty
Methods inherited from class com.flexganttfx.view.graphics.renderer.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, strokeSelectedProperty
Methods inherited from class com.flexganttfx.view.graphics.renderer.Renderer
fillHighlightProperty, fillHoverProperty, fillPressedProperty, fillProperty, fillSelectedProperty, getFill, getFill, getFillHighlight, getFillHover, getFillPressed, getFillSelected, getPadding, paddingProperty, setFill, setFillHighlight, setFillHover, setFillPressed, setFillSelected, setPadding
Methods inherited from class com.flexganttfx.view.graphics.renderer.RendererBase
alphaProperty, disableRedrawAfterPropertyChange, enabledProperty, enableRedrawAfterPropertyChange, getAlpha, getGraphics, getLocation, getName, getTimeAt, isEnabled, isSnapToPixel, redrawObservable, setAlpha, setEnabled, setSnapToPixel, snapPositionX, snapPositionY, snapSizeX, snapSizeY, snapSpaceX, snapSpaceY, snapToPixelProperty
-
Property Details
-
barHeight
-
textGap
- See Also:
-
textFill
-
textFillHover
-
textFillHighlight
-
textFillPressed
-
textFillSelected
-
font
- See Also:
-
glossy
- See Also:
-
autoFixText
-
-
Constructor Details
-
ActivityBarRenderer
-
-
Method Details
-
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) - Overrides:
drawActivity
in classActivityRenderer<A extends 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) - Overrides:
drawBackground
in classActivityRenderer<A extends Activity>
-
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) - Overrides:
drawBorder
in classActivityRenderer<A extends Activity>
-
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) -
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.- Parameters:
text
- the text to drawposition
- the text positionavailableWidth
- the availble width of the entire activity- Returns:
- true if the text can be drawn
- Since:
- 1.5
-
getTextFill
-
barHeightProperty
- Returns:
- the
barHeight
property - See Also:
-
getBarHeight
public final double getBarHeight()Gets the value of thebarHeight
property.- Property description:
- Returns:
- the value of the
barHeight
property - See Also:
-
setBarHeight
public final void setBarHeight(double height) Sets the value of thebarHeight
property.- Property description:
- Parameters:
height
- the value for thebarHeight
property- See Also:
-
textGapProperty
- Returns:
- the
textGap
property - See Also:
-
setTextGap
public final void setTextGap(double gap) Sets the value of thetextGap
property.- Property description:
- Parameters:
gap
- the value for thetextGap
property- See Also:
-
getTextGap
public final double getTextGap()Gets the value of thetextGap
property.- Property description:
- Returns:
- the value of the
textGap
property - See Also:
-
textFillProperty
- Returns:
- the
textFill
property - See Also:
-
setTextFill
Sets the value of thetextFill
property.- Property description:
- Parameters:
fill
- the value for thetextFill
property- See Also:
-
getTextFill
Gets the value of thetextFill
property.- Property description:
- Returns:
- the value of the
textFill
property - See Also:
-
textFillHoverProperty
- Returns:
- the
textFillHover
property - See Also:
-
setTextFillHover
Sets the value of thetextFillHover
property.- Property description:
- Parameters:
fill
- the value for thetextFillHover
property- See Also:
-
getTextFillHover
Gets the value of thetextFillHover
property.- Property description:
- Returns:
- the value of the
textFillHover
property - See Also:
-
textFillHighlightProperty
- Returns:
- the
textFillHighlight
property - See Also:
-
setTextFillHighlight
Sets the value of thetextFillHighlight
property.- Property description:
- Parameters:
fill
- the value for thetextFillHighlight
property- See Also:
-
getTextFillHighlight
Gets the value of thetextFillHighlight
property.- Property description:
- Returns:
- the value of the
textFillHighlight
property - See Also:
-
textFillPressedProperty
- Returns:
- the
textFillPressed
property - See Also:
-
setTextFillPressed
Sets the value of thetextFillPressed
property.- Property description:
- Parameters:
fill
- the value for thetextFillPressed
property- See Also:
-
getTextFillPressed
Gets the value of thetextFillPressed
property.- Property description:
- Returns:
- the value of the
textFillPressed
property - See Also:
-
textFillSelectedProperty
- Returns:
- the
textFillSelected
property - See Also:
-
setTextFillSelected
Sets the value of thetextFillSelected
property.- Property description:
- Parameters:
fill
- the value for thetextFillSelected
property- See Also:
-
getTextFillSelected
Gets the value of thetextFillSelected
property.- Property description:
- Returns:
- the value of the
textFillSelected
property - See Also:
-
fontProperty
- Returns:
- the
font
property - See Also:
-
setFont
Sets the value of thefont
property.- Property description:
- Parameters:
font
- the value for thefont
property- See Also:
-
getFont
Gets the value of thefont
property.- Property description:
- Returns:
- the value of the
font
property - See Also:
-
glossyProperty
- Returns:
- the
glossy
property - See Also:
-
setGlossy
public final void setGlossy(boolean glossy) Sets the value of theglossy
property.- Property description:
- Parameters:
glossy
- the value for theglossy
property- See Also:
-
isGlossy
public final boolean isGlossy()Gets the value of theglossy
property.- Property description:
- Returns:
- the value of the
glossy
property - See Also:
-
autoFixTextProperty
- Returns:
- the
autoFixText
property - See Also:
-
setAutoFixText
public final void setAutoFixText(boolean auto) Sets the value of theautoFixText
property.- Property description:
- Parameters:
auto
- the value for theautoFixText
property- See Also:
-
isAutoFixText
public final boolean isAutoFixText()Gets the value of theautoFixText
property.- Property description:
- Returns:
- the value of the
autoFixText
property - See Also:
-