public class BasicSpinnerUI extends javax.swing.plaf.SpinnerUI
JSpinner component.| Modifier and Type | Field and Description |
|---|---|
protected javax.swing.JSpinner |
spinner
The spinner for this UI
|
| Constructor and Description |
|---|
BasicSpinnerUI() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.swing.JComponent |
createEditor()
Creates an editor component.
|
protected java.awt.LayoutManager |
createLayout()
Creates a
LayoutManager that layouts the sub components. |
protected java.awt.Component |
createNextButton()
Creates the "Next" button
|
protected java.awt.Component |
createPreviousButton()
Creates the "Previous" button
|
protected java.beans.PropertyChangeListener |
createPropertyChangeListener()
Creates the
PropertyChangeListener that will be attached by
installListeners. |
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
Creates a new
BasicSpinnerUI for the specified
JComponent |
protected void |
installDefaults()
Called by
installUI. |
protected void |
installListeners() |
protected void |
installNextButtonListeners(java.awt.Component c) |
protected void |
installPreviousButtonListeners(java.awt.Component c) |
void |
installUI(javax.swing.JComponent c)
Install this UI to the
JComponent, which in reality, is a
JSpinner. |
protected void |
replaceEditor(javax.swing.JComponent oldEditor,
javax.swing.JComponent newEditor)
Replace the old editor with the new one
|
protected void |
uninstallDefaults()
The reverse of
installDefaults. |
protected void |
uninstallListeners()
The reverse of
installListeners, called by
uninstallUI |
void |
uninstallUI(javax.swing.JComponent c)
Called when the current L&F is replaced with another one, should call
uninstallDefaults and uninstallListeners as
well as remove the next/previous buttons and the editor |
protected javax.swing.JSpinner spinner
public BasicSpinnerUI()
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
BasicSpinnerUI for the specified
JComponentc - the component (ignored).BasicSpinnerUI.protected javax.swing.JComponent createEditor()
JSpinner.getEditor()JSpinner.getEditor()protected java.awt.LayoutManager createLayout()
LayoutManager that layouts the sub components. The
subcomponents are identifies by the constraint "Next", "Previous" and
"Editor"LayoutManagerprotected java.awt.Component createNextButton()
protected java.awt.Component createPreviousButton()
protected java.beans.PropertyChangeListener createPropertyChangeListener()
PropertyChangeListener that will be attached by
installListeners. It should watch for the "editor"
property, when it's changed, replace the old editor with the new one,
probably by calling replaceEditorreplaceEditor(javax.swing.JComponent, javax.swing.JComponent)protected void installDefaults()
installUI. This should set various defaults
obtained from UIManager.getLookAndFeelDefaults, as well as
set the layout obtained from createLayoutUIManager.getLookAndFeelDefaults(),
createLayout(),
installUI(javax.swing.JComponent)protected void installListeners()
protected void installNextButtonListeners(java.awt.Component c)
protected void installPreviousButtonListeners(java.awt.Component c)
public void installUI(javax.swing.JComponent c)
JComponent, which in reality, is a
JSpinner. Calls installDefaults,
installListeners, and also adds the buttons and editor.installUI in class javax.swing.plaf.ComponentUIc - DOCUMENT ME!installDefaults(),
installListeners(),
createNextButton(),
createPreviousButton(),
createEditor()protected void replaceEditor(javax.swing.JComponent oldEditor, javax.swing.JComponent newEditor)
oldEditor - the old editornewEditor - the new one to replace withprotected void uninstallDefaults()
installDefaults. Called by
uninstallUIprotected void uninstallListeners()
installListeners, called by
uninstallUIpublic void uninstallUI(javax.swing.JComponent c)
uninstallDefaults and uninstallListeners as
well as remove the next/previous buttons and the editoruninstallUI in class javax.swing.plaf.ComponentUIc - DOCUMENT ME!ComponentUI.installUI(javax.swing.JComponent),
JComponent.setUI(javax.swing.plaf.ComponentUI),
JComponent.updateUI()