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
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
Modifier and TypeClassDescriptionstatic class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(JComponent c, int x, int y) static DockingMenuItemUI
getAccessibleChild
(JComponent c, int i) int
int
getBaseline
(JComponent c, int width, int height) void
void
paint
(Graphics g, JComponent c) void
void
void
update
(Graphics g, JComponent c)
-
Field Details
-
ui
-
-
Constructor Details
-
DockingMenuItemUI
public DockingMenuItemUI()
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classComponentUI
-
uninstallUI
- Overrides:
uninstallUI
in classComponentUI
-
paint
- Overrides:
paint
in classComponentUI
-
update
- Overrides:
update
in classComponentUI
-
getPreferredSize
- Overrides:
getPreferredSize
in classComponentUI
-
getMinimumSize
- Overrides:
getMinimumSize
in classComponentUI
-
getMaximumSize
- Overrides:
getMaximumSize
in classComponentUI
-
contains
- Overrides:
contains
in classComponentUI
-
getBaseline
- Overrides:
getBaseline
in classComponentUI
-
getBaselineResizeBehavior
- Overrides:
getBaselineResizeBehavior
in classComponentUI
-
getAccessibleChildrenCount
- Overrides:
getAccessibleChildrenCount
in classComponentUI
-
getAccessibleChild
- Overrides:
getAccessibleChild
in classComponentUI
-