Class sgraphics.Adjustment
All Packages Class Hierarchy This Package Previous Next Index
Class sgraphics.Adjustment
java.lang.Object
|
+----java.util.Observable
|
+----sgraphics.Adjustment
- public class Adjustment
- extends Observable
An adjustment is two segments that represent the possible and
current range of values for a bounded value, such as would
be used for scrolling.
Adjustment supports transactions. Calls made outside a
transaction take affect immediately.
-
Adjustment()
-
-
begin()
- Begin a transaction.
-
cancel()
- Cancel a transaction.
-
commit()
- End a transaction.
-
constrain(float)
- Modify the given coordinate if necessary to keep
it within the adjustment's settings.
-
getAdjustmentConstraint()
- Get the constraint used to constrain the scroll region.
-
getLargeScroll()
- Get the page forward and backward ammount.
-
getSettings()
- Retrieve the current settings of the adjustment.
-
getSmallScroll()
- Get the scroll forward and backward ammount.
-
pageBackward()
-
-
pageForward()
-
-
scaleTo(float)
- Request that the adjustment change its current length,
effectively scaling the adjustment so that it covers
more or less of the total segment.
-
scrollBackward()
-
-
scrollBegin()
-
-
scrollBy(float)
- Request that the adjustment change its lower position
to add the given delta (which may be negative).
-
scrollEnd()
-
-
scrollForward()
-
-
scrollTo(float)
- Request that the adjustment change its lower position
to the given coordinate.
-
setAdjustmentConstraint(AdjustmentConstraint)
- Set the constraint used to constrain the scroll region.
-
setLargeScroll(float)
- Set the page forward and backward ammount.
-
setSmallScroll(float)
- Set the scroll forward and backward ammount.
Adjustment
public Adjustment()
begin
public abstract void begin()
- Begin a transaction.
commit
public abstract void commit()
- End a transaction.
cancel
public abstract void cancel()
- Cancel a transaction.
setAdjustmentConstraint
public abstract void setAdjustmentConstraint(AdjustmentConstraint constraint)
- Set the constraint used to constrain the scroll region.
getAdjustmentConstraint
public abstract AdjustmentConstraint getAdjustmentConstraint()
- Get the constraint used to constrain the scroll region.
constrain
public abstract float constrain(float constraint)
- Modify the given coordinate if necessary to keep
it within the adjustment's settings. If the given
value is below the adjustment's lower bound, then
set it to the lower bound. If the given value
plus the current length is large than the adjustment's
upper bound, then set it to be the upper bound minus
the current length.
getSettings
public abstract AdjustmentSettings getSettings()
- Retrieve the current settings of the adjustment.
scaleTo
public abstract void scaleTo(float length)
- Request that the adjustment change its current length,
effectively scaling the adjustment so that it covers
more or less of the total segment.
scrollBy
public abstract void scrollBy(float delta)
- Request that the adjustment change its lower position
to add the given delta (which may be negative).
scrollForward
public abstract void scrollForward()
scrollBackward
public abstract void scrollBackward()
pageForward
public abstract void pageForward()
pageBackward
public abstract void pageBackward()
scrollBegin
public abstract void scrollBegin()
scrollEnd
public abstract void scrollEnd()
scrollTo
public abstract void scrollTo(float lower)
- Request that the adjustment change its lower position
to the given coordinate.
setSmallScroll
public abstract void setSmallScroll(float size)
- Set the scroll forward and backward ammount.
getSmallScroll
public abstract float getSmallScroll()
- Get the scroll forward and backward ammount.
setLargeScroll
public abstract void setLargeScroll(float size)
- Set the page forward and backward ammount.
getLargeScroll
public abstract float getLargeScroll()
- Get the page forward and backward ammount.
All Packages Class Hierarchy This Package Previous Next Index