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 Colorprotected Colorprotected Colorprotected ThemePainterprotected PropertyChangeListenerprotected ColorFields inherited from class com.jidesoft.plaf.metal.MetalMenuUI
changeListener, menuListener, propertyChangeListenerFields 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 MouseInputListenerprotected PropertyChangeListenerstatic ComponentUIprotected static voiddownButtonPressed(JMenu menu) protected RectanglegetButtonRect(JComponent c, int orientation, int width, int height) Gets the bounds for the button part of theJideSplitButton.protected RectanglegetDropDownRect(JComponent c, int orientation, int width, int height) Gets the bounds for the drop down part of theJideSplitButton.protected static ContainergetInputMap(int condition, JComponent c) Returns the InputMap for conditioncondition.protected intprotected Stringprotected intprotected voidprotected voidprotected voidprotected booleanisAlwaysDropdown(JMenuItem menuItem) static voidPopulates Buttons actions.protected voidpaintArrow(JMenuItem menuItem, Graphics g) protected voidpaintBackground(Graphics g, JMenuItem menuItem, Color bgColor) Draws the background of the menu item.protected voidprotected voidRenders the text of the current menu item.protected voidprotected voidprotected voidprotected voidMethods inherited from class com.jidesoft.plaf.metal.MetalMenuUI
appendPath, createActionMap, createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createPropertyChangeListener, getActionMap, isMouseOver, setMouseOver, setupPostTimerMethods inherited from class com.jidesoft.plaf.metal.MetalMenuItemUI
createInputMap, doClick, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, updateMethods 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:
getPropertyPrefixin classMetalMenuUI
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaultsin classMetalMenuUI
-
uninstallDefaults
protected void uninstallDefaults()- Overrides:
uninstallDefaultsin classMetalMenuUI
-
installListeners
protected void installListeners()- Overrides:
installListenersin classMetalMenuUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListenersin 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:
installKeyboardActionsin classMetalMenuUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()- Overrides:
uninstallKeyboardActionsin classMetalMenuUI
-
createMouseInputListener
- Overrides:
createMouseInputListenerin classMetalMenuUI
-
paintBackground
Description copied from class:MetalMenuUIDraws the background of the menu item.- Overrides:
paintBackgroundin 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 theJideSplitButtonheight- 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 theJideSplitButtonheight- the height of theJideSplitButton.- Returns:
- the bounds for the button part of the
JideSplitButton.
-
paintText
Description copied from class:MetalMenuItemUIRenders the text of the current menu item.- Overrides:
paintTextin classMetalMenuItemUI- Parameters:
g- graphics contextmenuItem- menu item to rendertextRect- bounding rectangle for rendering the texttext- string to render
-
getMinimumSize
- Overrides:
getMinimumSizein classMetalMenuItemUI
-
getPreferredSize
- Overrides:
getPreferredSizein classMetalMenuUI
-
getMaximumSize
- Overrides:
getMaximumSizein classMetalMenuUI
-
paintIcon
-
getOffset
protected int getOffset() -
isAlwaysDropdown
-
loadActionMap
Populates Buttons actions.- Parameters:
map- the action map to load
-
updateMnemonicBinding
protected void updateMnemonicBinding()- Overrides:
updateMnemonicBindingin classMetalMenuUI
-
downButtonPressed
-
getFirstParentMenuElement
-
getRightMargin
protected int getRightMargin()- Overrides:
getRightMarginin classMetalMenuItemUI
-