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 the property barHeight.final Font
getFont()
Gets the value of the property font.final Paint
Gets the value of the property textFill.protected Paint
getTextFill
(boolean selected, boolean hover, boolean highlighted, boolean pressed) final Paint
Gets the value of the property textFillHighlight.final Paint
Gets the value of the property textFillHover.final Paint
Gets the value of the property textFillPressed.final Paint
Gets the value of the property textFillSelected.final double
Gets the value of the property textGap.final BooleanProperty
final boolean
Gets the value of the property autoFixText.final boolean
isGlossy()
Gets the value of the property glossy.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 the property autoFixText.final void
setBarHeight
(double height) Sets the value of the property barHeight.final void
Sets the value of the property font.final void
setGlossy
(boolean glossy) Sets the value of the property glossy.final void
setTextFill
(Paint fill) Sets the value of the property textFill.final void
setTextFillHighlight
(Paint fill) Sets the value of the property textFillHighlight.final void
setTextFillHover
(Paint fill) Sets the value of the property textFillHover.final void
setTextFillPressed
(Paint fill) Sets the value of the property textFillPressed.final void
setTextFillSelected
(Paint fill) Sets the value of the property textFillSelected.final void
setTextGap
(double gap) Sets the value of the property textGap.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
- See Also:
-
textGap
- See Also:
-
textFill
- See Also:
-
textFillHover
- See Also:
-
textFillHighlight
-
textFillPressed
-
textFillSelected
-
font
- See Also:
-
glossy
- See Also:
-
autoFixText
- See Also:
-
-
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
- See Also:
-
getBarHeight
public final double getBarHeight()Gets the value of the property barHeight.- Property description:
-
setBarHeight
public final void setBarHeight(double height) Sets the value of the property barHeight.- Property description:
-
textGapProperty
- See Also:
-
setTextGap
public final void setTextGap(double gap) Sets the value of the property textGap.- Property description:
-
getTextGap
public final double getTextGap()Gets the value of the property textGap.- Property description:
-
textFillProperty
- See Also:
-
setTextFill
Sets the value of the property textFill.- Property description:
-
getTextFill
Gets the value of the property textFill.- Property description:
-
textFillHoverProperty
- See Also:
-
setTextFillHover
Sets the value of the property textFillHover.- Property description:
-
getTextFillHover
Gets the value of the property textFillHover.- Property description:
-
textFillHighlightProperty
-
setTextFillHighlight
Sets the value of the property textFillHighlight.- Property description:
-
getTextFillHighlight
Gets the value of the property textFillHighlight.- Property description:
-
textFillPressedProperty
-
setTextFillPressed
Sets the value of the property textFillPressed.- Property description:
-
getTextFillPressed
Gets the value of the property textFillPressed.- Property description:
-
textFillSelectedProperty
-
setTextFillSelected
Sets the value of the property textFillSelected.- Property description:
-
getTextFillSelected
Gets the value of the property textFillSelected.- Property description:
-
fontProperty
- See Also:
-
setFont
Sets the value of the property font.- Property description:
-
getFont
Gets the value of the property font.- Property description:
-
glossyProperty
- See Also:
-
setGlossy
public final void setGlossy(boolean glossy) Sets the value of the property glossy.- Property description:
-
isGlossy
public final boolean isGlossy()Gets the value of the property glossy.- Property description:
-
autoFixTextProperty
- See Also:
-
setAutoFixText
public final void setAutoFixText(boolean auto) Sets the value of the property autoFixText.- Property description:
-
isAutoFixText
public final boolean isAutoFixText()Gets the value of the property autoFixText.- Property description:
-