javax.swing.plaf.basic
Class BasicSpinnerUI

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI 
      extended by javax.swing.plaf.SpinnerUI sample code for javax.swing.plaf.SpinnerUI definition code for javax.swing.plaf.SpinnerUI 
          extended by javax.swing.plaf.basic.BasicSpinnerUI

public class BasicSpinnerUI
extends SpinnerUI sample code for javax.swing.plaf.SpinnerUI definition code for javax.swing.plaf.SpinnerUI

The default Spinner UI delegate.

Since:
1.4

Field Summary
protected  JSpinner sample code for javax.swing.JSpinner definition code for javax.swing.JSpinner spinner sample code for javax.swing.plaf.basic.BasicSpinnerUI.spinner definition code for javax.swing.plaf.basic.BasicSpinnerUI.spinner
          The spinner that we're a UI delegate for.
 
Constructor Summary
BasicSpinnerUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.BasicSpinnerUI() definition code for javax.swing.plaf.basic.BasicSpinnerUI.BasicSpinnerUI() ()
           
 
Method Summary
protected  JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent createEditor sample code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() ()
          This method is called by installUI to get the editor component of the JSpinner.
protected  LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager createLayout sample code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout() ()
          Create a LayoutManager that manages the editor, nextButton, and previousButton children of the JSpinner.
protected  Component sample code for java.awt.Component definition code for java.awt.Component createNextButton sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() ()
          Create a component that will replace the spinner models value with the object returned by spinner.getNextValue.
protected  Component sample code for java.awt.Component definition code for java.awt.Component createPreviousButton sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() ()
          Create a component that will replace the spinner models value with the object returned by spinner.getPreviousValue.
protected  PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener() ()
          Create a PropertyChangeListener that can be added to the JSpinner itself.
static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI createUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.createUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Returns a new instance of BasicSpinnerUI.
protected  void installDefaults sample code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() ()
          Initialize the JSpinner border, foreground, and background, properties based on the corresponding "Spinner.*" properties from defaults table.
protected  void installKeyboardActions sample code for javax.swing.plaf.basic.BasicSpinnerUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installKeyboardActions() ()
          Installs the keyboard Actions onto the JSpinner.
protected  void installListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() ()
          Initializes PropertyChangeListener with a shared object that delegates interesting PropertyChangeEvents to protected methods.
protected  void installNextButtonListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Installs the necessary listeners on the next button, c, to update the JSpinner in response to a user gesture.
protected  void installPreviousButtonListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component) (Component sample code for java.awt.Component definition code for java.awt.Component  c)
          Installs the necessary listeners on the previous button, c, to update the JSpinner in response to a user gesture.
 void installUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Calls installDefaults, installListeners, and then adds the components returned by createNextButton, createPreviousButton, and createEditor.
protected  void replaceEditor sample code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  oldEditor, JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  newEditor)
          Called by the PropertyChangeListener when the JSpinner editor property changes.
protected  void uninstallDefaults sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults() ()
          Sets the JSpinner's layout manager to null.
protected  void uninstallListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners() ()
          Removes the PropertyChangeListener added by installListeners.
 void uninstallUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
          Calls uninstallDefaults, uninstallListeners, and then removes all of the spinners children.
 
Methods inherited from class javax.swing.plaf.ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
contains sample code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) definition code for javax.swing.plaf.ComponentUI.contains(javax.swing.JComponent, int, int) , getAccessibleChild sample code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) definition code for javax.swing.plaf.ComponentUI.getAccessibleChild(javax.swing.JComponent, int) , getAccessibleChildrenCount sample code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getAccessibleChildrenCount(javax.swing.JComponent) , getMaximumSize sample code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMaximumSize(javax.swing.JComponent) , getMinimumSize sample code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getMinimumSize(javax.swing.JComponent) , getPreferredSize sample code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.getPreferredSize(javax.swing.JComponent) , paint sample code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent) , update sample code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

spinner sample code for javax.swing.plaf.basic.BasicSpinnerUI.spinner

protected JSpinner sample code for javax.swing.JSpinner definition code for javax.swing.JSpinner  spinner
The spinner that we're a UI delegate for. Initialized by the installUI method, and reset to null by uninstallUI.

See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) , uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent)
Constructor Detail

BasicSpinnerUI sample code for javax.swing.plaf.basic.BasicSpinnerUI() definition code for javax.swing.plaf.basic.BasicSpinnerUI()

public BasicSpinnerUI()
Method Detail

createUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.createUI(javax.swing.JComponent)

public static ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  createUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Returns a new instance of BasicSpinnerUI. SpinnerListUI delegates are allocated one per JSpinner.

Parameters:
c - the JSpinner (not used)
Returns:
a new BasicSpinnerUI object
See Also:
ComponentUI.createUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.createUI(javax.swing.JComponent)

installUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent)

public void installUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Calls installDefaults, installListeners, and then adds the components returned by createNextButton, createPreviousButton, and createEditor.

Overrides:
installUI sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the JSpinner
See Also:
installDefaults() sample code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() , installListeners() sample code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() , createNextButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() , createPreviousButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() , createEditor() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor()

uninstallUI sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent)

public void uninstallUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  c)
Calls uninstallDefaults, uninstallListeners, and then removes all of the spinners children.

Overrides:
uninstallUI sample code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.uninstallUI(javax.swing.JComponent) in class ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI
Parameters:
c - the JSpinner (not used)
See Also:
ComponentUI.installUI(javax.swing.JComponent) sample code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.ComponentUI.installUI(javax.swing.JComponent) , JComponent.updateUI() sample code for javax.swing.JComponent.updateUI() definition code for javax.swing.JComponent.updateUI()

installListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners()

protected void installListeners()
Initializes PropertyChangeListener with a shared object that delegates interesting PropertyChangeEvents to protected methods.

This method is called by installUI.

See Also:
replaceEditor(javax.swing.JComponent, javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) , uninstallListeners() sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners()

uninstallListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallListeners()

protected void uninstallListeners()
Removes the PropertyChangeListener added by installListeners.

This method is called by uninstallUI.

See Also:
installListeners() sample code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners()

installDefaults sample code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults()

protected void installDefaults()
Initialize the JSpinner border, foreground, and background, properties based on the corresponding "Spinner.*" properties from defaults table. The JSpinners layout is set to the value returned by createLayout. This method is called by installUI.

See Also:
uninstallDefaults() sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults() , installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) , createLayout() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout() , LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) sample code for javax.swing.LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) definition code for javax.swing.LookAndFeel.installBorder(javax.swing.JComponent, java.lang.String) , LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String) sample code for javax.swing.LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String) definition code for javax.swing.LookAndFeel.installColors(javax.swing.JComponent, java.lang.String, java.lang.String)

uninstallDefaults sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallDefaults()

protected void uninstallDefaults()
Sets the JSpinner's layout manager to null. This method is called by uninstallUI.

See Also:
installDefaults() sample code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installDefaults() , uninstallUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.uninstallUI(javax.swing.JComponent)

installNextButtonListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component)

protected void installNextButtonListeners(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Installs the necessary listeners on the next button, c, to update the JSpinner in response to a user gesture.

Parameters:
c - Component to install the listeners on
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if c is null.
Since:
1.5
See Also:
createNextButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton()

installPreviousButtonListeners sample code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component)

protected void installPreviousButtonListeners(Component sample code for java.awt.Component definition code for java.awt.Component  c)
Installs the necessary listeners on the previous button, c, to update the JSpinner in response to a user gesture.

Parameters:
c - Component to install the listeners on.
Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - if c is null.
Since:
1.5
See Also:
createPreviousButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton()

createLayout sample code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createLayout()

protected LayoutManager sample code for java.awt.LayoutManager definition code for java.awt.LayoutManager  createLayout()
Create a LayoutManager that manages the editor, nextButton, and previousButton children of the JSpinner. These three children must be added with a constraint that identifies their role: "Editor", "Next", and "Previous". The default layout manager can handle the absence of any of these children.

Returns:
a LayoutManager for the editor, next button, and previous button.
See Also:
createNextButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() , createPreviousButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() , createEditor() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor()

createPropertyChangeListener sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener()

protected PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  createPropertyChangeListener()
Create a PropertyChangeListener that can be added to the JSpinner itself. Typically, this listener will call replaceEditor when the "editor" property changes, since it's the SpinnerUI's responsibility to add the editor to the JSpinner (and remove the old one). This method is called by installListeners.

Returns:
A PropertyChangeListener for the JSpinner itself
See Also:
installListeners() sample code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installListeners()

createPreviousButton sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton()

protected Component sample code for java.awt.Component definition code for java.awt.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
See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) , createNextButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() , installPreviousButtonListeners(java.awt.Component) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installPreviousButtonListeners(java.awt.Component)

createNextButton sample code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createNextButton()

protected Component sample code for java.awt.Component definition code for java.awt.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
See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) , createPreviousButton() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPreviousButton() , installNextButtonListeners(java.awt.Component) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installNextButtonListeners(java.awt.Component)

createEditor sample code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor()

protected JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  createEditor()
This method is called by installUI to get the editor component of the JSpinner. By default it just returns JSpinner.getEditor(). Subclasses can override createEditor to return a component that contains the spinner's editor or null, if they're going to handle adding the editor to the JSpinner in an installUI override.

Typically this method would be overridden to wrap the editor with a container with a custom border, since one can't assume that the editors border can be set directly.

The replaceEditor method is called when the spinners editor is changed with JSpinner.setEditor. If you've overriden this method, then you'll probably want to override replaceEditor as well.

Returns:
the JSpinners editor JComponent, spinner.getEditor() by default
See Also:
installUI(javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.installUI(javax.swing.JComponent) , replaceEditor(javax.swing.JComponent, javax.swing.JComponent) sample code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) , JSpinner.getEditor() sample code for javax.swing.JSpinner.getEditor() definition code for javax.swing.JSpinner.getEditor()

replaceEditor sample code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent) definition code for javax.swing.plaf.basic.BasicSpinnerUI.replaceEditor(javax.swing.JComponent, javax.swing.JComponent)

protected void replaceEditor(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  oldEditor,
                             JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  newEditor)
Called by the PropertyChangeListener when the JSpinner editor property changes. It's the responsibility of this method to remove the old editor and add the new one. By default this operation is just:
 spinner.remove(oldEditor);
 spinner.add(newEditor, "Editor");
 
The implementation of replaceEditor should be coordinated with the createEditor method.

See Also:
createEditor() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createEditor() , createPropertyChangeListener() sample code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener() definition code for javax.swing.plaf.basic.BasicSpinnerUI.createPropertyChangeListener()

installKeyboardActions sample code for javax.swing.plaf.basic.BasicSpinnerUI.installKeyboardActions() definition code for javax.swing.plaf.basic.BasicSpinnerUI.installKeyboardActions()

protected void installKeyboardActions()
Installs the keyboard Actions onto the JSpinner.

Since:
1.5