Class JToolBar.Separator

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants
Enclosing class:
JToolBar

public static class JToolBar.Separator extends JSeparator
A toolbar-specific separator, rendered as the same thin bar as JSeparator; its size is stored and read back but not rendered (R_layouts_close_enough).
See Also:
  • Constructor Details

    • Separator

      public Separator()
    • Separator

      public Separator(Dimension size)
  • Method Details

    • getUIClassID

      public String getUIClassID()
      Overrides:
      getUIClassID in class JSeparator
    • setSeparatorSize

      public void setSeparatorSize(Dimension size)
      null keeps the current size, and installs the L&F's 10×10 default only while there is none.

      On the desktop the default arrives through updateUI(), from the constructor, while the separator is still horizontal — and the L&F's width/height swap for a horizontal separator builds a plain Dimension, dropping the UIResource marker that would let a later reinstall replace it. So the default is installed once and then held like an app's own size.

    • getSeparatorSize

      public Dimension getSeparatorSize()
      Returns:
      the stored size itself, not a copy, as in the JDK
    • getMinimumSize

      public Dimension getMinimumSize()
      Overrides:
      getMinimumSize in class JComponent
    • getMaximumSize

      public Dimension getMaximumSize()
      Overrides:
      getMaximumSize in class JComponent
    • getPreferredSize

      public Dimension getPreferredSize()
      Overrides:
      getPreferredSize in class JComponent