Class RadianceRadioButtonMenuItemUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.MenuItemUI
-
- javax.swing.plaf.basic.BasicMenuItemUI
-
- javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
-
- org.pushingpixels.radiance.theming.internal.ui.RadianceRadioButtonMenuItemUI
-
- All Implemented Interfaces:
TransitionAwareUI,RadianceMenu
public class RadianceRadioButtonMenuItemUI extends javax.swing.plaf.basic.BasicRadioButtonMenuItemUI implements RadianceMenu, TransitionAwareUI
UI for radio button menu items in Radiance look and feel.
-
-
Field Summary
Fields Modifier and Type Field Description private MenuUtilities.MenuPropertyListenerradianceMenuPropertyListenerListens on all changes to the underlying menu item.private java.beans.PropertyChangeListenerradiancePropertyListenerProperty change listener.private RolloverMenuItemListenerradianceRolloverListenerRollover listener.private StateTransitionTrackerstateTransitionTracker-
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 Modifier Constructor Description protectedRadianceRadioButtonMenuItemUI(javax.swing.JRadioButtonMenuItem menuItem)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent comp)java.awt.FontgetAcceleratorFont()Returns the font of the accelerator string ofthisUI delegate.javax.swing.IcongetArrowIcon()Returns the arrow icon ofthisUI delegate.javax.swing.JMenuItemgetAssociatedMenuItem()Returns the associated menu item.javax.swing.IcongetCheckIcon()Returns the checkmark icon ofthisUI delegate.intgetDefaultTextIconGap()Returns the default gap between the icon and the text forthisdelegate.protected java.awt.DimensiongetPreferredMenuItemSize(javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, int defaultTextIconGap)StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults()protected voidinstallListeners()booleanisInside(java.awt.event.MouseEvent me)Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.protected voidpaintMenuItem(java.awt.Graphics g, javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, java.awt.Color background, java.awt.Color foreground, int defaultTextIconGap)protected voiduninstallListeners()voidupdate(java.awt.Graphics g, javax.swing.JComponent c)voidupdateCheckIconIfNeeded()-
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonMenuItemUI
getPropertyPrefix, processMouseEvent
-
Methods inherited from class javax.swing.plaf.basic.BasicMenuItemUI
createMenuDragMouseListener, createMenuKeyListener, createMouseInputListener, createPropertyChangeListener, doClick, getMaximumSize, getMinimumSize, getPath, getPreferredSize, installComponents, installKeyboardActions, installUI, paint, paintBackground, paintText, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallUI
-
-
-
-
Field Detail
-
radianceRolloverListener
private RolloverMenuItemListener radianceRolloverListener
Rollover listener.
-
stateTransitionTracker
private StateTransitionTracker stateTransitionTracker
-
radiancePropertyListener
private java.beans.PropertyChangeListener radiancePropertyListener
Property change listener. Listens on changes toAbstractButton.MODEL_CHANGED_PROPERTYproperty.
-
radianceMenuPropertyListener
private MenuUtilities.MenuPropertyListener radianceMenuPropertyListener
Listens on all changes to the underlying menu item.
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classjavax.swing.plaf.basic.BasicMenuItemUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classjavax.swing.plaf.basic.BasicMenuItemUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classjavax.swing.plaf.basic.BasicMenuItemUI
-
updateCheckIconIfNeeded
public void updateCheckIconIfNeeded()
- Specified by:
updateCheckIconIfNeededin interfaceRadianceMenu
-
getAssociatedMenuItem
public javax.swing.JMenuItem getAssociatedMenuItem()
Description copied from interface:RadianceMenuReturns the associated menu item.- Specified by:
getAssociatedMenuItemin interfaceRadianceMenu- Returns:
- The associated menu item.
-
getAcceleratorFont
public java.awt.Font getAcceleratorFont()
Description copied from interface:RadianceMenuReturns the font of the accelerator string ofthisUI delegate.- Specified by:
getAcceleratorFontin interfaceRadianceMenu- Returns:
- The font of the accelerator string of
thisUI delegate.
-
getArrowIcon
public javax.swing.Icon getArrowIcon()
Description copied from interface:RadianceMenuReturns the arrow icon ofthisUI delegate.- Specified by:
getArrowIconin interfaceRadianceMenu- Returns:
- The arrow icon of
thisUI delegate.
-
getCheckIcon
public javax.swing.Icon getCheckIcon()
Description copied from interface:RadianceMenuReturns the checkmark icon ofthisUI delegate.- Specified by:
getCheckIconin interfaceRadianceMenu- Returns:
- The checkmark icon of
thisUI delegate.
-
getDefaultTextIconGap
public int getDefaultTextIconGap()
Description copied from interface:RadianceMenuReturns the default gap between the icon and the text forthisdelegate.- Specified by:
getDefaultTextIconGapin interfaceRadianceMenu- Returns:
- The default gap between the icon and the text for
thisdelegate.
-
getPreferredMenuItemSize
protected java.awt.Dimension getPreferredMenuItemSize(javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, int defaultTextIconGap)- Overrides:
getPreferredMenuItemSizein classjavax.swing.plaf.basic.BasicMenuItemUI
-
isInside
public boolean isInside(java.awt.event.MouseEvent me)
Description copied from interface:TransitionAwareUIChecks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.- Specified by:
isInsidein interfaceTransitionAwareUI- Parameters:
me- Mouse event.- Returns:
trueif the mouse position of the specified event lies inside the area of the component designated for transition effects,falseotherwise.
-
getTransitionTracker
public StateTransitionTracker getTransitionTracker()
Description copied from interface:TransitionAwareUIReturns the model for tracking the transitions.- Specified by:
getTransitionTrackerin interfaceTransitionAwareUI- Returns:
- Model for tracking the transitions.
-
paintMenuItem
protected void paintMenuItem(java.awt.Graphics g, javax.swing.JComponent c, javax.swing.Icon checkIcon, javax.swing.Icon arrowIcon, java.awt.Color background, java.awt.Color foreground, int defaultTextIconGap)- Overrides:
paintMenuItemin classjavax.swing.plaf.basic.BasicMenuItemUI
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
updatein classjavax.swing.plaf.basic.BasicMenuItemUI
-
-