Class RadianceMenuUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.MenuItemUI
javax.swing.plaf.basic.BasicMenuItemUI
javax.swing.plaf.basic.BasicMenuUI
org.pushingpixels.radiance.theming.internal.ui.RadianceMenuUI
- All Implemented Interfaces:
TransitionAwareUI
,RadianceMenu
UI for menus in Radiance look and feel.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuUI
BasicMenuUI.ChangeHandler, BasicMenuUI.MouseInputHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FocusListener
For rollover effects - enhancement 93.Listens on all changes to the underlying menu item.private MouseListener
For rollover effects - enhancement 93.private PropertyChangeListener
Property change listener.private StateTransitionTracker
Fields inherited from class javax.swing.plaf.basic.BasicMenuUI
changeListener, menuListener
Fields inherited from class javax.swing.plaf.basic.BasicMenuItemUI
acceleratorDelimiter, acceleratorFont, acceleratorForeground, acceleratorSelectionForeground, arrowIcon, checkIcon, defaultTextIconGap, disabledForeground, menuDragMouseListener, menuItem, menuKeyListener, mouseInputListener, oldBorderPainted, propertyChangeListener, selectionBackground, selectionForeground
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentUI
createUI
(JComponent comp) Returns the font of the accelerator string ofthis
UI delegate.Returns the arrow icon ofthis
UI delegate.Returns the associated menu item.Returns the checkmark icon ofthis
UI delegate.int
Returns the default gap between the icon and the text forthis
delegate.protected Dimension
getPreferredMenuItemSize
(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) Returns the model for tracking the transitions.protected void
protected void
boolean
isInside
(MouseEvent me) Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.protected void
paintMenuItem
(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) protected void
void
update
(Graphics g, JComponent c) void
Methods inherited from class javax.swing.plaf.basic.BasicMenuUI
createChangeListener, createMenuDragMouseListener, createMenuKeyListener, createMenuListener, createMouseInputListener, createPropertyChangeListener, getMaximumSize, getPropertyPrefix, installKeyboardActions, setupPostTimer, uninstallDefaults, uninstallKeyboardActions
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
doClick, getMinimumSize, getPath, getPreferredSize, installComponents, installUI, paint, paintBackground, paintText, uninstallComponents, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
Field Details
-
radianceMouseListener
For rollover effects - enhancement 93. -
stateTransitionTracker
-
radianceMenuPropertyListener
Listens on all changes to the underlying menu item. -
radiancePropertyListener
Property change listener. Listens on changes toAbstractButton.MODEL_CHANGED_PROPERTY
property. -
radianceFocusListener
For rollover effects - enhancement 93.
-
-
Constructor Details
-
RadianceMenuUI
-
-
Method Details
-
createUI
-
installDefaults
protected void installDefaults()- Overrides:
installDefaults
in classBasicMenuUI
-
installListeners
protected void installListeners()- Overrides:
installListeners
in classBasicMenuUI
-
uninstallListeners
protected void uninstallListeners()- Overrides:
uninstallListeners
in classBasicMenuUI
-
getAssociatedMenuItem
Description copied from interface:RadianceMenu
Returns the associated menu item.- Specified by:
getAssociatedMenuItem
in interfaceRadianceMenu
- Returns:
- The associated menu item.
-
getAcceleratorFont
Description copied from interface:RadianceMenu
Returns the font of the accelerator string ofthis
UI delegate.- Specified by:
getAcceleratorFont
in interfaceRadianceMenu
- Returns:
- The font of the accelerator string of
this
UI delegate.
-
getArrowIcon
Description copied from interface:RadianceMenu
Returns the arrow icon ofthis
UI delegate.- Specified by:
getArrowIcon
in interfaceRadianceMenu
- Returns:
- The arrow icon of
this
UI delegate.
-
getCheckIcon
Description copied from interface:RadianceMenu
Returns the checkmark icon ofthis
UI delegate.- Specified by:
getCheckIcon
in interfaceRadianceMenu
- Returns:
- The checkmark icon of
this
UI delegate.
-
getDefaultTextIconGap
public int getDefaultTextIconGap()Description copied from interface:RadianceMenu
Returns the default gap between the icon and the text forthis
delegate.- Specified by:
getDefaultTextIconGap
in interfaceRadianceMenu
- Returns:
- The default gap between the icon and the text for
this
delegate.
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap) - Overrides:
getPreferredMenuItemSize
in classBasicMenuItemUI
-
paintMenuItem
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) - Overrides:
paintMenuItem
in classBasicMenuItemUI
-
getTransitionTracker
Description copied from interface:TransitionAwareUI
Returns the model for tracking the transitions.- Specified by:
getTransitionTracker
in interfaceTransitionAwareUI
- Returns:
- Model for tracking the transitions.
-
isInside
Description copied from interface:TransitionAwareUI
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInside
in interfaceTransitionAwareUI
- Parameters:
me
- Mouse event.- Returns:
true
if the mouse position of the specified event lies inside the area of the component designated for transition effects,false
otherwise.
-
update
- Overrides:
update
in classBasicMenuItemUI
-
updateCheckIconIfNeeded
public void updateCheckIconIfNeeded()- Specified by:
updateCheckIconIfNeeded
in interfaceRadianceMenu
-