Klasse ActivityBarRenderer<A extends Activity>

Bekannte direkte Unterklassen:
CompletableActivityRenderer

public class ActivityBarRenderer<A extends Activity> extends ActivityRenderer<A>
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.
  • Eigenschaftsdetails

  • Konstruktordetails

    • ActivityBarRenderer

      public ActivityBarRenderer(GraphicsBase<?> graphics, String name)
      Constructs an activity bar renderer and registers its bar and text styling properties for redraws.
      Parameter:
      graphics - the graphics control that uses this renderer
      name - 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:
      drawActivity in Klasse ActivityRenderer<A extends Activity>
      Parameter:
      activityRef - the activity reference to render
      position - the activity position
      gc - the graphics context
      x - the x coordinate
      y - the y coordinate
      w - the width
      h - the height
      selected - whether the activity is selected
      hover - whether the activity is hovered
      highlighted - whether the activity is highlighted
      pressed - 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:
      drawBackground in Klasse ActivityRenderer<A extends Activity>
      Parameter:
      activityRef - the activity reference to render
      position - the activity position
      gc - the graphics context
      x - the x coordinate
      y - the y coordinate
      w - the width
      h - the height
      selected - whether the activity is selected
      hover - whether the activity is hovered
      highlighted - whether the activity is highlighted
      pressed - 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:
      drawBorder in Klasse ActivityRenderer<A extends Activity>
      Parameter:
      activityRef - the activity reference to render
      position - the activity position
      gc - the graphics context
      x - the x coordinate
      y - the y coordinate
      w - the width
      h - the height
      selected - whether the activity is selected
      hover - whether the activity is hovered
      highlighted - whether the activity is highlighted
      pressed - 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 render
      text - the text to draw
      position - the text position
      gc - the graphics context
      x - the x coordinate
      y - the y coordinate
      w - the width
      h - the height
      selected - whether the activity is selected
      hover - whether the activity is hovered
      highlighted - whether the activity is highlighted
      pressed - 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 draw
      position - the text position
      availableWidth - the availble width of the entire activity
      Gibt zurück:
      true if the text can be drawn
      Seit:
      1.5
    • getTextFill

      protected Paint getTextFill(boolean selected, boolean hover, boolean highlighted, boolean pressed)
      Returns the text fill paint for the given activity state.
      Parameter:
      selected - whether the activity is selected
      hover - whether the activity is hovered
      highlighted - whether the activity is highlighted
      pressed - whether the activity is pressed
      Gibt zurück:
      the text fill paint to use
    • barHeightProperty

      public final DoubleProperty 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 der barHeight-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 der barHeight-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The barHeight property. Controls the height of the rendered activity bar inside the row.
      Parameter:
      height - Wert für die Eigenschaft barHeight
      Siehe auch:
    • textGapProperty

      public final DoubleProperty 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 der textGap-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textGap property. Controls the gap between the activity bar and its text.
      Parameter:
      gap - Wert für die Eigenschaft textGap
      Siehe auch:
    • getTextGap

      public final double getTextGap()
      Ruft den Wert der textGap-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

      public final ObjectProperty<Paint> textFillProperty()
      The textFill property. Defines the default text fill paint used for activity labels.
      Gibt zurück:
      the textFill property
      Siehe auch:
    • setTextFill

      public final void setTextFill(Paint fill)
      Legt den Wert der textFill-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textFill property. Defines the default text fill paint used for activity labels.
      Parameter:
      fill - Wert für die Eigenschaft textFill
      Siehe auch:
    • getTextFill

      public final Paint getTextFill()
      Ruft den Wert der textFill-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

      public final ObjectProperty<Paint> textFillHoverProperty()
      The textFillHover property. Defines the text fill paint used while an activity is hovered.
      Gibt zurück:
      the textFillHover property
      Siehe auch:
    • setTextFillHover

      public final void setTextFillHover(Paint fill)
      Legt den Wert der textFillHover-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textFillHover property. Defines the text fill paint used while an activity is hovered.
      Parameter:
      fill - Wert für die Eigenschaft textFillHover
      Siehe auch:
    • getTextFillHover

      public final Paint getTextFillHover()
      Ruft den Wert der textFillHover-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

      public final ObjectProperty<Paint> textFillHighlightProperty()
      The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.
      Gibt zurück:
      the textFillHighlight property
      Siehe auch:
    • setTextFillHighlight

      public final void setTextFillHighlight(Paint fill)
      Legt den Wert der textFillHighlight-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textFillHighlight property. Defines the text fill paint used while an activity is highlighted.
      Parameter:
      fill - Wert für die Eigenschaft textFillHighlight
      Siehe auch:
    • getTextFillHighlight

      public final Paint getTextFillHighlight()
      Ruft den Wert der textFillHighlight-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

      public final ObjectProperty<Paint> textFillPressedProperty()
      The textFillPressed property. Defines the text fill paint used while an activity is pressed.
      Gibt zurück:
      the textFillPressed property
      Siehe auch:
    • setTextFillPressed

      public final void setTextFillPressed(Paint fill)
      Legt den Wert der textFillPressed-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textFillPressed property. Defines the text fill paint used while an activity is pressed.
      Parameter:
      fill - Wert für die Eigenschaft textFillPressed
      Siehe auch:
    • getTextFillPressed

      public final Paint getTextFillPressed()
      Ruft den Wert der textFillPressed-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

      public final ObjectProperty<Paint> textFillSelectedProperty()
      The textFillSelected property. Defines the text fill paint used while an activity is selected.
      Gibt zurück:
      the textFillSelected property
      Siehe auch:
    • setTextFillSelected

      public final void setTextFillSelected(Paint fill)
      Legt den Wert der textFillSelected-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The textFillSelected property. Defines the text fill paint used while an activity is selected.
      Parameter:
      fill - Wert für die Eigenschaft textFillSelected
      Siehe auch:
    • getTextFillSelected

      public final Paint getTextFillSelected()
      Ruft den Wert der textFillSelected-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

      public final ObjectProperty<Font> fontProperty()
      The font property. Controls the font used to render activity text.
      Gibt zurück:
      the font property
      Siehe auch:
    • setFont

      public final void setFont(Font font)
      Legt den Wert der font-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The font property. Controls the font used to render activity text.
      Parameter:
      font - Wert für die Eigenschaft font
      Siehe auch:
    • getFont

      public final Font getFont()
      Ruft den Wert der font-Eigenschaft ab.
      Eigenschaftsbeschreibung:
      The font property. Controls the font used to render activity text.
      Gibt zurück:
      Wert der Eigenschaft font
      Siehe auch:
    • glossyProperty

      public final BooleanProperty 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 der glossy-Eigenschaft fest.
      Eigenschaftsbeschreibung:
      The glossy property. Controls whether a glossy highlight is painted on activity bars.
      Parameter:
      glossy - Wert für die Eigenschaft glossy
      Siehe auch:
    • isGlossy

      public final boolean isGlossy()
      Ruft den Wert der glossy-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

      public final BooleanProperty 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 der autoFixText-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 Eigenschaft autoFixText
      Siehe auch:
    • isAutoFixText

      public final boolean isAutoFixText()
      Ruft den Wert der autoFixText-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: