org.jvnet.substance
Class SubstanceToggleButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
org.jvnet.substance.SubstanceToggleButtonUI
public class SubstanceToggleButtonUI
- extends javax.swing.plaf.basic.BasicToggleButtonUI
UI for toggle buttons in Substance look and feel.
- Author:
- Kirill Grouchnikov
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI |
defaultTextIconGap, defaultTextShiftOffset |
Method Summary |
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 b)
|
java.awt.Dimension |
getPreferredSize(javax.swing.JComponent c)
|
void |
installDefaults(javax.swing.AbstractButton b)
|
protected void |
installListeners(javax.swing.AbstractButton b)
|
protected void |
paintButtonPressed(java.awt.Graphics g,
javax.swing.AbstractButton b)
|
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.AbstractButton b,
java.awt.Rectangle iconRect)
|
protected void |
paintText(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle textRect,
java.lang.String text)
|
protected void |
trackGlowingIcon(javax.swing.AbstractButton b)
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)
|
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI |
getPropertyPrefix, getTextShiftOffset, paint |
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI |
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUI |
Methods inherited from class javax.swing.plaf.ComponentUI |
getAccessibleChild, getAccessibleChildrenCount |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
glowingIcon
protected GlowingIcon glowingIcon
- The matching glowing icon. Is used only when
FadeConfigurationManager.fadeAllowed(FadeKind, Component)
returns
true on FadeKind.ICON_GLOW
.
substancePropertyListener
protected java.beans.PropertyChangeListener substancePropertyListener
- Property change listener. Listens on changes to the
SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY
property and
AbstractButton.MODEL_CHANGED_PROPERTY
property.
substanceFadeStateListener
protected org.jvnet.lafwidget.animation.FadeStateListener substanceFadeStateListener
- Listener for fade animations.
SubstanceToggleButtonUI
public SubstanceToggleButtonUI()
- Simple constructor.
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent b)
installDefaults
public void installDefaults(javax.swing.AbstractButton b)
- Overrides:
installDefaults
in class javax.swing.plaf.basic.BasicButtonUI
uninstallDefaults
public void uninstallDefaults(javax.swing.AbstractButton b)
- Overrides:
uninstallDefaults
in class javax.swing.plaf.basic.BasicButtonUI
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
- Overrides:
createButtonListener
in class javax.swing.plaf.basic.BasicButtonUI
installListeners
protected void installListeners(javax.swing.AbstractButton b)
- Overrides:
installListeners
in class javax.swing.plaf.basic.BasicButtonUI
uninstallListeners
protected void uninstallListeners(javax.swing.AbstractButton b)
- Overrides:
uninstallListeners
in class javax.swing.plaf.basic.BasicButtonUI
update
public void update(java.awt.Graphics g,
javax.swing.JComponent c)
- Overrides:
update
in class javax.swing.plaf.ComponentUI
paintButtonPressed
protected void paintButtonPressed(java.awt.Graphics g,
javax.swing.AbstractButton b)
- Overrides:
paintButtonPressed
in class javax.swing.plaf.basic.BasicButtonUI
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSize
in class javax.swing.plaf.basic.BasicButtonUI
contains
public boolean contains(javax.swing.JComponent c,
int x,
int y)
- Overrides:
contains
in class javax.swing.plaf.ComponentUI
paintFocus
protected void paintFocus(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle viewRect,
java.awt.Rectangle textRect,
java.awt.Rectangle iconRect)
- Overrides:
paintFocus
in class javax.swing.plaf.basic.BasicButtonUI
paintIcon
protected void paintIcon(java.awt.Graphics g,
javax.swing.AbstractButton b,
java.awt.Rectangle iconRect)
- Overrides:
paintIcon
in class javax.swing.plaf.basic.BasicToggleButtonUI
paintText
protected void paintText(java.awt.Graphics g,
javax.swing.JComponent c,
java.awt.Rectangle textRect,
java.lang.String text)
- Overrides:
paintText
in class javax.swing.plaf.basic.BasicButtonUI
trackGlowingIcon
protected void trackGlowingIcon(javax.swing.AbstractButton b)
- Tracks possible usage of glowing icon.
- Parameters:
b
- Button.