|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent uic.widgets.UICSpinbox
public class UICSpinbox
UIC Enhanced Spinbox (an equivalent for javax.swing.Spinner).
This Spinbox only supports numbers, but it has a number of features
that makes this component easier to use for the user.
Features:
Nested Class Summary | |
---|---|
protected class |
UICSpinbox.SimpleFormat
Simple formatter iplementation. |
protected class |
UICSpinbox.SpinboxAccessibleContext
Returns an enhanced accessible jtextfield context. |
protected class |
UICSpinbox.SpinboxArrowButton
Special button shown at the right of the spinbox |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
UICSpinbox(SpinboxModelInterface model)
Convenience constructor. |
|
UICSpinbox(SpinboxModelInterface model,
NumberFormat format)
The constructor. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener listener)
Add a listener for value changed. |
void |
buttonDownPressedSlot()
|
void |
buttonUpPressedSlot()
|
void |
commit()
Commit the current textvalue to the model. |
double |
doubleValue()
Convenience method for getvalue().doubleValue() |
AccessibleContext |
getAccessibleContext()
|
Dimension |
getMaximumSize()
|
Dimension |
getMinimumSize()
|
SpinboxModelInterface |
getModel()
Returns the spinbox model. |
Number |
getValue()
Returns the value set after commiting the current text. |
int |
intValue()
Convenience method for getvalue().intValue() |
void |
propertyChange(PropertyChangeEvent e)
|
void |
removeChangeListener(ChangeListener listener)
Remove a listener for value changed. |
void |
requestFocus()
|
boolean |
requestFocus(boolean b)
|
void |
setEnabled(boolean enabled)
|
void |
setModel(SpinboxModelInterface model)
Sets the spinbox model |
void |
setPrefix(String prefix)
|
void |
setSuffix(String suffix)
|
void |
setValue(Number value)
Set the value to the model. |
TranslationInterface |
translate()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UICSpinbox(SpinboxModelInterface model)
public UICSpinbox(SpinboxModelInterface model, NumberFormat format)
model
- the model for setting the value limitsformat
- the formatter for displaying the number valueMethod Detail |
---|
public void setModel(SpinboxModelInterface model)
public void setPrefix(String prefix)
public void setSuffix(String suffix)
public SpinboxModelInterface getModel()
public Number getValue()
public void setValue(Number value)
value
- the value to be set
NOTE: setting the value clears the current undo/redo historypublic int intValue()
public double doubleValue()
public void addChangeListener(ChangeListener listener)
public void removeChangeListener(ChangeListener listener)
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
public void requestFocus()
requestFocus
in class JComponent
public boolean requestFocus(boolean b)
requestFocus
in class JComponent
public void commit()
public void buttonUpPressedSlot()
public void buttonDownPressedSlot()
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getMaximumSize()
getMaximumSize
in class JComponent
public void setEnabled(boolean enabled)
setEnabled
in class JComponent
public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JComponent
public TranslationInterface translate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |