public class SubstanceButtonUI
extends javax.swing.plaf.basic.BasicButtonUI
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BORDER_COMPUTED
Property used during the button shaper switch.
|
static java.lang.String |
BORDER_COMPUTING
Property used during the button shaper switch.
|
static java.lang.String |
BORDER_ORIGINAL
Property used to store the original (pre-Substance) button border.
|
protected GlowingIcon |
glowingIcon
The matching glowing icon.
|
static java.lang.String |
ICON_ORIGINAL
Property used to store the original button icon.
|
static java.lang.String |
IS_TITLE_CLOSE_BUTTON
Internal property used to mark close buttons on title panes.
|
static java.lang.String |
LOCK_OPACITY
Property used to lock the original (pre-Substance) button opacity.
|
static java.lang.String |
OPACITY_ORIGINAL
Property used to store the original (pre-Substance) button
opacity.
|
protected java.beans.PropertyChangeListener |
substancePropertyListener
Property change listener.
|
protected ButtonVisualStateTracker |
substanceVisualStateTracker
Tracker for visual state transitions.
|
Constructor and Description |
---|
SubstanceButtonUI()
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) |
protected void |
installDefaults(javax.swing.AbstractButton b) |
protected void |
installListeners(javax.swing.AbstractButton b) |
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 |
paintFocus(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle viewRect,
java.awt.Rectangle textRect,
java.awt.Rectangle iconRect) |
protected void |
paintIcon(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle iconRect) |
protected void |
trackGlowingIcon(javax.swing.AbstractButton b)
Tracks possible usage of glowing icon.
|
protected void |
uninstallDefaults(javax.swing.AbstractButton b) |
protected void |
uninstallListeners(javax.swing.AbstractButton b) |
void |
update(java.awt.Graphics g,
javax.swing.JComponent c) |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installUI, paintButtonPressed, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUI
public static final java.lang.String BORDER_COMPUTED
public static final java.lang.String BORDER_COMPUTING
public static final java.lang.String BORDER_ORIGINAL
public static final java.lang.String ICON_ORIGINAL
public static final java.lang.String OPACITY_ORIGINAL
public static final java.lang.String LOCK_OPACITY
public static final java.lang.String IS_TITLE_CLOSE_BUTTON
protected GlowingIcon glowingIcon
FadeConfigurationManager.fadeAllowed(FadeKind, Component)
returns
true on FadeKind.ICON_GLOW
.protected java.beans.PropertyChangeListener substancePropertyListener
SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY
property and
AbstractButton.MODEL_CHANGED_PROPERTY
property.protected ButtonVisualStateTracker substanceVisualStateTracker
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent comp)
protected void installDefaults(javax.swing.AbstractButton b)
installDefaults
in class javax.swing.plaf.basic.BasicButtonUI
protected void uninstallDefaults(javax.swing.AbstractButton b)
uninstallDefaults
in class javax.swing.plaf.basic.BasicButtonUI
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
createButtonListener
in class javax.swing.plaf.basic.BasicButtonUI
protected void installListeners(javax.swing.AbstractButton b)
installListeners
in class javax.swing.plaf.basic.BasicButtonUI
protected void uninstallListeners(javax.swing.AbstractButton b)
uninstallListeners
in class javax.swing.plaf.basic.BasicButtonUI
public void paint(java.awt.Graphics g, javax.swing.JComponent c)
paint
in class javax.swing.plaf.basic.BasicButtonUI
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
getPreferredSize
in class javax.swing.plaf.basic.BasicButtonUI
protected void paintFocus(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle viewRect, java.awt.Rectangle textRect, java.awt.Rectangle iconRect)
paintFocus
in class javax.swing.plaf.basic.BasicButtonUI
public boolean contains(javax.swing.JComponent c, int x, int y)
contains
in class javax.swing.plaf.ComponentUI
protected void paintIcon(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Rectangle iconRect)
paintIcon
in class javax.swing.plaf.basic.BasicButtonUI
protected 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(javax.swing.AbstractButton b)
b
- Button.public void update(java.awt.Graphics g, javax.swing.JComponent c)
update
in class javax.swing.plaf.ComponentUI