Class ButtonBarFactory


  • public class ButtonBarFactory
    extends java.lang.Object
    Helper class for building button bars using ButtonBarLayout.
    • Constructor Detail

      • ButtonBarFactory

        public ButtonBarFactory()
    • Method Detail

      • createVerticalButtonBar

        public static javax.swing.JComponent createVerticalButtonBar​(java.awt.Component... buttons)
        Create a vertical button bar.
        Parameters:
        buttons - the buttons to add to the button bar
        Returns:
        the button bar
      • createVerticalButtonBar

        public static javax.swing.JComponent createVerticalButtonBar​(java.util.List<? extends java.awt.Component> components)
        Create a vertical button bar.
        Parameters:
        components - the components to add to the button bar
        Returns:
        the button bar
      • alignRight

        public ButtonBarFactory alignRight()
        Make the button bar right aligned.
        Returns:
        this factory
      • border

        public ButtonBarFactory border​(int top,
                                       int... borders)
        Set an empty border on the button bar. If only top is specified then it is used for all edges. If bottom is not specified then the value for top is used. If right is not specified then the value for left (or top) is used.
        Parameters:
        top - the top border width
        borders - the left, bottom, and right border widths
        Returns:
        this factory
      • addActions

        public ButtonBarFactory addActions​(java.util.Collection<? extends javax.swing.Action> actions)
      • addButtons

        public ButtonBarFactory addButtons​(java.util.Collection<? extends java.awt.Component> buttons)
      • get

        public javax.swing.JComponent get()