|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Entry
org.gnu.gtk.SpinButton
A SpinButton widget displays a single numeric value that you can change by using the two arrow buttons to its right, or by editing the number directly.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
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. |
protected void |
fireSpinEvent(SpinEvent event)
|
Adjustment |
getAdjustment()
Returns the Adjustment ojbect used with this object. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
int |
getIntValue()
Returns the current value, as an integer. |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
double |
getValue()
Get the value of the SpinButton |
protected static void |
gtk_spin_button_configure(Handle spin_button,
Handle adjustment,
double climbRate,
int digits)
|
protected static Handle |
gtk_spin_button_get_adjustment(Handle spin_button)
|
protected static int |
gtk_spin_button_get_digits(Handle spin_button)
|
protected static void |
gtk_spin_button_get_increments(Handle spin_button,
double[] step,
double[] page)
|
protected static boolean |
gtk_spin_button_get_numeric(Handle spin_button)
|
protected static void |
gtk_spin_button_get_range(Handle spin_button,
double[] min,
double[] max)
|
protected static boolean |
gtk_spin_button_get_snap_to_ticks(Handle spin_button)
|
protected static int |
gtk_spin_button_get_type()
|
protected static int |
gtk_spin_button_get_update_policy(Handle spin_button)
|
protected static int |
gtk_spin_button_get_value_as_int(Handle spin_button)
|
protected static double |
gtk_spin_button_get_value(Handle spin_button)
|
protected static boolean |
gtk_spin_button_get_wrap(Handle spin_button)
|
protected static Handle |
gtk_spin_button_new_with_range(double min,
double max,
double step)
|
protected static Handle |
gtk_spin_button_new(Handle adjustment,
double climbRate,
int digits)
|
protected static void |
gtk_spin_button_set_adjustment(Handle spin_button,
Handle adjustment)
|
protected static void |
gtk_spin_button_set_digits(Handle spin_button,
int digits)
|
protected static void |
gtk_spin_button_set_increments(Handle spin_button,
double step,
double page)
|
protected static void |
gtk_spin_button_set_numeric(Handle spin_button,
boolean numeric)
|
protected static void |
gtk_spin_button_set_range(Handle spin_button,
double min,
double max)
|
protected static void |
gtk_spin_button_set_snap_to_ticks(Handle spin_button,
boolean snapToTicks)
|
protected static void |
gtk_spin_button_set_update_policy(Handle spin_button,
int policy)
|
protected static void |
gtk_spin_button_set_value(Handle spin_button,
double value)
|
protected static void |
gtk_spin_button_set_wrap(Handle spin_button,
boolean wrap)
|
protected static void |
gtk_spin_button_spin(Handle spin_button,
int direction,
double increment)
|
protected static void |
gtk_spin_button_update(Handle spin_button)
|
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. |
Methods inherited from class org.gnu.gtk.GtkObject |
getFlags, gtk_object_destroy, gtk_object_get_type, gtk_object_sink, setFlags, sink |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpinButton(Adjustment adjustment, double climbRate, int digits)
adjustment
- The 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.public SpinButton(double min, double max, double step)
min
- Minimum allowable valuemax
- Maximum allowable valuestep
- Increment added or subtracted by spinning the widgetpublic SpinButton(Handle handle)
Method Detail |
public void configure(Adjustment adjustment, double climbRate, int digits)
adjustment
- An Adjustment
object to use.climbRate
- The new climb rate.digits
- The number of decimal places to display in the spin button.public void setAdjustment(Adjustment adjustment)
adjustment
- New adjustment object to usepublic Adjustment getAdjustment()
public void setPrecision(int digits)
digits
- Number of digits to be displayedpublic void setIncrements(double step, double page)
step
- Increment applied for a button 1 press.page
- Increment applied for a button 2 press.public void setRange(double min, double max)
min
- Minimum allowable value.max
- Maximum allowable value.public int getIntValue()
getValue()
.
public void setValue(double value)
value
- The value for the SpinButtonpublic void setUpdatePolicy(SpinButtonUpdatePolicy policy)
policy
- An update Policypublic void spin(SpinType direction, double increment)
direction
- A SpinType
indicating the direction to spin.increment
- Step increment to apply in the specified direction.public void setWrap(boolean wrap)
wrap
- If true, the value will wrappublic void setSnap(boolean snapToTicks)
snapToTicks
- A flag indicating if invalid values should be corrected.public double getValue()
public void setNumeric(boolean numeric)
numeric
- Set the flag to true or false.public void addListener(SpinListener listener)
SpinListener
public void removeListener(SpinListener listener)
addListener(SpinListener)
protected void fireSpinEvent(SpinEvent event)
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Entry
public EventType getEventType(java.lang.String signal)
getEventType
in class Entry
public static Type getType()
protected static final int gtk_spin_button_get_type()
protected static final void gtk_spin_button_configure(Handle spin_button, Handle adjustment, double climbRate, int digits)
protected static final Handle gtk_spin_button_new(Handle adjustment, double climbRate, int digits)
protected static final Handle gtk_spin_button_new_with_range(double min, double max, double step)
protected static final void gtk_spin_button_set_adjustment(Handle spin_button, Handle adjustment)
protected static final Handle gtk_spin_button_get_adjustment(Handle spin_button)
protected static final void gtk_spin_button_set_digits(Handle spin_button, int digits)
protected static final int gtk_spin_button_get_digits(Handle spin_button)
protected static final void gtk_spin_button_set_increments(Handle spin_button, double step, double page)
protected static final void gtk_spin_button_get_increments(Handle spin_button, double[] step, double[] page)
protected static final void gtk_spin_button_set_range(Handle spin_button, double min, double max)
protected static final void gtk_spin_button_get_range(Handle spin_button, double[] min, double[] max)
protected static final double gtk_spin_button_get_value(Handle spin_button)
protected static final int gtk_spin_button_get_value_as_int(Handle spin_button)
protected static final void gtk_spin_button_set_value(Handle spin_button, double value)
protected static final void gtk_spin_button_set_update_policy(Handle spin_button, int policy)
protected static final int gtk_spin_button_get_update_policy(Handle spin_button)
protected static final void gtk_spin_button_set_numeric(Handle spin_button, boolean numeric)
protected static final boolean gtk_spin_button_get_numeric(Handle spin_button)
protected static final void gtk_spin_button_spin(Handle spin_button, int direction, double increment)
protected static final void gtk_spin_button_set_wrap(Handle spin_button, boolean wrap)
protected static final boolean gtk_spin_button_get_wrap(Handle spin_button)
protected static final void gtk_spin_button_set_snap_to_ticks(Handle spin_button, boolean snapToTicks)
protected static final boolean gtk_spin_button_get_snap_to_ticks(Handle spin_button)
protected static final void gtk_spin_button_update(Handle spin_button)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |