public class MetalJideSplitButtonUI extends MetalMenuUI
Modifier and Type | Class | Description |
---|---|---|
protected class |
MetalJideSplitButtonUI.MouseInputHandler |
MetalMenuUI.ChangeHandler
Modifier and Type | Field | Description |
---|---|---|
protected Color |
_darkShadowColor |
|
protected Color |
_highlight |
|
protected Color |
_lightHighlightColor |
|
protected ThemePainter |
_painter |
|
protected PropertyChangeListener |
_propertyChangeListener |
|
protected Color |
_shadowColor |
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
changeListener, menuListener, propertyChangeListener
Constructor | Description |
---|---|
MetalJideSplitButtonUI() |
Modifier and Type | Method | Description |
---|---|---|
protected MouseInputListener |
createMouseInputListener(JComponent c) |
|
protected PropertyChangeListener |
createSplitButtonPropertyChangeListener(JComponent c) |
|
static ComponentUI |
createUI(JComponent c) |
|
protected static void |
downButtonPressed(JMenu menu) |
|
protected Rectangle |
getButtonRect(JComponent c,
int orientation,
int width,
int height) |
Gets the bounds for the button part of the
JideSplitButton . |
protected Rectangle |
getDropDownRect(JComponent c,
int orientation,
int width,
int height) |
Gets the bounds for the drop down part of the
JideSplitButton . |
protected static Container |
getFirstParentMenuElement(Component comp) |
|
InputMap |
getInputMap(int condition,
JComponent c) |
Returns the InputMap for condition
condition . |
Dimension |
getMaximumSize(JComponent c) |
|
Dimension |
getMinimumSize(JComponent c) |
|
protected int |
getOffset() |
|
Dimension |
getPreferredSize(JComponent c) |
|
protected String |
getPropertyPrefix() |
|
protected int |
getRightMargin() |
|
protected void |
installDefaults() |
|
protected void |
installKeyboardActions() |
|
protected void |
installListeners() |
|
protected boolean |
isAlwaysDropdown(JMenuItem menuItem) |
|
static void |
loadActionMap(LazyActionMap map) |
Populates Buttons actions.
|
protected void |
paintArrow(JMenuItem menuItem,
Graphics g) |
|
protected void |
paintBackground(Graphics g,
JMenuItem menuItem,
Color bgColor) |
Draws the background of the menu item.
|
protected void |
paintIcon(JMenuItem b,
Graphics g) |
|
protected void |
paintText(Graphics g,
JMenuItem menuItem,
Rectangle textRect,
String text) |
Renders the text of the current menu item.
|
protected void |
uninstallDefaults() |
|
protected void |
uninstallKeyboardActions() |
|
protected void |
uninstallListeners() |
|
protected void |
updateMnemonicBinding() |
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
createInputMap, doClick, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, update
appendPath, createActionMap, createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createPropertyChangeListener, getActionMap, isMouseOver, setMouseOver, setupPostTimer
protected ThemePainter _painter
protected Color _shadowColor
protected Color _darkShadowColor
protected Color _highlight
protected Color _lightHighlightColor
protected PropertyChangeListener _propertyChangeListener
protected String getPropertyPrefix()
getPropertyPrefix
in class MetalMenuUI
public static ComponentUI createUI(JComponent c)
protected void installDefaults()
installDefaults
in class MetalMenuUI
protected void uninstallDefaults()
uninstallDefaults
in class MetalMenuUI
protected void installListeners()
installListeners
in class MetalMenuUI
protected void uninstallListeners()
uninstallListeners
in class MetalMenuUI
protected PropertyChangeListener createSplitButtonPropertyChangeListener(JComponent c)
public InputMap getInputMap(int condition, JComponent c)
condition
. Called as part of
installKeyboardActions
.condition
- the conditionc
- the componentprotected void installKeyboardActions()
installKeyboardActions
in class MetalMenuUI
protected void uninstallKeyboardActions()
uninstallKeyboardActions
in class MetalMenuUI
protected MouseInputListener createMouseInputListener(JComponent c)
createMouseInputListener
in class MetalMenuUI
protected void paintBackground(Graphics g, JMenuItem menuItem, Color bgColor)
MetalMenuUI
paintBackground
in class MetalMenuUI
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background colorprotected Rectangle getDropDownRect(JComponent c, int orientation, int width, int height)
JideSplitButton
.c
- the component. In this case, it is the JideSplitButton
.orientation
- the orientation.width
- the width of the JideSplitButton
height
- the height of the JideSplitButton
.JideSplitButton
.protected Rectangle getButtonRect(JComponent c, int orientation, int width, int height)
JideSplitButton
.c
- the component. In this case, it is the JideSplitButton
.orientation
- the orientation.width
- the width of the JideSplitButton
height
- the height of the JideSplitButton
.JideSplitButton
.protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text)
MetalMenuItemUI
paintText
in class MetalMenuItemUI
g
- graphics contextmenuItem
- menu item to rendertextRect
- bounding rectangle for rendering the texttext
- string to renderpublic Dimension getMinimumSize(JComponent c)
getMinimumSize
in class MetalMenuItemUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class MetalMenuUI
public Dimension getMaximumSize(JComponent c)
getMaximumSize
in class MetalMenuUI
protected int getOffset()
protected boolean isAlwaysDropdown(JMenuItem menuItem)
public static void loadActionMap(LazyActionMap map)
map
- the action map to loadprotected void updateMnemonicBinding()
updateMnemonicBinding
in class MetalMenuUI
protected static void downButtonPressed(JMenu menu)
protected int getRightMargin()
getRightMargin
in class MetalMenuItemUI