Class SubstanceRadioButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.basic.BasicButtonUI
-
- javax.swing.plaf.basic.BasicToggleButtonUI
-
- javax.swing.plaf.basic.BasicRadioButtonUI
-
- org.pushingpixels.substance.internal.ui.SubstanceRadioButtonUI
-
- All Implemented Interfaces:
TransitionAwareUI
- Direct Known Subclasses:
SubstanceCheckBoxUI
public class SubstanceRadioButtonUI extends BasicRadioButtonUI implements TransitionAwareUI
UI for radio buttons in Substance look and feel.
-
-
Field Summary
Fields Modifier and Type Field Description protected JToggleButtonbuttonAssociated toggle button.protected StateTransitionTrackerstateTransitionTrackerprotected PropertyChangeListenersubstancePropertyListenerProperty change listener.-
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
-
Constructor Summary
Constructors Constructor Description SubstanceRadioButtonUI(JToggleButton button)Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BasicButtonListenercreateButtonListener(AbstractButton b)static ComponentUIcreateUI(JComponent comp)IcongetDefaultIcon()static StringgetMemoryUsage()Returns memory usage string.StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults(AbstractButton b)protected voidinstallListeners(AbstractButton b)booleanisInside(MouseEvent me)Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.voidpaint(Graphics g, JComponent c)protected voidpaintButtonText(Graphics g, AbstractButton button, Rectangle textRect, String text)Paints the text.protected voiduninstallListeners(AbstractButton b)-
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getPreferredSize, getPropertyPrefix, paintFocus, uninstallDefaults
-
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Field Detail
-
substancePropertyListener
protected PropertyChangeListener substancePropertyListener
Property change listener. Listens on changes toAbstractButton.MODEL_CHANGED_PROPERTYproperty.
-
button
protected JToggleButton button
Associated toggle button.
-
stateTransitionTracker
protected StateTransitionTracker stateTransitionTracker
-
-
Constructor Detail
-
SubstanceRadioButtonUI
public SubstanceRadioButtonUI(JToggleButton button)
Simple constructor.- Parameters:
button- Associated radio button.
-
-
Method Detail
-
installListeners
protected void installListeners(AbstractButton b)
- Overrides:
installListenersin classBasicRadioButtonUI
-
installDefaults
protected void installDefaults(AbstractButton b)
- Overrides:
installDefaultsin classBasicRadioButtonUI
-
uninstallListeners
protected void uninstallListeners(AbstractButton b)
- Overrides:
uninstallListenersin classBasicRadioButtonUI
-
createUI
public static ComponentUI createUI(JComponent comp)
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b)
- Overrides:
createButtonListenerin classBasicButtonUI
-
getDefaultIcon
public Icon getDefaultIcon()
- Overrides:
getDefaultIconin classBasicRadioButtonUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicRadioButtonUI
-
getMemoryUsage
public static String getMemoryUsage()
Returns memory usage string.- Returns:
- Memory usage string.
-
paintButtonText
protected void paintButtonText(Graphics g, AbstractButton button, Rectangle textRect, String text)
Paints the text.- Parameters:
g- Graphic contextbutton- ButtontextRect- Text rectangletext- Text to paint
-
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.
-
-