FileDocCategorySizeDatePackage
WindowsSpinnerUI.javaAPI DocJava SE 6 API2627Tue Jun 10 00:21:58 BST 2008com.sun.java.swing.plaf.windows

WindowsSpinnerUI

public class WindowsSpinnerUI extends BasicSpinnerUI

Fields Summary
Constructors Summary
Methods Summary
protected java.awt.ComponentcreateNextButton()

	if (XPStyle.getXP() != null) {
            JButton xpButton = new XPStyle.GlyphButton(spinner, Part.SPNP_UP);
            Dimension size = UIManager.getDimension("Spinner.arrowButtonSize");
            xpButton.setPreferredSize(size);
            xpButton.setRequestFocusEnabled(false);
            installNextButtonListeners(xpButton);
            return xpButton;
        }
        return super.createNextButton();
    
protected java.awt.ComponentcreatePreviousButton()

	if (XPStyle.getXP() != null) {
            JButton xpButton = new XPStyle.GlyphButton(spinner, Part.SPNP_DOWN);
            Dimension size = UIManager.getDimension("Spinner.arrowButtonSize");
            xpButton.setPreferredSize(size);
            xpButton.setRequestFocusEnabled(false);
            installPreviousButtonListeners(xpButton);
            return xpButton;
        }
        return super.createPreviousButton();
    
public static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)

        return new WindowsSpinnerUI();
    
private javax.swing.plaf.UIResourcegetUIResource(java.lang.Object[] listeners)

        for (int counter = 0; counter < listeners.length; counter++) {
            if (listeners[counter] instanceof UIResource) {
                return (UIResource)listeners[counter];
            }
        }
        return null;
    
private com.sun.java.swing.plaf.windows.TMSchema.StategetXPState(javax.swing.JComponent c)

        State state = State.NORMAL;
        if (!c.isEnabled()) {
            state = State.DISABLED;
        }
        return state;
    
public voidpaint(java.awt.Graphics g, javax.swing.JComponent c)
{@inheritDoc}

since
1.6

        if (XPStyle.getXP() != null) {
            paintXPBackground(g, c);
        }
        super.paint(g,c);
    
private voidpaintXPBackground(java.awt.Graphics g, javax.swing.JComponent c)

        XPStyle xp = XPStyle.getXP();
        Skin skin = xp.getSkin(c, Part.EP_EDIT);
        State state = getXPState(c);
        skin.paintSkin(g, 0, 0, c.getWidth(), c.getHeight(), state);