Package docking.menu

# Class DockingMenuItemUI

java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
docking.menu.DockingMenuItemUI

Direct Known Subclasses:
  `DockingCheckboxMenuItemUI`, `DockingMenuUI`

public class DockingMenuItemUI extends MenuItemUI
This class exists to make menu items display content with proper alignment whether or not they are displaying an icon. That is, this class will introduce padding for absent icons within menu items so that the item lines up with those items that do contain icons.

This class has an additional feature that allows clients to display menu item content in a tabular fashion. A menu item using this UI can contain some combination of the of the following items, in the given order:

     [Checkbox][Icon][Menu Item Content][Menu Pull-right/Accelerator Text]

To display the Menu Item Content in a tabular fashion, use the `'\t'` character to delimit the data into columns. This class will align all menu items in the given menu based upon the largest number of columns in the group and the largest width for each column.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `DockingMenuItemUI.MenuTabulator`
  `static class`
  `DockingMenuItemUI.SwitchGraphics2D`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected MenuItemUI`
  `ui`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DockingMenuItemUI()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(JComponent c, int x, int y)`
  `static DockingMenuItemUI`
  `createUI(JComponent c)`
  `Accessible`
  `getAccessibleChild(JComponent c, int i)`
  `int`
  `getAccessibleChildrenCount(JComponent c)`
  `int`
  `getBaseline(JComponent c, int width, int height)`
  `Component.BaselineResizeBehavior`
  `getBaselineResizeBehavior(JComponent c)`
  `Dimension`
  `getMaximumSize(JComponent c)`
  `Dimension`
  `getMinimumSize(JComponent c)`
  `Dimension`
  `getPreferredSize(JComponent c)`
  `void`
  `installUI(JComponent c)`
  `void`
  `paint(Graphics g, JComponent c)`
  `void`
  `paintText(DockingMenuItemUI.SwitchGraphics2D sg, JMenuItem c, DockingMenuItemUI.MenuTabulator t)`
  `void`
  `uninstallUI(JComponent c)`
  `void`
  `update(Graphics g, JComponent c)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ui

    protected MenuItemUI ui

- ## Constructor Details

  - ### DockingMenuItemUI

    public DockingMenuItemUI()

- ## Method Details

  - ### createUI

    public static DockingMenuItemUI createUI(JComponent c)

  - ### installUI

    public void installUI(JComponent c)
    Overrides:
      `installUI` in class `ComponentUI`

  - ### uninstallUI

    public void uninstallUI(JComponent c)
    Overrides:
      `uninstallUI` in class `ComponentUI`

  - ### paint

    public void paint(Graphics g, JComponent c)
    Overrides:
      `paint` in class `ComponentUI`

  - ### update

    public void update(Graphics g, JComponent c)
    Overrides:
      `update` in class `ComponentUI`

  - ### paintText

    public void paintText(DockingMenuItemUI.SwitchGraphics2D sg, JMenuItem c, DockingMenuItemUI.MenuTabulator t)

  - ### getPreferredSize

    public Dimension getPreferredSize(JComponent c)
    Overrides:
      `getPreferredSize` in class `ComponentUI`

  - ### getMinimumSize

    public Dimension getMinimumSize(JComponent c)
    Overrides:
      `getMinimumSize` in class `ComponentUI`

  - ### getMaximumSize

    public Dimension getMaximumSize(JComponent c)
    Overrides:
      `getMaximumSize` in class `ComponentUI`

  - ### contains

    public boolean contains(JComponent c, int x, int y)
    Overrides:
      `contains` in class `ComponentUI`

  - ### getBaseline

    public int getBaseline(JComponent c, int width, int height)
    Overrides:
      `getBaseline` in class `ComponentUI`

  - ### getBaselineResizeBehavior

    public Component.BaselineResizeBehavior getBaselineResizeBehavior(JComponent c)
    Overrides:
      `getBaselineResizeBehavior` in class `ComponentUI`

  - ### getAccessibleChildrenCount

    public int getAccessibleChildrenCount(JComponent c)
    Overrides:
      `getAccessibleChildrenCount` in class `ComponentUI`

  - ### getAccessibleChild

    public Accessible getAccessibleChild(JComponent c, int i)
    Overrides:
      `getAccessibleChild` in class `ComponentUI`