Package com.jidesoft.plaf.eclipse
Class EclipseJideSplitButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.MenuItemUI
-
- com.jidesoft.plaf.eclipse.EclipseMenuItemUI
-
- com.jidesoft.plaf.eclipse.EclipseMenuUI
-
- com.jidesoft.plaf.eclipse.EclipseJideSplitButtonUI
-
public class EclipseJideSplitButtonUI extends EclipseMenuUI
EclipseJideSplitButtonUI implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classEclipseJideSplitButtonUI.MouseInputHandler-
Nested classes/interfaces inherited from class com.jidesoft.plaf.eclipse.EclipseMenuUI
EclipseMenuUI.ChangeHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Color_darkShadowColorprotected java.awt.Color_highlightprotected java.awt.Color_lightHighlightColorprotected ThemePainter_painterprotected java.awt.Color_shadowColorprotected int_splitButtonMarginprotected int_splitButtonMarginOnMenu-
Fields inherited from class com.jidesoft.plaf.eclipse.EclipseMenuUI
changeListener, menuListener, propertyChangeListener
-
Fields inherited from class com.jidesoft.plaf.eclipse.EclipseMenuItemUI
acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultAccelEndGap, defaultShadowWidth, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, selectionBackground, selectionForeground, shadowColor
-
-
Constructor Summary
Constructors Constructor Description EclipseJideSplitButtonUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.event.MouseInputListenercreateMouseInputListener(javax.swing.JComponent c)static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)protected static voiddownButtonPressed(javax.swing.JMenu menu)protected java.awt.RectanglegetButtonRect(javax.swing.JComponent c, int orientation, int width, int height)Gets the bounds for the button part of theJideSplitButton.protected java.awt.RectanglegetDropDownRect(javax.swing.JComponent c, int orientation, int width, int height)Gets the bounds for the drop down part of theJideSplitButton.protected static java.awt.ContainergetFirstParentMenuElement(java.awt.Component comp)javax.swing.InputMapgetInputMap(int condition, javax.swing.JComponent c)Returns the InputMap for conditioncondition.java.awt.DimensiongetMaximumSize(javax.swing.JComponent c)java.awt.DimensiongetMinimumSize(javax.swing.JComponent c)protected intgetOffset()java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)protected java.lang.StringgetPropertyPrefix()protected voidinstallDefaults()protected voidinstallKeyboardActions()protected voidinstallListeners()static voidloadActionMap(LazyActionMap map)Populates Buttons actions.protected voidpaintArrow(javax.swing.JMenuItem menuItem, java.awt.Graphics g)protected voidpaintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)Draws the background of the menu item.protected voidpaintIcon(javax.swing.JMenuItem b, java.awt.Graphics g)protected voidpaintRaised2Border(java.awt.Graphics g, java.awt.Rectangle b)protected voidpaintRaisedBorder(java.awt.Graphics g, java.awt.Rectangle b)protected voidpaintSunken2Border(java.awt.Graphics g, java.awt.Rectangle b)protected voidpaintSunkenBorder(java.awt.Graphics g, java.awt.Rectangle b)protected voiduninstallDefaults()protected voiduninstallKeyboardActions()protected voiduninstallListeners()protected voidupdateMnemonicBinding()-
Methods inherited from class com.jidesoft.plaf.eclipse.EclipseMenuUI
appendPath, createActionMap, createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createPropertyChangeListener, getActionMap, isMouseOver, paintText, setMouseOver, setupPostTimer
-
Methods inherited from class com.jidesoft.plaf.eclipse.EclipseMenuItemUI
createInputMap, doClick, getPainter, getPath, getPreferredMenuItemSize, installComponents, installUI, isDownArrowVisible, paint, paintMenuItem, uninstallComponents, uninstallUI, update
-
-
-
-
Field Detail
-
_painter
protected ThemePainter _painter
-
_shadowColor
protected java.awt.Color _shadowColor
-
_darkShadowColor
protected java.awt.Color _darkShadowColor
-
_highlight
protected java.awt.Color _highlight
-
_lightHighlightColor
protected java.awt.Color _lightHighlightColor
-
_splitButtonMargin
protected int _splitButtonMargin
-
_splitButtonMarginOnMenu
protected int _splitButtonMarginOnMenu
-
-
Method Detail
-
getPropertyPrefix
protected java.lang.String getPropertyPrefix()
- Overrides:
getPropertyPrefixin classEclipseMenuUI
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classEclipseMenuUI
-
uninstallDefaults
protected void uninstallDefaults()
- Overrides:
uninstallDefaultsin classEclipseMenuUI
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classEclipseMenuUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classEclipseMenuUI
-
getInputMap
public javax.swing.InputMap getInputMap(int condition, javax.swing.JComponent c)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 classEclipseMenuUI
-
uninstallKeyboardActions
protected void uninstallKeyboardActions()
- Overrides:
uninstallKeyboardActionsin classEclipseMenuUI
-
createMouseInputListener
protected javax.swing.event.MouseInputListener createMouseInputListener(javax.swing.JComponent c)
- Overrides:
createMouseInputListenerin classEclipseMenuUI
-
getButtonRect
protected java.awt.Rectangle getButtonRect(javax.swing.JComponent c, int orientation, int width, int height)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.
-
getDropDownRect
protected java.awt.Rectangle getDropDownRect(javax.swing.JComponent c, int orientation, int width, int height)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.
-
paintSunkenBorder
protected void paintSunkenBorder(java.awt.Graphics g, java.awt.Rectangle b)
-
paintSunken2Border
protected void paintSunken2Border(java.awt.Graphics g, java.awt.Rectangle b)
-
paintRaisedBorder
protected void paintRaisedBorder(java.awt.Graphics g, java.awt.Rectangle b)
-
paintRaised2Border
protected void paintRaised2Border(java.awt.Graphics g, java.awt.Rectangle b)
-
paintBackground
protected void paintBackground(java.awt.Graphics g, javax.swing.JMenuItem menuItem, java.awt.Color bgColor)Description copied from class:EclipseMenuUIDraws the background of the menu item.- Overrides:
paintBackgroundin classEclipseMenuUI- Parameters:
g- the paint graphicsmenuItem- menu item to be paintedbgColor- selection background color
-
paintArrow
protected void paintArrow(javax.swing.JMenuItem menuItem, java.awt.Graphics g)
-
getMinimumSize
public java.awt.Dimension getMinimumSize(javax.swing.JComponent c)
- Overrides:
getMinimumSizein classEclipseMenuItemUI
-
getMaximumSize
public java.awt.Dimension getMaximumSize(javax.swing.JComponent c)
- Overrides:
getMaximumSizein classEclipseMenuUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classEclipseMenuUI
-
paintIcon
protected void paintIcon(javax.swing.JMenuItem b, java.awt.Graphics g)
-
getOffset
protected int getOffset()
-
loadActionMap
public static void loadActionMap(LazyActionMap map)
Populates Buttons actions.- Parameters:
map- the action map to load
-
updateMnemonicBinding
protected void updateMnemonicBinding()
- Overrides:
updateMnemonicBindingin classEclipseMenuUI
-
downButtonPressed
protected static void downButtonPressed(javax.swing.JMenu menu)
-
getFirstParentMenuElement
protected static java.awt.Container getFirstParentMenuElement(java.awt.Component comp)
-
-