TransitionAwareUI
public 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, uninstallUI
getPropertyPrefix, getTextShiftOffset
getAccessibleChild, getAccessibleChildrenCount
protected 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 BasicButtonUI
public void uninstallDefaults(AbstractButton b)
uninstallDefaults
in class BasicButtonUI
protected BasicButtonListener createButtonListener(AbstractButton b)
createButtonListener
in class BasicButtonUI
protected void installListeners(AbstractButton b)
installListeners
in class BasicButtonUI
protected void uninstallListeners(AbstractButton b)
uninstallListeners
in class BasicButtonUI
public void paint(Graphics g, JComponent c)
paint
in class BasicToggleButtonUI
public Dimension getPreferredSize(JComponent c)
getPreferredSize
in class BasicButtonUI
public boolean contains(JComponent c, int x, int y)
contains
in class ComponentUI
protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
paintIcon
in class BasicToggleButtonUI
protected 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 ComponentUI
public boolean isInside(MouseEvent me)
TransitionAwareUI
isInside
in interface TransitionAwareUI
me
- 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()
TransitionAwareUI
getTransitionTracker
in interface TransitionAwareUI