|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gnu.glib.GObject | +--org.gnu.gtk.GtkObject | +--org.gnu.gtk.Widget | +--org.gnu.gtk.Range | +--org.gnu.gtk.Scale
A Scale is a slider control used to select a numeric value. To use it,
you'll probably want to investigate the methods on its base class,
Range
, in addition to the methods for Scale itself. To set the
value of a scale, you would normally use Range.setValue(double)
.
To detect changes to the value, add RangeListener object to the widget.
The GtkScale widget is an abstract class, used only for deriving the
subclasses HScale
and VScale
.
HScale
,
VScale
Method Summary | |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
GtkEventType |
getEventType(java.lang.String signal)
|
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
void |
removeFormatListener()
Removes the format listener |
void |
setDigits(int digits)
Sets the number of decimal places that are displayed in the value. |
void |
setDrawValue(boolean setting)
Specifies whether the current value is displayed as a string next to the slider. |
void |
setFormatListener(ScaleListener listener)
Sets a listener to be used when a format-value request is called. |
void |
setValuePosition(PositionType pos)
Sets the position in which the current value is displayed. |
Methods inherited from class org.gnu.gtk.Range |
addRangeListener, getAdjustment, getInverted, getUpdatePolicy, getValue, removeRangeListener, setAdjustment, setIncrements, setInverted, setRange, setUpdatePolicy, setValue |
Methods inherited from class org.gnu.glib.GObject |
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, equals, getData, getHandle, removeEventHandler, setData |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void setDigits(int digits)
digits
- The number of decimal places to display, e.g. use 1 to
display 1.0, 2 to display 1.00 etc.public void setValuePosition(PositionType pos)
pos
- The position in which the current value is displayed.public void setDrawValue(boolean setting)
setting
- If true, the value is displayed.public void setFormatListener(ScaleListener listener)
public void removeFormatListener()
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Range
public GtkEventType getEventType(java.lang.String signal)
getEventType
in class Range
public static Type getType()
|
Please send any bug reports, comments, or suggestions for the API or documentation to java-gnome-developer@lists.sf.net | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |