Class RadianceRibbonTaskToggleButtonUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- javax.swing.plaf.ButtonUI
-
- org.pushingpixels.radiance.component.internal.ui.common.CommandButtonUI
-
- org.pushingpixels.radiance.component.internal.ui.common.BasicCommandButtonUI
-
- org.pushingpixels.radiance.component.internal.ui.ribbon.BasicRibbonTaskToggleButtonUI
-
- org.pushingpixels.radiance.component.internal.theming.ribbon.ui.RadianceRibbonTaskToggleButtonUI
-
- All Implemented Interfaces:
TransitionAwareUI,RadianceCoreUtilities.BackgroundAppearanceStrategyAware
public class RadianceRibbonTaskToggleButtonUI extends BasicRibbonTaskToggleButtonUI implements TransitionAwareUI
UI forJRibbonTaskToggleButtoncomponents in Radiance look and feel.
-
-
Field Summary
Fields Modifier and Type Field Description private java.beans.PropertyChangeListenerradiancePropertyChangeListenerProperty change listener on the button.private CommandButtonVisualStateTrackerradianceVisualStateTrackerTracker for visual state transitions.private RibbonTaskToggleButtonBackgroundDelegatetonalDelegatePainting delegate.-
Fields inherited from class org.pushingpixels.radiance.component.internal.ui.common.BasicCommandButtonUI
backgroundAppearanceStrategy, commandButton, DO_NOT_DISPOSE_POPUPS, extraText, horizontalAlignment, icon, isInnerFocusOnAction, layoutInfo, layoutManager, popupIcon, text
-
-
Constructor Summary
Constructors Modifier Constructor Description privateRadianceRibbonTaskToggleButtonUI()Simple constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent comp)private static java.awt.ColorgetForegroundColor(JCommandButton button, StateTransitionTracker.ModelStateInfo modelStateInfo)java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)StateTransitionTrackergetTransitionTracker()Returns the model for tracking the transitions.protected voidinstallDefaults()Installs defaults on the associated command button.protected voidinstallListeners()Installs listeners on the associated command button.booleanisInside(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.voidpaint(java.awt.Graphics g, javax.swing.JComponent c)private voidpaintTextAndFocus(java.awt.Graphics g)protected voiduninstallComponents()Uninstalls subcomponents from the associated command button.protected voiduninstallDefaults()Uninstalls defaults from the associated command button.protected voiduninstallListeners()Uninstalls listeners from the associated command button.voidupdate(java.awt.Graphics g, javax.swing.JComponent c)-
Methods inherited from class org.pushingpixels.radiance.component.internal.ui.ribbon.BasicRibbonTaskToggleButtonUI
getMinimumSize
-
Methods inherited from class org.pushingpixels.radiance.component.internal.ui.common.BasicCommandButtonUI
createButtonListener, createPopupActionListener, getActionKeyTipAnchorCenterPoint, getBackgroundAppearanceStrategy, getLayoutInfo, getLayoutManager, getPopupKeyTipAnchorCenterPoint, installComponents, installKeyboardActions, installUI, isInnerFocusOnAction, isPaintingBackground, isPaintingSeparators, processPopupAction, setInnerFocusOnAction, uninstallKeyboardActions, uninstallUI, updatePopupIcon
-
-
-
-
Field Detail
-
radianceVisualStateTracker
private CommandButtonVisualStateTracker radianceVisualStateTracker
Tracker for visual state transitions.
-
radiancePropertyChangeListener
private java.beans.PropertyChangeListener radiancePropertyChangeListener
Property change listener on the button.
-
tonalDelegate
private RibbonTaskToggleButtonBackgroundDelegate tonalDelegate
Painting delegate.
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
-
installDefaults
protected void installDefaults()
Description copied from class:BasicCommandButtonUIInstalls defaults on the associated command button.- Overrides:
installDefaultsin classBasicCommandButtonUI
-
uninstallDefaults
protected void uninstallDefaults()
Description copied from class:BasicCommandButtonUIUninstalls defaults from the associated command button.- Overrides:
uninstallDefaultsin classBasicCommandButtonUI
-
uninstallComponents
protected void uninstallComponents()
Description copied from class:BasicCommandButtonUIUninstalls subcomponents from the associated command button.- Overrides:
uninstallComponentsin classBasicCommandButtonUI
-
installListeners
protected void installListeners()
Description copied from class:BasicCommandButtonUIInstalls listeners on the associated command button.- Overrides:
installListenersin classBasicRibbonTaskToggleButtonUI
-
uninstallListeners
protected void uninstallListeners()
Description copied from class:BasicCommandButtonUIUninstalls listeners from the associated command button.- Overrides:
uninstallListenersin classBasicRibbonTaskToggleButtonUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
paintin classjavax.swing.plaf.ComponentUI
-
update
public void update(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
updatein classBasicCommandButtonUI
-
paintTextAndFocus
private void paintTextAndFocus(java.awt.Graphics g)
-
getForegroundColor
private static java.awt.Color getForegroundColor(JCommandButton button, StateTransitionTracker.ModelStateInfo modelStateInfo)
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classBasicCommandButtonUI
-
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.
-
isInside
public boolean isInside(java.awt.event.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.
-
-