com.jidesoft.plaf.metal
Class MetalJideSplitButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
com.jidesoft.plaf.metal.MetalMenuItemUI
com.jidesoft.plaf.metal.MetalMenuUI
com.jidesoft.plaf.metal.MetalJideSplitButtonUI
public class MetalJideSplitButtonUI
- extends MetalMenuUI
MetalJideSplitButtonUI implementation
| Fields inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI |
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground |
|
Method Summary |
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()
|
| Methods inherited from class com.jidesoft.plaf.metal.MetalMenuUI |
appendPath, createActionMap, createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createPropertyChangeListener, getActionMap, isMouseOver, setMouseOver, setupPostTimer |
| Methods inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI |
createInputMap, doClick, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_painter
protected ThemePainter _painter
_shadowColor
protected Color _shadowColor
_darkShadowColor
protected Color _darkShadowColor
_highlight
protected Color _highlight
_lightHighlightColor
protected Color _lightHighlightColor
_propertyChangeListener
protected PropertyChangeListener _propertyChangeListener
MetalJideSplitButtonUI
public MetalJideSplitButtonUI()
getPropertyPrefix
protected String getPropertyPrefix()
- Overrides:
getPropertyPrefix in class MetalMenuUI
createUI
public static ComponentUI createUI(JComponent c)
installDefaults
protected void installDefaults()
- Overrides:
installDefaults in class MetalMenuUI
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaults in class MetalMenuUI
installListeners
protected void installListeners()
- Overrides:
installListeners in class MetalMenuUI
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListeners in class MetalMenuUI
createSplitButtonPropertyChangeListener
protected PropertyChangeListener createSplitButtonPropertyChangeListener(JComponent c)
getInputMap
public InputMap getInputMap(int condition,
JComponent c)
- Returns the InputMap for condition
condition. Called as part of
installKeyboardActions.
- Parameters:
condition - the conditionc - the component
- Returns:
- the input map.
installKeyboardActions
protected void installKeyboardActions()
- Overrides:
installKeyboardActions in class MetalMenuUI
uninstallKeyboardActions
protected void uninstallKeyboardActions()
- Overrides:
uninstallKeyboardActions in class MetalMenuUI
createMouseInputListener
protected MouseInputListener createMouseInputListener(JComponent c)
- Overrides:
createMouseInputListener in class MetalMenuUI
paintBackground
protected void paintBackground(Graphics g,
JMenuItem menuItem,
Color bgColor)
- Description copied from class:
MetalMenuUI
- Draws the background of the menu item.
- Overrides:
paintBackground in class MetalMenuUI
- Parameters:
g - the paint graphicsmenuItem - menu item to be paintedbgColor - selection background color
getDropDownRect
protected Rectangle getDropDownRect(JComponent c,
int orientation,
int width,
int height)
- Gets the bounds for the drop down part of the
JideSplitButton.
- Parameters:
c - the component. In this case, it is the JideSplitButton.orientation - the orientation.width - the width of the JideSplitButtonheight - the height of the JideSplitButton.
- Returns:
- the bounds for the drop down part of the
JideSplitButton.
paintArrow
protected void paintArrow(JMenuItem menuItem,
Graphics g)
getButtonRect
protected Rectangle getButtonRect(JComponent c,
int orientation,
int width,
int height)
- Gets the bounds for the button part of the
JideSplitButton.
- Parameters:
c - the component. In this case, it is the JideSplitButton.orientation - the orientation.width - the width of the JideSplitButtonheight - the height of the JideSplitButton.
- Returns:
- the bounds for the button part of the
JideSplitButton.
paintText
protected void paintText(Graphics g,
JMenuItem menuItem,
Rectangle textRect,
String text)
- Description copied from class:
MetalMenuItemUI
- Renders the text of the current menu item.
- Overrides:
paintText in class MetalMenuItemUI
- Parameters:
g - graphics contextmenuItem - menu item to rendertextRect - bounding rectangle for rendering the texttext - string to render
getMinimumSize
public Dimension getMinimumSize(JComponent c)
- Overrides:
getMinimumSize in class MetalMenuItemUI
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSize in class MetalMenuUI
getMaximumSize
public Dimension getMaximumSize(JComponent c)
- Overrides:
getMaximumSize in class MetalMenuUI
paintIcon
protected void paintIcon(JMenuItem b,
Graphics g)
getOffset
protected int getOffset()
isAlwaysDropdown
protected boolean isAlwaysDropdown(JMenuItem menuItem)
loadActionMap
public static void loadActionMap(LazyActionMap map)
- Populates Buttons actions.
- Parameters:
map - the action map to load
updateMnemonicBinding
protected void updateMnemonicBinding()
- Overrides:
updateMnemonicBinding in class MetalMenuUI
downButtonPressed
protected static void downButtonPressed(JMenu menu)
getFirstParentMenuElement
protected static Container getFirstParentMenuElement(Component comp)
getRightMargin
protected int getRightMargin()
- Overrides:
getRightMargin in class MetalMenuItemUI