Module java.desktop

Class MetalToolBarUI

All Implemented Interfaces:
SwingConstants

public class MetalToolBarUI
extends BasicToolBarUI
A Metal Look and Feel implementation of ToolBarUI. This implementation is a "combined" view/controller.
  • Field Details

  • Constructor Details

    • MetalToolBarUI

      public MetalToolBarUI()
  • Method Details

    • createUI

      public static ComponentUI createUI​(JComponent c)
      Constructs an instance of MetalToolBarUI.
      Parameters:
      c - a component
      Returns:
      an instance of MetalToolBarUI
    • createContainerListener

      protected ContainerListener createContainerListener()
      Creates a container listener that will be added to the JToolBar. If this method returns null then it will not be added to the toolbar.
      Returns:
      an instance of a ContainerListener or null
    • createRolloverListener

      protected PropertyChangeListener createRolloverListener()
      Creates a property change listener that will be added to the JToolBar. If this method returns null then it will not be added to the toolbar.
      Returns:
      an instance of a PropertyChangeListener or null
    • setDragOffset

      protected void setDragOffset​(Point p)
      Sets the offset of the mouse cursor inside the DragWindow.
      Parameters:
      p - the offset
    • update

      public void update​(Graphics g, JComponent c)
      If necessary paints the background of the component, then invokes paint.
      Overrides:
      update in class ComponentUI
      Parameters:
      g - Graphics to paint to
      c - JComponent painting on
      Throws:
      NullPointerException - if g or c is null
      Since:
      1.5
      See Also:
      ComponentUI.update(java.awt.Graphics, javax.swing.JComponent), ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)