Class HeaderStyle


  • public final class HeaderStyle
    extends java.lang.Object
    Describes the header styles for JMenuBar and JToolBar. Header styles are look-independent and can be shadowed by a look-dependent BorderStyle.
    Version:
    $Revision: 1.9 $
    See Also:
    BorderStyle
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private HeaderStyle​(java.lang.String name)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static HeaderStyle from​(javax.swing.JMenuBar menuBar)
      Looks up the client property for the HeaderStyle from the JToolBar.
      static HeaderStyle from​(javax.swing.JToolBar toolBar)
      Looks up the client property for the HeaderStyle from the JToolBar.
      private static HeaderStyle from0​(javax.swing.JComponent c)
      Looks up the client property for the HeaderStyle from the specified JComponent.
      java.lang.String toString()  
      private static HeaderStyle valueOf​(java.lang.String name)
      Looks up and answers the HeaderStyle with the specified name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
    • Constructor Detail

      • HeaderStyle

        private HeaderStyle​(java.lang.String name)
    • Method Detail

      • from

        public static HeaderStyle from​(javax.swing.JMenuBar menuBar)
        Looks up the client property for the HeaderStyle from the JToolBar.
        Parameters:
        menuBar - the menu bar to inspect
        Returns:
        the menu bar's header style
      • from

        public static HeaderStyle from​(javax.swing.JToolBar toolBar)
        Looks up the client property for the HeaderStyle from the JToolBar.
        Parameters:
        toolBar - the tool bar to inspect
        Returns:
        the tool bar's header style
      • from0

        private static HeaderStyle from0​(javax.swing.JComponent c)
        Looks up the client property for the HeaderStyle from the specified JComponent.
        Parameters:
        c - the component to inspect
        Returns:
        the header style for the given component
      • valueOf

        private static HeaderStyle valueOf​(java.lang.String name)
        Looks up and answers the HeaderStyle with the specified name.
        Parameters:
        name - the name of the HeaderStyle object to lookup
        Returns:
        the associated HeaderStyle
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object