|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectspeedscheduler.IntegerInput
public class IntegerInput
A convenient widget input box for inputting integers. Users cannot input anything but 0-9 into this baby.
| Nested Class Summary | |
|---|---|
private class |
IntegerInput.IntegerVerifyListener
|
| Field Summary | |
|---|---|
private org.eclipse.swt.widgets.Text |
input
|
private IntegerInput.IntegerVerifyListener |
listener
|
| Constructor Summary | |
|---|---|
IntegerInput(org.eclipse.swt.widgets.Composite parent,
int style)
Creates a new IntegerInput widget, embedded in the specified parent Composite, with the specified style. |
|
| Method Summary | |
|---|---|
void |
addListener(int type,
org.eclipse.swt.widgets.Listener listener)
|
void |
addModifyListener(org.eclipse.swt.events.ModifyListener listener)
Adds a ModifyListener to this inptu box, such that every time a new character is inputted, this event will fire. |
int |
getValue()
Gets the value entered by the user |
void |
setEnabled(boolean enabled)
Enables/disables this widget. |
void |
setLayoutData(java.lang.Object layoutData)
Sets the layoutData for this widget. |
void |
setSize(int width,
int height)
Sets the width and height of the widget (only if your layout manager respects this). |
void |
setValue(int newValue)
Sets the displayed value for the widget. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.eclipse.swt.widgets.Text input
private IntegerInput.IntegerVerifyListener listener
| Constructor Detail |
|---|
public IntegerInput(org.eclipse.swt.widgets.Composite parent,
int style)
parent - The composite to put this widget in.style - The style with which to draw this widgetSWT| Method Detail |
|---|
public int getValue()
public void setValue(int newValue)
newValue - The value to display.public void addModifyListener(org.eclipse.swt.events.ModifyListener listener)
listener - The ModifyListener to notify when the event happens.ModifyListenerpublic void setLayoutData(java.lang.Object layoutData)
layoutData - The layoutData to set.org.eclipse.swt.widgets.Control.setLayoutDatapublic void setEnabled(boolean enabled)
enabled - Specify true to enable this widget (allow input), and false to
disalbe this widget (disallow input, and turn it gray).
public void setSize(int width,
int height)
width - The new width.height - The new height.
public void addListener(int type,
org.eclipse.swt.widgets.Listener listener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||