public class SubstanceToggleButtonUI extends javax.swing.plaf.basic.BasicToggleButtonUI implements TransitionAwareUI
| Modifier and Type | Field and Description |
|---|---|
protected GlowingIcon |
glowingIcon
The matching glowing icon.
|
protected java.beans.PropertyChangeListener |
substancePropertyListener
Property change listener.
|
protected ButtonVisualStateTracker |
substanceVisualStateTracker
Tracker for visual state transitions.
|
protected javax.swing.JToggleButton |
toggleButton |
| Constructor and Description |
|---|
SubstanceToggleButtonUI(javax.swing.JToggleButton toggleButton)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(javax.swing.JComponent c,
int x,
int y) |
protected javax.swing.plaf.basic.BasicButtonListener |
createButtonListener(javax.swing.AbstractButton b) |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent comp) |
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c) |
StateTransitionTracker |
getTransitionTracker()
Returns the model for tracking the transitions.
|
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) |
protected void |
paintButtonText(java.awt.Graphics g,
javax.swing.AbstractButton button,
java.awt.Rectangle textRect,
java.lang.String text)
Paints the text.
|
protected void |
paintIcon(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle iconRect) |
protected void |
trackGlowingIcon()
Tracks possible usage of glowing icon.
|
void |
uninstallDefaults(javax.swing.AbstractButton b) |
protected void |
uninstallListeners(javax.swing.AbstractButton b) |
void |
update(java.awt.Graphics g,
javax.swing.JComponent c) |
getPropertyPrefix, getTextShiftOffsetclearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUIprotected GlowingIcon glowingIcon
AnimationConfigurationManager.isAnimationAllowed(AnimationFacet, Component)
returns true on AnimationFacet.ICON_GLOW.protected java.beans.PropertyChangeListener substancePropertyListener
SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY property and
AbstractButton.MODEL_CHANGED_PROPERTY property.protected ButtonVisualStateTracker substanceVisualStateTracker
protected javax.swing.JToggleButton toggleButton
public SubstanceToggleButtonUI(javax.swing.JToggleButton toggleButton)
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
public void installDefaults(javax.swing.AbstractButton b)
installDefaults in class javax.swing.plaf.basic.BasicButtonUIpublic void uninstallDefaults(javax.swing.AbstractButton b)
uninstallDefaults in class javax.swing.plaf.basic.BasicButtonUIprotected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
createButtonListener in class javax.swing.plaf.basic.BasicButtonUIprotected void installListeners(javax.swing.AbstractButton b)
installListeners in class javax.swing.plaf.basic.BasicButtonUIprotected void uninstallListeners(javax.swing.AbstractButton b)
uninstallListeners in class javax.swing.plaf.basic.BasicButtonUIpublic void paint(java.awt.Graphics g,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicToggleButtonUIpublic java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize in class javax.swing.plaf.basic.BasicButtonUIpublic boolean contains(javax.swing.JComponent c,
int x,
int y)
contains in class javax.swing.plaf.ComponentUIprotected void paintIcon(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle iconRect)
paintIcon in class javax.swing.plaf.basic.BasicToggleButtonUIprotected void paintButtonText(java.awt.Graphics g,
javax.swing.AbstractButton button,
java.awt.Rectangle textRect,
java.lang.String text)
g - Graphic contextbutton - ButtontextRect - Text rectangletext - Text to paintprotected void trackGlowingIcon()
public void update(java.awt.Graphics g,
javax.swing.JComponent c)
update in class javax.swing.plaf.ComponentUIpublic boolean isInside(java.awt.event.MouseEvent me)
TransitionAwareUIisInside in interface TransitionAwareUIme - Mouse event.true if the mouse position of the specified event
lies inside the area of the component designated for transition
effects, false otherwise.public StateTransitionTracker getTransitionTracker()
TransitionAwareUIgetTransitionTracker in interface TransitionAwareUI