Package org.pushingpixels.substance.internal.ui

# 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 JToggleButton`
`button`
Associated toggle button.
`protected StateTransitionTracker`
`stateTransitionTracker`
`protected PropertyChangeListener`
`substancePropertyListener`
Property 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

Modifier and Type
Method
Description
`protected BasicButtonListener`
`createButtonListener(AbstractButton b)`
`static ComponentUI`
`createUI(JComponent comp)`
`Icon`
`getDefaultIcon()`
`static String`
`getMemoryUsage()`
Returns memory usage string.
`StateTransitionTracker`
`getTransitionTracker()`
Returns the model for tracking the transitions.
`protected void`
`installDefaults(AbstractButton b)`
`protected void`
`installListeners(AbstractButton b)`
`boolean`
`isInside(MouseEvent me)`
Checks whether the mouse position of the specified event lies inside the area of the component designated for transition effects.
`void`
`paint(Graphics g, JComponent c)`
`protected void`
`paintButtonText(Graphics g, AbstractButton button, Rectangle textRect, String text)`
Paints the text.
`protected void`
`uninstallListeners(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### substancePropertyListener

protected PropertyChangeListener substancePropertyListener
Property change listener. Listens on changes to `AbstractButton.MODEL_CHANGED_PROPERTY` property.

### button

protected JToggleButton button
Associated toggle button.

### stateTransitionTracker

protected StateTransitionTracker stateTransitionTracker

## Constructor Details

### SubstanceRadioButtonUI

public SubstanceRadioButtonUI(JToggleButton button)
Simple constructor.

Parameters:
  `button` - Associated radio button.

## Method Details

### installListeners

protected void installListeners(AbstractButton b)

Overrides:
  `installListeners` in class `BasicButtonUI`

### installDefaults

protected void installDefaults(AbstractButton b)

Overrides:
  `installDefaults` in class `BasicRadioButtonUI`

### uninstallListeners

protected void uninstallListeners(AbstractButton b)

Overrides:
  `uninstallListeners` in class `BasicButtonUI`

### createUI

public static ComponentUI createUI(JComponent comp)

### createButtonListener

protected BasicButtonListener createButtonListener(AbstractButton b)

Overrides:
  `createButtonListener` in class `BasicButtonUI`

### getDefaultIcon

public Icon getDefaultIcon()

Overrides:
  `getDefaultIcon` in class `BasicRadioButtonUI`

### paint

public void paint(Graphics g, JComponent c)

Overrides:
  `paint` in class `BasicRadioButtonUI`

### 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 context
  `button` - Button
  `textRect` - Text rectangle
  `text` - Text to paint

### isInside

public boolean isInside(MouseEvent me)
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 interface `TransitionAwareUI`
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.

### getTransitionTracker

public StateTransitionTracker getTransitionTracker()
Description copied from interface: `TransitionAwareUI`
Returns the model for tracking the transitions.

Specified by:
  `getTransitionTracker` in interface `TransitionAwareUI`
Returns:
  Model for tracking the transitions.