TransitionAwareUIpublic class SubstanceToggleButtonUI extends BasicToggleButtonUI implements TransitionAwareUI
| Modifier and Type | Field | Description |
|---|---|---|
protected GlowingIcon |
glowingIcon |
The matching glowing icon.
|
protected PropertyChangeListener |
substancePropertyListener |
Property change listener.
|
protected ButtonVisualStateTracker |
substanceVisualStateTracker |
Tracker for visual state transitions.
|
protected JToggleButton |
toggleButton |
defaultTextIconGap, defaultTextShiftOffset| Constructor | Description |
|---|---|
SubstanceToggleButtonUI(JToggleButton toggleButton) |
Simple constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
contains(JComponent c,
int x,
int y) |
|
protected BasicButtonListener |
createButtonListener(AbstractButton b) |
|
static ComponentUI |
createUI(JComponent comp) |
|
Dimension |
getPreferredSize(JComponent c) |
|
StateTransitionTracker |
getTransitionTracker() |
Returns the model for tracking the transitions.
|
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 |
paintIcon(Graphics g,
AbstractButton b,
Rectangle iconRect) |
|
protected void |
trackGlowingIcon() |
Tracks possible usage of glowing icon.
|
void |
uninstallDefaults(AbstractButton b) |
|
protected void |
uninstallListeners(AbstractButton b) |
|
void |
update(Graphics g,
JComponent c) |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUIgetPropertyPrefix, getTextShiftOffsetgetAccessibleChild, getAccessibleChildrenCountprotected GlowingIcon glowingIcon
AnimationConfigurationManager.isAnimationAllowed(AnimationFacet, Component)
returns true on AnimationFacet.ICON_GLOW.protected PropertyChangeListener substancePropertyListener
SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY property and
AbstractButton.MODEL_CHANGED_PROPERTY property.protected ButtonVisualStateTracker substanceVisualStateTracker
protected JToggleButton toggleButton
public SubstanceToggleButtonUI(JToggleButton toggleButton)
public static ComponentUI createUI(JComponent comp)
public void installDefaults(AbstractButton b)
installDefaults in class BasicButtonUIpublic void uninstallDefaults(AbstractButton b)
uninstallDefaults in class BasicButtonUIprotected BasicButtonListener createButtonListener(AbstractButton b)
createButtonListener in class BasicButtonUIprotected void installListeners(AbstractButton b)
installListeners in class BasicButtonUIprotected void uninstallListeners(AbstractButton b)
uninstallListeners in class BasicButtonUIpublic void paint(Graphics g, JComponent c)
paint in class BasicToggleButtonUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class BasicButtonUIpublic boolean contains(JComponent c, int x, int y)
contains in class ComponentUIprotected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
paintIcon in class BasicToggleButtonUIprotected void paintButtonText(Graphics g, AbstractButton button, Rectangle textRect, String text)
g - Graphic contextbutton - ButtontextRect - Text rectangletext - Text to paintprotected void trackGlowingIcon()
public void update(Graphics g, JComponent c)
update in class ComponentUIpublic boolean isInside(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