public class

WindowsSpinnerUI

extends BasicSpinnerUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.SpinnerUI
       ↳ javax.swing.plaf.basic.BasicSpinnerUI
         ↳ com.sun.java.swing.plaf.windows.WindowsSpinnerUI

Summary

[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicSpinnerUI
Public Constructors
WindowsSpinnerUI()
Public Methods
static ComponentUI createUI(JComponent c)
void paint(Graphics g, JComponent c)
Paints the specified component appropriate for the look and feel.
Protected Methods
Component createNextButton()
Create a component that will replace the spinner models value with the object returned by spinner.getNextValue.
Component createPreviousButton()
Create a component that will replace the spinner models value with the object returned by spinner.getPreviousValue.
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicSpinnerUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Public Constructors

public WindowsSpinnerUI ()

Public Methods

public static ComponentUI createUI (JComponent c)

public void paint (Graphics g, JComponent c)

Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Parameters
g the Graphics context in which to paint
c the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

Protected Methods

protected Component createNextButton ()

Create a component that will replace the spinner models value with the object returned by spinner.getNextValue. By default the nextButton is a JButton who's ActionListener updates it's JSpinner ancestors model. If a nextButton isn't needed (in a subclass) then override this method to return null.

Returns
  • a component that will replace the spinners model with the next value in the sequence, or null

protected Component createPreviousButton ()

Create a component that will replace the spinner models value with the object returned by spinner.getPreviousValue. By default the previousButton is a JButton. This method invokes installPreviousButtonListeners to install the necessary listeners to update the JSpinner's model in response to a user gesture. If a previousButton isn't needed (in a subclass) then override this method to return null.

Returns
  • a component that will replace the spinners model with the next value in the sequence, or null