Class BasicSwitchUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- javax.swing.plaf.basic.BasicButtonUI
-
- javax.swing.plaf.basic.BasicToggleButtonUI
-
- org.pushingpixels.radiance.component.internal.ui.common.BasicSwitchUI
-
- All Implemented Interfaces:
TransitionAwareUI
- Direct Known Subclasses:
RadianceSwitchUI
public abstract class BasicSwitchUI extends javax.swing.plaf.basic.BasicToggleButtonUI implements TransitionAwareUI
-
-
Field Summary
Fields Modifier and Type Field Description private java.beans.PropertyChangeListener
componentPropertyChangeListener
private java.beans.PropertyChangeListener
projectionPropertyChangeListener
protected StateTransitionTracker
stateTransitionTracker
protected JSwitch
switchComp
-
Constructor Summary
Constructors Constructor Description BasicSwitchUI(JSwitch switchComp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.plaf.basic.BasicButtonListener
createButtonListener(javax.swing.AbstractButton b)
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.protected void
uninstallDefaults(javax.swing.AbstractButton b)
protected void
uninstallListeners(javax.swing.AbstractButton b)
void
uninstallUI(javax.swing.JComponent c)
void
update(java.awt.Graphics g, javax.swing.JComponent c)
-
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
createUI, getPropertyPrefix, getTextShiftOffset, paint, 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
-
-
-
-
Field Detail
-
switchComp
protected JSwitch switchComp
-
componentPropertyChangeListener
private java.beans.PropertyChangeListener componentPropertyChangeListener
-
projectionPropertyChangeListener
private java.beans.PropertyChangeListener projectionPropertyChangeListener
-
stateTransitionTracker
protected StateTransitionTracker stateTransitionTracker
-
-
Constructor Detail
-
BasicSwitchUI
public BasicSwitchUI(JSwitch switchComp)
-
-
Method Detail
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUI
in classjavax.swing.plaf.basic.BasicButtonUI
-
installDefaults
protected void installDefaults(javax.swing.AbstractButton b)
- Overrides:
installDefaults
in classjavax.swing.plaf.basic.BasicButtonUI
-
installListeners
protected void installListeners(javax.swing.AbstractButton b)
- Overrides:
installListeners
in classjavax.swing.plaf.basic.BasicButtonUI
-
uninstallDefaults
protected void uninstallDefaults(javax.swing.AbstractButton b)
- Overrides:
uninstallDefaults
in classjavax.swing.plaf.basic.BasicButtonUI
-
uninstallListeners
protected void uninstallListeners(javax.swing.AbstractButton b)
- Overrides:
uninstallListeners
in classjavax.swing.plaf.basic.BasicButtonUI
-
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
- Overrides:
createButtonListener
in classjavax.swing.plaf.basic.BasicButtonUI
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in classjavax.swing.plaf.basic.BasicButtonUI
-
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.
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)
- Overrides:
update
in classjavax.swing.plaf.ComponentUI
-
-