Class SubstanceRadioButtonMenuItemUI
- 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.substance.internal.ui.SubstanceRadioButtonMenuItemUI
-
- All Implemented Interfaces:
TransitionAwareUI,SubstanceMenu
public class SubstanceRadioButtonMenuItemUI extends BasicRadioButtonMenuItemUI implements SubstanceMenu, TransitionAwareUI
UI for radio button menu items in Substance look and feel.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicMenuItemUI
BasicMenuItemUI.MouseInputHandler
-
-
Field Summary
Fields Modifier and Type Field Description protected StateTransitionTrackerstateTransitionTrackerprotected MenuUtilities.MenuPropertyListenersubstanceMenuPropertyListenerListens on all changes to the underlying menu item.protected PropertyChangeListenersubstancePropertyListenerProperty change listener.protected RolloverMenuItemListenersubstanceRolloverListenerRollover listener.-
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 Constructor Description SubstanceRadioButtonMenuItemUI(JRadioButtonMenuItem menuItem)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ComponentUIcreateUI(JComponent comp)FontgetAcceleratorFont()Returns the font of the accelerator string ofthisUI delegate.IcongetArrowIcon()Returns the arrow icon ofthisUI delegate.JMenuItemgetAssociatedMenuItem()Returns the associated menu item.IcongetCheckIcon()Returns the checkmark icon ofthisUI delegate.intgetDefaultTextIconGap()Returns the default gap between the icon and the text forthisdelegate.protected DimensiongetPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults()protected voidinstallListeners()booleanisInside(MouseEvent me)Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.protected voidpaintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)protected voiduninstallListeners()-
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, update
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior
-
-
-
-
Field Detail
-
substanceRolloverListener
protected RolloverMenuItemListener substanceRolloverListener
Rollover listener.
-
stateTransitionTracker
protected StateTransitionTracker stateTransitionTracker
-
substancePropertyListener
protected PropertyChangeListener substancePropertyListener
Property change listener. Listens on changes toAbstractButton.MODEL_CHANGED_PROPERTYproperty.
-
substanceMenuPropertyListener
protected MenuUtilities.MenuPropertyListener substanceMenuPropertyListener
Listens on all changes to the underlying menu item.
-
-
Constructor Detail
-
SubstanceRadioButtonMenuItemUI
public SubstanceRadioButtonMenuItemUI(JRadioButtonMenuItem menuItem)
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent comp)
-
installListeners
protected void installListeners()
- Overrides:
installListenersin classBasicMenuItemUI
-
uninstallListeners
protected void uninstallListeners()
- Overrides:
uninstallListenersin classBasicMenuItemUI
-
installDefaults
protected void installDefaults()
- Overrides:
installDefaultsin classBasicMenuItemUI
-
getAssociatedMenuItem
public JMenuItem getAssociatedMenuItem()
Description copied from interface:SubstanceMenuReturns the associated menu item.- Specified by:
getAssociatedMenuItemin interfaceSubstanceMenu- Returns:
- The associated menu item.
-
getAcceleratorFont
public Font getAcceleratorFont()
Description copied from interface:SubstanceMenuReturns the font of the accelerator string ofthisUI delegate.- Specified by:
getAcceleratorFontin interfaceSubstanceMenu- Returns:
- The font of the accelerator string of
thisUI delegate.
-
getArrowIcon
public Icon getArrowIcon()
Description copied from interface:SubstanceMenuReturns the arrow icon ofthisUI delegate.- Specified by:
getArrowIconin interfaceSubstanceMenu- Returns:
- The arrow icon of
thisUI delegate.
-
getCheckIcon
public Icon getCheckIcon()
Description copied from interface:SubstanceMenuReturns the checkmark icon ofthisUI delegate.- Specified by:
getCheckIconin interfaceSubstanceMenu- Returns:
- The checkmark icon of
thisUI delegate.
-
getDefaultTextIconGap
public int getDefaultTextIconGap()
Description copied from interface:SubstanceMenuReturns the default gap between the icon and the text forthisdelegate.- Specified by:
getDefaultTextIconGapin interfaceSubstanceMenu- Returns:
- The default gap between the icon and the text for
thisdelegate.
-
getPreferredMenuItemSize
protected Dimension getPreferredMenuItemSize(JComponent c, Icon checkIcon, Icon arrowIcon, int defaultTextIconGap)
- Overrides:
getPreferredMenuItemSizein classBasicMenuItemUI
-
isInside
public boolean isInside(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(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap)
- Overrides:
paintMenuItemin classBasicMenuItemUI
-
-