Class CompoundToolBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class CompoundToolBar extends JToolBar
The CompoundToolBar class combines two or more toolbars into one by "stealing" the buttons from the other toolbars for itself. Components are laid out left-to-right and separators are placed between component groups.
Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • CompoundToolBar

      public CompoundToolBar(JToolBar[] toolbars, boolean[] separators, boolean sameSize)
      Creates a new compound toolbar from the specified toolbars.
      Parameters:
      toolbars - the toolbars to combine.
      separators - the list of separator flags, true to put a separator after the toolbar, or false to put a space (not applicable to the last toolbar).
      sameSize - the same size flag, true to make all components the same size as the maximum size component.
  • Method Details

    • updateButtonSize

      public void updateButtonSize()
      Updates the button sizes of this toolbar after a button content change.
      Since:
      3.8.1
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.