org.gnu.gtk
public class SpinButton extends Entry
Constructor Summary | |
---|---|
SpinButton(Adjustment adjustment, double climbRate, int digits)
Creates a new SpinButton
| |
SpinButton(double min, double max, double step)
Creates a new SpinButton without manually creating an adjustment. | |
SpinButton(Handle handle)
Construct a new SpinButton from a handle to a native resource. |
Method Summary | |
---|---|
void | addListener(SpinListener listener)
Register an object to handle spin events.
|
void | configure(Adjustment adjustment, double climbRate, int digits)
Changes the properties of an existing spin button. |
Adjustment | getAdjustment()
Returns the Adjustment object used with this object.
|
Class | getEventListenerClass(String signal) |
EventType | getEventType(String signal) |
int | getIntValue()
Returns the current value, as an integer. |
static SpinButton | getSpinButton(Handle handle)
Internal static factory method to be used by Java-Gnome only. |
static Type | getType()
Retrieve the runtime type used by the GLib library. |
double | getValue()
Get the value of the SpinButton
|
void | removeListener(SpinListener listener)
Removes a listener
|
void | setAdjustment(Adjustment adjustment)
Replaces the adjustment object associated with the Spin button
|
void | setIncrements(double step, double page)
Sets the step and page increments. |
void | setNumeric(boolean numeric)
Sets the flag that determines if non-numeric text can be typed in the
spin button.
|
void | setPrecision(int digits)
Set the precision to be displayed. |
void | setRange(double min, double max)
Sets the minimum and maximum allowable values
|
void | setSnap(boolean snapToTicks)
Sets the policy as to whether values are corrected to the nearest step
increment when a spin button is activated after providing an invalid
value.
|
void | setUpdatePolicy(SpinButtonUpdatePolicy policy)
Sets the update behavior of a spin button. |
void | setValue(double value)
Sets the value of the spin button
|
void | setWrap(boolean wrap)
Sets the flag that determines if a spin button value wraps around to the
opposite limit when the upper or lower limit of the range is exceeded.
|
void | spin(SpinType direction, double increment)
Increment or decrement a spin button's value in a specified direction by
a specified amount.
|
Parameters: adjustment The {@link Adjustment} object that this spin button should use. climbRate Specifies how much the spin button changes when an arrow is clicked on. digits The number of decimal places to display.
Parameters: min Minimum allowable value max Maximum allowable value step Increment added or subtracted by spinning the widget
See Also: SpinListener
Parameters: adjustment An {@link Adjustment} object to use. climbRate The new climb rate. digits The number of decimal places to display in the spin button.
Returns: the adjustment object for this SpinButton
Returns: Current value of SpinButton, as an integer
Returns: The current value
See Also: addListener
Parameters: adjustment New adjustment object to use
Parameters: step Increment applied for a button 1 press. page Increment applied for a button 2 press.
Parameters: numeric Set the flag to true or false.
Parameters: digits Number of digits to be displayed
Parameters: min Minimum allowable value. max Maximum allowable value.
Parameters: snapToTicks A flag indicating if invalid values should be corrected.
Parameters: policy An update Policy
Parameters: value The value for the SpinButton
Parameters: wrap If true, the value will wrap
Parameters: direction A {@link SpinType} indicating the direction to spin. increment Step increment to apply in the specified direction.