ModificationAwareUI, TransitionAwareUIpublic class SubstanceButtonUI extends BasicButtonUI implements TransitionAwareUI, ModificationAwareUI
| Modifier and Type | Field | Description |
|---|---|---|
static String |
BORDER_COMPUTED |
Property used during the button shaper switch.
|
static String |
BORDER_COMPUTING |
Property used during the button shaper switch.
|
static String |
BORDER_ORIGINAL |
Property used to store the original (pre-Substance) button border.
|
protected AbstractButton |
button |
|
protected GlowingIcon |
glowingIcon |
The matching glowing icon.
|
static String |
ICON_ORIGINAL |
Property used to store the original button icon.
|
static String |
IS_TITLE_CLOSE_BUTTON |
Internal property used to mark close buttons on title panes.
|
static String |
LOCK_OPACITY |
Property used to lock the original (pre-Substance) button opacity.
|
static String |
OPACITY_ORIGINAL |
Property used to store the original (pre-Substance) button
opacity.
|
protected PropertyChangeListener |
substancePropertyListener |
Property change listener.
|
protected ButtonVisualStateTracker |
substanceVisualStateTracker |
Tracker for visual state transitions.
|
defaultTextIconGap, defaultTextShiftOffset| Constructor | Description |
|---|---|
SubstanceButtonUI(AbstractButton button) |
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) |
|
org.pushingpixels.trident.Timeline |
getModificationTimeline() |
|
Dimension |
getPreferredSize(JComponent c) |
|
StateTransitionTracker |
getTransitionTracker() |
Returns the model for tracking the transitions.
|
protected 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,
JComponent c,
Rectangle iconRect) |
|
protected void |
trackGlowingIcon() |
Tracks possible usage of glowing icon.
|
protected void |
uninstallDefaults(AbstractButton b) |
|
protected void |
uninstallListeners(AbstractButton b) |
|
void |
update(Graphics g,
JComponent c) |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUIgetAccessibleChild, getAccessibleChildrenCountpublic static final String BORDER_COMPUTED
public static final String BORDER_COMPUTING
public static final String BORDER_ORIGINAL
public static final String ICON_ORIGINAL
public static final String OPACITY_ORIGINAL
public static final String LOCK_OPACITY
public static final String IS_TITLE_CLOSE_BUTTON
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 AbstractButton button
public SubstanceButtonUI(AbstractButton button)
public static ComponentUI createUI(JComponent comp)
protected void installDefaults(AbstractButton b)
installDefaults in class BasicButtonUIprotected 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 BasicButtonUIpublic Dimension getPreferredSize(JComponent c)
getPreferredSize in class BasicButtonUIpublic boolean contains(JComponent c, int x, int y)
contains in class ComponentUIprotected void paintIcon(Graphics g, JComponent c, Rectangle iconRect)
paintIcon in class BasicButtonUIprotected 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 TransitionAwareUIpublic org.pushingpixels.trident.Timeline getModificationTimeline()
getModificationTimeline in interface ModificationAwareUI