|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Range
org.gnu.gtk.Scale
public abstract class 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 | |
---|---|
boolean |
getDrawValue()
Returns whether the current value is displayed as a string next to the slider. |
java.lang.Class |
getEventListenerClass(java.lang.String signal)
|
EventType |
getEventType(java.lang.String signal)
|
Layout |
getLayout()
Gets the Layout used to display the scale. |
int |
getLayoutOffsetX()
Obtains the X coordinate where the scale will draw the Layout representing the text in the scale. |
int |
getLayoutOffsetY()
Obtains the Y coordinate where the scale will draw the Layout representing the text in the scale. |
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 |
---|
addListener, addRangeListener, getAdjustment, getInverted, getUpdatePolicy, getValue, removeRangeListener, setAdjustment, setIncrements, setInverted, setRange, setUpdatePolicy, setValue |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, 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 boolean getDrawValue()
public void setFormatListener(ScaleListener listener)
public void removeFormatListener()
public java.lang.Class getEventListenerClass(java.lang.String signal)
getEventListenerClass
in class Range
public EventType getEventType(java.lang.String signal)
getEventType
in class Range
public Layout getLayout()
Layout
used to display the scale.
Layout
for this scale, or NULL if the
getDrawValue()
is FALSE.public int getLayoutOffsetX()
Layout
representing the text in the scale.
If getDrawValue()
is FALSE, the return value is undefined.
public int getLayoutOffsetY()
Layout
representing the text in the scale.
If getDrawValue()
is FALSE, the return value is undefined.
public static Type getType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |