org.jvnet.substance
Class SubstanceSpinnerUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by javax.swing.plaf.SpinnerUI
          extended by javax.swing.plaf.basic.BasicSpinnerUI
              extended by org.jvnet.substance.SubstanceSpinnerUI

public class SubstanceSpinnerUI
extends javax.swing.plaf.basic.BasicSpinnerUI

UI for spinners in Substance look and feel.

Author:
Kirill Grouchnikov

Field Summary
protected  SubstanceSpinnerButton nextButton
          The next (increment) button.
protected  SubstanceSpinnerButton prevButton
          The previous (decrement) button.
protected  org.jvnet.lafwidget.animation.FadeStateListener substanceFadeStateListener
          Listener for fade animations.
protected  java.beans.PropertyChangeListener substancePropertyChangeListener
          Tracks changes to editor, removing the border as necessary.
 
Fields inherited from class javax.swing.plaf.basic.BasicSpinnerUI
spinner
 
Constructor Summary
SubstanceSpinnerUI()
           
 
Method Summary
protected  java.awt.Component createNextButton()
           
protected  java.awt.Component createPreviousButton()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
           
protected  void installDefaults()
           
protected  void installListeners()
           
 void paint(java.awt.Graphics g, javax.swing.JComponent c)
           
protected  void paintFocus(java.awt.Graphics g, java.awt.Rectangle bounds)
          Paints the focus indication.
protected  void uninstallListeners()
           
 
Methods inherited from class javax.swing.plaf.basic.BasicSpinnerUI
createEditor, createLayout, createPropertyChangeListener, getBaseline, getBaselineResizeBehavior, installKeyboardActions, installNextButtonListeners, installPreviousButtonListeners, installUI, replaceEditor, uninstallDefaults, uninstallUI
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

substancePropertyChangeListener

protected java.beans.PropertyChangeListener substancePropertyChangeListener
Tracks changes to editor, removing the border as necessary.


substanceFadeStateListener

protected org.jvnet.lafwidget.animation.FadeStateListener substanceFadeStateListener
Listener for fade animations.


nextButton

protected SubstanceSpinnerButton nextButton
The next (increment) button.


prevButton

protected SubstanceSpinnerButton prevButton
The previous (decrement) button.

Constructor Detail

SubstanceSpinnerUI

public SubstanceSpinnerUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

createNextButton

protected java.awt.Component createNextButton()
Overrides:
createNextButton in class javax.swing.plaf.basic.BasicSpinnerUI

createPreviousButton

protected java.awt.Component createPreviousButton()
Overrides:
createPreviousButton in class javax.swing.plaf.basic.BasicSpinnerUI

installDefaults

protected void installDefaults()
Overrides:
installDefaults in class javax.swing.plaf.basic.BasicSpinnerUI

installListeners

protected void installListeners()
Overrides:
installListeners in class javax.swing.plaf.basic.BasicSpinnerUI

uninstallListeners

protected void uninstallListeners()
Overrides:
uninstallListeners in class javax.swing.plaf.basic.BasicSpinnerUI

paint

public void paint(java.awt.Graphics g,
                  javax.swing.JComponent c)
Overrides:
paint in class javax.swing.plaf.ComponentUI

paintFocus

protected void paintFocus(java.awt.Graphics g,
                          java.awt.Rectangle bounds)
Paints the focus indication.

Parameters:
g - Graphics.
bounds - Bounds for text.

getPreferredSize

public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
Overrides:
getPreferredSize in class javax.swing.plaf.ComponentUI