|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectswingwt.awt.Component
swingwt.awt.Container
swingwtx.swing.JComponent
swingwtx.swing.JPanel
swingwtx.swing.JSpinner
Implementation of Swing's JSpinner class. We actually use a text box and a vertical scrollbar to get the same effect with native widgets.
| Nested Class Summary |
| Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
| Field Summary | |
protected static int |
CANCELED
|
protected java.util.Vector |
changeListeners
Item events |
protected static int |
INVISIBLE
|
protected int |
lastValue
|
protected SpinnerModel |
model
Model |
protected JScrollBar |
spin
|
protected JTextField |
text
Composite Components |
protected static int |
VISIBLE
|
| Fields inherited from class swingwtx.swing.JPanel |
opaque, ppeer |
| Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
| Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
| Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JSpinner()
|
|
JSpinner(SpinnerModel model)
|
|
| Method Summary | |
void |
addChangeListener(ChangeListener l)
|
void |
addFocusListener(FocusListener l)
Add a KeyListener to this component |
void |
addKeyListener(KeyListener l)
Add a KeyListener to this component |
protected Dimension |
calculatePreferredSize()
Overriden to calculate non-realised preferred size. |
JTextField |
getJTextField()
|
SpinnerModel |
getModel()
|
java.lang.String |
getToolTipText()
Returns the tooltip text used on the component |
java.lang.Object |
getValue()
|
void |
grabFocus()
Forces keyboard focus to the component |
boolean |
isEnabled()
Returns true if the component is enabled |
protected void |
nextItem()
|
protected void |
previousItem()
|
void |
processChangeEvent(ChangeEvent e)
|
void |
removeFocusListener(FocusListener l)
Remove an KeyListener from the component |
void |
removeItemListener(ChangeListener l)
|
void |
removeKeyListener(KeyListener l)
Remove an KeyListener from the component |
void |
requestFocus()
Requests the component receives the focus |
void |
setBounds(int x,
int y,
int width,
int height)
Component displays oddly since we used a vertical scrollbar. |
void |
setEnabled(boolean b)
Change the enabled state of the component |
void |
setModel(SpinnerModel model)
|
void |
setSwingWTParent(Container parent)
Callback for when this is added to a Container to create the peer and load cached values. |
void |
setToolTipText(java.lang.String tip)
Sets the tooltip text used on the component |
void |
setValue(java.lang.Object o)
|
void |
stateChanged(ChangeEvent e)
|
| Methods inherited from class swingwtx.swing.JPanel |
getHeight, getSize, getWidth, setBorder |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Vector changeListeners
protected SpinnerModel model
protected JTextField text
protected JScrollBar spin
protected int lastValue
protected static final int CANCELED
protected static final int INVISIBLE
protected static final int VISIBLE
| Constructor Detail |
public JSpinner()
public JSpinner(SpinnerModel model)
| Method Detail |
public void setModel(SpinnerModel model)
public SpinnerModel getModel()
public void addFocusListener(FocusListener l)
ComponentKeyListener to this component
addFocusListener in class Componentpublic void removeFocusListener(FocusListener l)
ComponentKeyListener from the component
removeFocusListener in class Componentpublic void addKeyListener(KeyListener l)
ComponentKeyListener to this component
addKeyListener in class Componentpublic void removeKeyListener(KeyListener l)
ComponentKeyListener from the component
removeKeyListener in class Componentpublic void addChangeListener(ChangeListener l)
public void removeItemListener(ChangeListener l)
public void processChangeEvent(ChangeEvent e)
public void setValue(java.lang.Object o)
public java.lang.Object getValue()
public void setEnabled(boolean b)
Component
setEnabled in class Componentpublic boolean isEnabled()
Component
isEnabled in class Componentpublic java.lang.String getToolTipText()
Component
getToolTipText in class Componentpublic void setToolTipText(java.lang.String tip)
Component
setToolTipText in class Componentprotected void previousItem()
protected void nextItem()
public void requestFocus()
Component
requestFocus in class Componentpublic void grabFocus()
Component
grabFocus in class Componentpublic JTextField getJTextField()
public void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListener
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class Componentprotected Dimension calculatePreferredSize()
calculatePreferredSize in class JPanel
public void setSwingWTParent(Container parent)
throws java.lang.Exception
JPanel
setSwingWTParent in class JPaneljava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||