|
java-gnome version 4.0.7 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
java.lang.Objectorg.freedesktop.bindings.Proxy
org.gnome.glib.Object
org.gnome.gtk.Object
org.gnome.gtk.Adjustment
public class Adjustment
An Adjustment object contains an adjustment value with a pair of associated
values that determine its lower and upper bound. Also, step and page
increments as well as a page size are available. The Adjustment is not a
Widget itself, but rather is used in conjunction with other Widgets such as
SpinButton, Viewport, Range, HScrollbar,
HScale, VScale and TreeView.
A single Adjustment object can be shared by more than one Widget. Thus if you need to have more than one Widget behave similarly with respect to horizontal and vertical aspects, a single Adjustment object will do.
An Adjustment object does not update its own values. The associated widgets
that use the Adjustment are free to change its values though. Associated
widgets that use an Adjustment, call the valueChanged()
method on the widget, causing a VALUE_CHANGED signal to be
emitted.
| Nested Class Summary | |
|---|---|
static interface |
Adjustment.CHANGED
This signal is emitted when one or more of Adjustment's fields, other than the value field have been changed. |
static interface |
Adjustment.VALUE_CHANGED
This signal is emitted when Adjustment's value field has been changed. |
| Constructor Summary | |
|---|---|
Adjustment(double value,
double lower,
double upper,
double stepIncrement,
double pageIncrement,
double pageSize)
Create a new Adjustment, with given values for the initial value, the lower and upper bounds, the single step increment values, the page increment values and the page size. |
|
| Method Summary | |
|---|---|
void |
changed()
Emits a CHANGED signal from the Adjustment widget. |
void |
clampPage(double lower,
double upper)
Update the Adjustment's value, to ensure that the bound, defined by lower and upper, is in the current page. |
void |
connect(Adjustment.CHANGED handler)
Hook up a CHANGED handler. |
void |
connect(Adjustment.VALUE_CHANGED handler)
Hook up a VALUE_CHANGED handler. |
double |
getValue()
Get the current value of the Adjustment. |
void |
setValue(double value)
Set the value of the Adjustment. |
void |
valueChanged()
Emits a VALUE_CHANGED signal on the Adjustment. |
| Methods inherited from class org.freedesktop.bindings.Proxy |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Adjustment(double value,
double lower,
double upper,
double stepIncrement,
double pageIncrement,
double pageSize)
An Adjustment created without passing any arguments to the constructor causes all the parameters to be set to 0.
value - the initial setting for the value property of
the Adjustmentlower - the lower bound of the Adjustmentupper - the upper bound of the AdjustmentstepIncrement - the single step increment value of the AdjustmentpageIncrement - the page increment value of the AdjustmentpageSize - the size of the page of the Adjustment| Method Detail |
|---|
public void changed()
CHANGED signal from the Adjustment widget. This
method will typically be called by the Widget with which the Adjustment
is associated when it changes any of Adjustment's properties, other
than value.
If you have changed value is changed, the
valueChanged() method is called instead.
public void clampPage(double lower,
double upper)
lower and upper, is in the current page.
Thus, it will lie between value and
value + pageSize that you set in the constructor. If the
bound is larger than the page size, then only the start of it will be
in the current page.
As always, a CHANGED signal is emitted if the value is
changed.
public void connect(Adjustment.CHANGED handler)
CHANGED handler.
public void connect(Adjustment.VALUE_CHANGED handler)
VALUE_CHANGED handler.
public double getValue()
setValue().
public void setValue(double value)
public void valueChanged()
VALUE_CHANGED signal on the Adjustment. This
method will typically be called by the Widget with which the Adjustment
is associated, when it changes the Adjustment's value.
|
![]() java-gnome |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||