Package 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
MetalJideSplitButtonUI implementation
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.jidesoft.plaf.metal.MetalMenuUI
MetalMenuUI.ChangeHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Color
protected Color
protected Color
protected ThemePainter
protected PropertyChangeListener
protected Color
Fields inherited from class com.jidesoft.plaf.metal.MetalMenuUI
changeListener, menuListener, propertyChangeListener
Fields inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MouseInputListener
protected PropertyChangeListener
static ComponentUI
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 theJideSplitButton
.protected Rectangle
getDropDownRect
(JComponent c, int orientation, int width, int height) Gets the bounds for the drop down part of theJideSplitButton
.protected static Container
getInputMap
(int condition, JComponent c) Returns the InputMap for conditioncondition
.protected int
protected String
protected int
protected void
protected void
protected void
protected boolean
isAlwaysDropdown
(JMenuItem menuItem) static void
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
protected void
Renders the text of the current menu item.protected void
protected void
protected void
protected void
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 javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
_painter
-
_shadowColor
-
_darkShadowColor
-
_highlight
-
_lightHighlightColor
-
_propertyChangeListener
-
-
Constructor Details
-
MetalJideSplitButtonUI
public MetalJideSplitButtonUI()
-
-
Method Details
-
getPropertyPrefix
- Overrides:
getPropertyPrefix
in classMetalMenuUI
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classMetalMenuUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaults
in classMetalMenuUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classMetalMenuUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classMetalMenuUI
-
createSplitButtonPropertyChangeListener
-
getInputMap
Returns the InputMap for conditioncondition
. Called as part ofinstallKeyboardActions
.- Parameters:
condition
- the conditionc
- the component- Returns:
- the input map.
-
installKeyboardActions
protected void installKeyboardActions()- Overrides:
installKeyboardActions
in classMetalMenuUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActions
in classMetalMenuUI
-
createMouseInputListener
- Overrides:
createMouseInputListener
in classMetalMenuUI
-
paintBackground
Description copied from class:MetalMenuUI
Draws the background of the menu item.- Overrides:
paintBackground
in classMetalMenuUI
- Parameters:
g
- the paint graphicsmenuItem
- menu item to be paintedbgColor
- selection background color
-
getDropDownRect
Gets the bounds for the drop down part of theJideSplitButton
.- Parameters:
c
- the component. In this case, it is theJideSplitButton
.orientation
- the orientation.width
- the width of theJideSplitButton
height
- the height of theJideSplitButton
.- Returns:
- the bounds for the drop down part of the
JideSplitButton
.
-
paintArrow
-
getButtonRect
Gets the bounds for the button part of theJideSplitButton
.- Parameters:
c
- the component. In this case, it is theJideSplitButton
.orientation
- the orientation.width
- the width of theJideSplitButton
height
- the height of theJideSplitButton
.- Returns:
- the bounds for the button part of the
JideSplitButton
.
-
paintText
Description copied from class:MetalMenuItemUI
Renders the text of the current menu item.- Overrides:
paintText
in classMetalMenuItemUI
- Parameters:
g
- graphics contextmenuItem
- menu item to rendertextRect
- bounding rectangle for rendering the texttext
- string to render
-
getMinimumSize
- Overrides:
getMinimumSize
in classMetalMenuItemUI
-
getPreferredSize
- Overrides:
getPreferredSize
in classMetalMenuUI
-
getMaximumSize
- Overrides:
getMaximumSize
in classMetalMenuUI
-
paintIcon
-
getOffset
protected int getOffset() -
isAlwaysDropdown
-
loadActionMap
Populates Buttons actions.- Parameters:
map
- the action map to load
-
updateMnemonicBinding
protected void updateMnemonicBinding()- Overrides:
updateMnemonicBinding
in classMetalMenuUI
-
downButtonPressed
-
getFirstParentMenuElement
-
getRightMargin
protected int getRightMargin()- Overrides:
getRightMargin
in classMetalMenuItemUI
-