Class CellRendererProgress.Builder<B extends CellRendererProgress.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
Orientable.Builder<B>, BuilderInterface
Enclosing class:
CellRendererProgress

public static class CellRendererProgress.Builder<B extends CellRendererProgress.Builder<B>> extends CellRenderer.Builder<B> implements Orientable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public CellRendererProgress build()
      Finish building the CellRendererProgress object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to CellRendererProgress.
      Overrides:
      build in class CellRenderer.Builder<B extends CellRendererProgress.Builder<B>>
      Returns:
      a new instance of CellRendererProgress with the properties that were set in the Builder object.
    • setInverted

      public B setInverted(boolean inverted)
      Whether progess is inverted.
      Parameters:
      inverted - the value for the inverted property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setPulse

      public B setPulse(int pulse)

      Setting this to a non-negative value causes the cell renderer to enter "activity mode", where a block bounces back and forth to indicate that some progress is made, without specifying exactly how much.

      Each increment of the property causes the block to move by a little bit.

      To indicate that the activity has not started yet, set the property to zero. To indicate completion, set the property to G_MAXINT.

      Parameters:
      pulse - the value for the pulse property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setText

      public B setText(String text)
      The "text" property determines the label which will be drawn over the progress bar. Setting this property to null causes the default label to be displayed. Setting this property to an empty string causes no label to be displayed.
      Parameters:
      text - the value for the text property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTextXalign

      public B setTextXalign(float textXalign)
      The "text-xalign" property controls the horizontal alignment of the text in the progress bar. Valid values range from 0 (left) to 1 (right). Reserved for RTL layouts.
      Parameters:
      textXalign - the value for the text-xalign property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setTextYalign

      public B setTextYalign(float textYalign)
      The "text-yalign" property controls the vertical alignment of the text in the progress bar. Valid values range from 0 (top) to 1 (bottom).
      Parameters:
      textYalign - the value for the text-yalign property
      Returns:
      the Builder instance is returned, to allow method chaining
    • setValue

      public B setValue(int value)
      The "value" property determines the percentage to which the progress bar will be "filled in".
      Parameters:
      value - the value for the value property
      Returns:
      the Builder instance is returned, to allow method chaining