Overview
Package
Class
Use
Tree
Deprecated
Index
All Classes
Help
Prev Class
Next Class
VAquaClient - Release 1
Class org.violetlib.vaquaclient.SegmentedControlBuilder
Inherited members: ShowHide
Deprecated: ShowHide
org.violetlib.vaquaclient

Class SegmentedControlBuilder

  • Object
    • SegmentedControlBuilder
  • public class SegmentedControlBuilder extends Object
    Assemble a horizontal collection of buttons with the appropriate client properties to be displayed as a segmented control when using the Aqua or VAqua look and feel on macOS. In other circumstances, ordinary buttons will be used and separated horizontally by a specified distance. The displayed order depends upon the component orientation and is updated automatically.
    • Fields 
      Modifier and Type Field and Description
      Ordinary member indicator GRADIENT Reveal DetailHide Detail
      static String GRADIENT
       
      public static final String GRADIENT
      Ordinary member indicator LARGE Reveal DetailHide Detail
      static String LARGE
       
      public static final String LARGE
      Ordinary member indicator MINI Reveal DetailHide Detail
      static String MINI
       
      public static final String MINI
      Ordinary member indicator REGULAR Reveal DetailHide Detail
      static String REGULAR
       
      public static final String REGULAR
      Ordinary member indicator ROUND_RECT Reveal DetailHide Detail
      static String ROUND_RECT
       
      public static final String ROUND_RECT
      Ordinary member indicator SEPARATED Reveal DetailHide Detail
      static String SEPARATED
       
      public static final String SEPARATED
      Ordinary member indicator SMALL Reveal DetailHide Detail
      static String SMALL
       
      public static final String SMALL
      Ordinary member indicator TEXTURED Reveal DetailHide Detail
      static String TEXTURED
       
      public static final String TEXTURED
      Ordinary member indicator TEXTURED_SEPARATED Reveal DetailHide Detail
      static String TEXTURED_SEPARATED
       
      public static final String TEXTURED_SEPARATED
    • Constructors 
      Constructor and Description
      Ordinary member indicator SegmentedControlBuilder Reveal DetailHide Detail
      SegmentedControlBuilder(String style, boolean isExclusive, String controlSize, int defaultSeparation)
      Create a builder of a segmented control.
      public SegmentedControlBuilder(String style, boolean isExclusive, String controlSize, int defaultSeparation)
      Create a builder of a segmented control. The builder can be used only once.
      Parameters:
      style - The segmented control style, or null to use a default style. The supported styles are: TEXTURED, SEPARATED, TEXTURED_SEPARATED, ROUND_RECT, and GRADIENT. See the VAqua documentation for information on the these styles.
      isExclusive - True to ensure that exactly one button is selected at any time; false to allow any number of buttons to be selected or to allow ordinary push buttons. When this parameter is true, only toggle buttons may be added to the control; otherwise, this parameter has no effect if there are fewer than two buttons.
      controlSize - A specification of the control size. Available sizes are LARGE, REGULAR, SMALL, and MINI. The supported combinations of style and size depend upon the macOS release. If null, the regular size is used.
      defaultSeparation - The horizontal separation between buttons to use when not using the Aqua or VAqua look and feel.
    • Methods 
      Modifier and Type Method and Description
      Ordinary member indicator add Reveal DetailHide Detail
      void add(JButton b)
      Add a push button to the collection.
      public void add(JButton b)
      Add a push button to the collection. This operation is not supported if the control is exclusive.
      Ordinary member indicator add Reveal DetailHide Detail
      void add(JToggleButton b)
      Add a toggle button to the collection.
      public void add(JToggleButton b)
      Add a toggle button to the collection.
      Ordinary member indicator build Reveal DetailHide Detail
      JPanel build()
      Create and return the segmented control component.
      public JPanel build()
      Create and return the segmented control component.
      • Methods inherited from class Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait