This object stores geometry information, such as upper and lower
bounds, step and page increments, and the size of a page. Other
object use an Adjustment object to store their internal dimenstion
settings. It also is passed as an argument to specify geometry.
Adjustment
public Adjustment(double value,
double lower,
double upper,
double stepIncrement,
double pageIncrement,
double pageSize)
Constructs a new adjustment
value
- The initial value.lower
- The minimum value.upper
- The maximum value.stepIncrement
- The step increment.pageIncrement
- The page increment.pageSize
- The page size.
Adjustment
public Adjustment(Handle handle)
Construct a new Adjustment from a handle to a
native resource.
clampPage
public void clampPage(double lower,
double upper)
Updates the GtkAdjustment value to ensure that the range
between lower and upper is in the current page (ie between
value and value + pageSize). If the range is larger than
the page size, then only the start of it will be in the
current page. A "changed" signal will be emitted if the
value is changed.
findListener
protected static int findListener(Vector list,
Object listener)
Give us a way to locate a specific listener in a Vector.
list
- The Vector of listeners to search.listener
- The object that is to be located in the Vector.
- Returns the index of the listener in the Vector, or -1 if
the listener is not contained in the Vector.
fireAdjustmentEvent
protected void fireAdjustmentEvent(AdjustmentEvent event)
getEventListenerClass
public Class getEventListenerClass(String signal)
- getEventListenerClass in interface GObject
getEventType
public EventType getEventType(String signal)
- getEventType in interface GObject
getLower
protected static final double getLower(Handle cptr)
getPageIncrement
protected static final double getPageIncrement(Handle cptr)
getPageSize
protected static final double getPageSize(Handle cptr)
getStepIncrement
protected static final double getStepIncrement(Handle cptr)
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface GtkObject
getUpper
protected static final double getUpper(Handle cptr)
getValue
public double getValue()
Gets the current value of the adjustment.
- The current value of the adjustment.
gtk_adjustment_changed
protected static final void gtk_adjustment_changed(Handle adjustment)
gtk_adjustment_clamp_page
protected static final void gtk_adjustment_clamp_page(Handle adjustment,
double lower,
double upper)
gtk_adjustment_get_type
protected static final int gtk_adjustment_get_type()
gtk_adjustment_get_value
protected static final double gtk_adjustment_get_value(Handle adjustment)
gtk_adjustment_new
protected static final Handle gtk_adjustment_new(double value,
double lower,
double upper,
double stepIncrement,
double pageIncrement,
double pageSize)
gtk_adjustment_set_value
protected static final void gtk_adjustment_set_value(Handle adjustment,
double value)
gtk_adjustment_value_changed
protected static final void gtk_adjustment_value_changed(Handle adjustment)
handleChanged
public void handleChanged()
setValue
public void setValue(double value)
Sets the GtkAdjustment value.