Class RadianceRadioButtonUI
- 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.radiance.theming.internal.ui.RadianceRadioButtonUI
-
- All Implemented Interfaces:
TransitionAwareUI
- Direct Known Subclasses:
RadianceCheckBoxUI
public class RadianceRadioButtonUI extends javax.swing.plaf.basic.BasicRadioButtonUI implements TransitionAwareUI
UI for radio buttons in Radiance look and feel.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) javax.swing.JToggleButton
button
Associated toggle button.private java.awt.Rectangle
iconRect
protected BladeColorScheme
mutableBorderColorScheme
protected BladeColorScheme
mutableFillColorScheme
protected BladeColorScheme
mutableMarkColorScheme
protected javax.swing.Icon
radianceIcon
private java.beans.PropertyChangeListener
radiancePropertyListener
Property change listener.(package private) StateTransitionTracker
stateTransitionTracker
private java.awt.Rectangle
textRect
private java.awt.Rectangle
viewRect
-
Constructor Summary
Constructors Constructor Description RadianceRadioButtonUI(javax.swing.JToggleButton button)
Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.plaf.basic.BasicButtonListener
createButtonListener(javax.swing.AbstractButton b)
static javax.swing.plaf.ComponentUI
createUI(javax.swing.JComponent comp)
javax.swing.Icon
getDefaultIcon()
java.awt.Dimension
getPreferredSize(javax.swing.JComponent c)
StateTransitionTracker
getTransitionTracker()
Returns the model for tracking the transitions.protected void
installDefaults(javax.swing.AbstractButton b)
protected void
installListeners(javax.swing.AbstractButton b)
boolean
isInside(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.void
paint(java.awt.Graphics g, javax.swing.JComponent c)
private void
paintButtonText(java.awt.Graphics g, javax.swing.AbstractButton button, java.awt.Rectangle textRect, java.lang.String text)
Paints the text.protected void
uninstallListeners(javax.swing.AbstractButton b)
void
update(java.awt.Graphics g, javax.swing.JComponent c)
protected void
updateIcon()
-
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
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
-
-
-
-
Field Detail
-
radiancePropertyListener
private java.beans.PropertyChangeListener radiancePropertyListener
Property change listener. Listens on changes toAbstractButton.MODEL_CHANGED_PROPERTY
property.
-
button
javax.swing.JToggleButton button
Associated toggle button.
-
stateTransitionTracker
StateTransitionTracker stateTransitionTracker
-
viewRect
private java.awt.Rectangle viewRect
-
iconRect
private java.awt.Rectangle iconRect
-
textRect
private java.awt.Rectangle textRect
-
radianceIcon
protected javax.swing.Icon radianceIcon
-
mutableFillColorScheme
protected BladeColorScheme mutableFillColorScheme
-
mutableBorderColorScheme
protected BladeColorScheme mutableBorderColorScheme
-
mutableMarkColorScheme
protected BladeColorScheme mutableMarkColorScheme
-
-
Method Detail
-
installListeners
protected void installListeners(javax.swing.AbstractButton b)
- Overrides:
installListeners
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
installDefaults
protected void installDefaults(javax.swing.AbstractButton b)
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
updateIcon
protected void updateIcon()
-
uninstallListeners
protected void uninstallListeners(javax.swing.AbstractButton b)
- Overrides:
uninstallListeners
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
-
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
- Overrides:
createButtonListener
in classjavax.swing.plaf.basic.BasicButtonUI
-
getDefaultIcon
public javax.swing.Icon getDefaultIcon()
- Overrides:
getDefaultIcon
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
paint
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
paintButtonText
private void paintButtonText(java.awt.Graphics g, javax.swing.AbstractButton button, java.awt.Rectangle textRect, java.lang.String text)
Paints the text.- Parameters:
g
- Graphic contextbutton
- ButtontextRect
- Text rectangletext
- Text to paint
-
isInside
public boolean isInside(java.awt.event.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 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.
-
getTransitionTracker
public StateTransitionTracker getTransitionTracker()
Description copied from interface:TransitionAwareUI
Returns the model for tracking the transitions.- Specified by:
getTransitionTracker
in interfaceTransitionAwareUI
- Returns:
- Model for tracking the transitions.
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in classjavax.swing.plaf.basic.BasicRadioButtonUI
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
update
in classjavax.swing.plaf.ComponentUI
-
-