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
public class ActivityBarRenderer<A extends Activity> extends ActivityRenderer<A>
-
Property Summary
Properties inherited from class com.flexganttfx.view.graphics.renderer.ActivityRenderer
cornerRadius, cornersRounded, lineWidth, strokeHighlight, strokeHover, strokePressed, stroke, strokeSelectedProperties inherited from class com.flexganttfx.view.graphics.renderer.Renderer
fillHighlight, fillHover, fillPressed, fill, fillSelected, paddingProperties inherited from class com.flexganttfx.view.graphics.renderer.RendererBase
alpha, enabled, snapToPixel -
Nested Class Summary
Nested Classes Modifier and Type Class Description static classActivityBarRenderer.TextPosition -
Constructor Summary
Constructors Constructor Description ActivityBarRenderer(GraphicsBase<?> graphics, String name) -
Method Summary
Modifier and Type Method Description BooleanPropertyautoFixTextProperty()DoublePropertybarHeightProperty()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)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)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)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)ObjectProperty<Font>fontProperty()doublegetBarHeight()Gets the value of the property barHeight.FontgetFont()Gets the value of the property font.PaintgetTextFill()Gets the value of the property textFill.protected PaintgetTextFill(boolean selected, boolean hover, boolean highlighted, boolean pressed)PaintgetTextFillHighlight()Gets the value of the property textFillHighlight.PaintgetTextFillHover()Gets the value of the property textFillHover.PaintgetTextFillPressed()Gets the value of the property textFillPressed.PaintgetTextFillSelected()Gets the value of the property textFillSelected.doublegetTextGap()Gets the value of the property textGap.BooleanPropertyglossyProperty()booleanisAutoFixText()Gets the value of the property autoFixText.booleanisGlossy()Gets the value of the property glossy.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.voidsetAutoFixText(boolean auto)Sets the value of the property autoFixText.voidsetBarHeight(double height)Sets the value of the property barHeight.voidsetFont(Font font)Sets the value of the property font.voidsetGlossy(boolean glossy)Sets the value of the property glossy.voidsetTextFill(Paint fill)Sets the value of the property textFill.voidsetTextFillHighlight(Paint fill)Sets the value of the property textFillHighlight.voidsetTextFillHover(Paint fill)Sets the value of the property textFillHover.voidsetTextFillPressed(Paint fill)Sets the value of the property textFillPressed.voidsetTextFillSelected(Paint fill)Sets the value of the property textFillSelected.voidsetTextGap(double gap)Sets the value of the property textGap.ObjectProperty<Paint>textFillHighlightProperty()ObjectProperty<Paint>textFillHoverProperty()ObjectProperty<Paint>textFillPressedProperty()ObjectProperty<Paint>textFillProperty()ObjectProperty<Paint>textFillSelectedProperty()DoublePropertytextGapProperty()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, strokeSelectedPropertyMethods 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, setPaddingMethods 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:
getBarHeight(),setBarHeight(double)
-
textGap
- See Also:
getTextGap(),setTextGap(double)
-
textFill
- See Also:
getTextFill(),setTextFill(Paint)
-
textFillHover
- See Also:
getTextFillHover(),setTextFillHover(Paint)
-
textFillHighlight
-
textFillPressed
- See Also:
getTextFillPressed(),setTextFillPressed(Paint)
-
textFillSelected
- See Also:
getTextFillSelected(),setTextFillSelected(Paint)
-
font
- See Also:
getFont(),setFont(Font)
-
glossy
- See Also:
isGlossy(),setGlossy(boolean)
-
autoFixText
- See Also:
isAutoFixText(),setAutoFixText(boolean)
-
-
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:
drawActivityin 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:
drawBackgroundin 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:
drawBorderin 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(),setBarHeight(double)
-
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:
getTextGap(),setTextGap(double)
-
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:
getTextFill(),setTextFill(Paint)
-
setTextFill
Sets the value of the property textFill.- Property description:
-
getTextFill
Gets the value of the property textFill.- Property description:
-
textFillHoverProperty
- See Also:
getTextFillHover(),setTextFillHover(Paint)
-
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
- See Also:
getTextFillPressed(),setTextFillPressed(Paint)
-
setTextFillPressed
Sets the value of the property textFillPressed.- Property description:
-
getTextFillPressed
Gets the value of the property textFillPressed.- Property description:
-
textFillSelectedProperty
- See Also:
getTextFillSelected(),setTextFillSelected(Paint)
-
setTextFillSelected
Sets the value of the property textFillSelected.- Property description:
-
getTextFillSelected
Gets the value of the property textFillSelected.- Property description:
-
fontProperty
- See Also:
getFont(),setFont(Font)
-
setFont
Sets the value of the property font.- Property description:
-
getFont
Gets the value of the property font.- Property description:
-
glossyProperty
- See Also:
isGlossy(),setGlossy(boolean)
-
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:
isAutoFixText(),setAutoFixText(boolean)
-
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:
-