|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.SpinnerUI
javax.swing.plaf.basic.BasicSpinnerUI
public class BasicSpinnerUI
A UI delegate for the JSpinner
component.
Field Summary | |
---|---|
protected JSpinner |
spinner
The spinner for this UI |
Constructor Summary | |
---|---|
BasicSpinnerUI()
|
Method Summary | |
---|---|
protected JComponent |
createEditor()
Creates an editor component. |
protected LayoutManager |
createLayout()
Creates a LayoutManager that layouts the sub components. |
protected Component |
createNextButton()
Creates the "Next" button |
protected Component |
createPreviousButton()
Creates the "Previous" button |
protected PropertyChangeListener |
createPropertyChangeListener()
Creates the PropertyChangeListener that will be attached by
installListeners . |
static ComponentUI |
createUI(JComponent c)
Creates a new BasicSpinnerUI for the specified
JComponent |
protected void |
installDefaults()
Called by installUI . |
protected void |
installListeners()
|
protected void |
installNextButtonListeners(Component c)
|
protected void |
installPreviousButtonListeners(Component c)
|
void |
installUI(JComponent c)
Install this UI to the JComponent , which in reality, is a
JSpinner . |
protected void |
replaceEditor(JComponent oldEditor,
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(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 |
Methods inherited from class javax.swing.plaf.ComponentUI |
---|
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, getPreferredSize, paint, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected JSpinner spinner
Constructor Detail |
---|
public BasicSpinnerUI()
Method Detail |
---|
public static ComponentUI createUI(JComponent c)
BasicSpinnerUI
for the specified
JComponent
c
- the component (ignored).
BasicSpinnerUI
.protected JComponent createEditor()
JSpinner.getEditor()
JSpinner.getEditor()
protected LayoutManager createLayout()
LayoutManager
that layouts the sub components. The
subcomponents are identifies by the constraint "Next", "Previous" and
"Editor"
LayoutManager
protected Component createNextButton()
protected Component createPreviousButton()
protected 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 replaceEditor
replaceEditor(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 createLayout
UIManager.getLookAndFeelDefaults()
,
createLayout()
,
installUI(javax.swing.JComponent)
protected void installListeners()
protected void installNextButtonListeners(Component c)
protected void installPreviousButtonListeners(Component c)
public void installUI(JComponent c)
JComponent
, which in reality, is a
JSpinner
. Calls installDefaults
,
installListeners
, and also adds the buttons and editor.
installUI
in class ComponentUI
c
- DOCUMENT ME!installDefaults()
,
installListeners()
,
createNextButton()
,
createPreviousButton()
,
createEditor()
protected void replaceEditor(JComponent oldEditor, JComponent newEditor)
oldEditor
- the old editornewEditor
- the new one to replace withprotected void uninstallDefaults()
installDefaults
. Called by
uninstallUI
protected void uninstallListeners()
installListeners
, called by
uninstallUI
public void uninstallUI(JComponent c)
uninstallDefaults
and uninstallListeners
as
well as remove the next/previous buttons and the editor
uninstallUI
in class ComponentUI
c
- DOCUMENT ME!ComponentUI.installUI(javax.swing.JComponent)
,
JComponent.setUI(javax.swing.plaf.ComponentUI)
,
JComponent.updateUI()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |