Class sgraphics.layout.Viewport
All Packages Class Hierarchy This Package Previous Next Index
Class sgraphics.layout.Viewport
java.lang.Object
|
+----sgraphics.GlyphImpl
|
+----sgraphics.MonoGlyph
|
+----sgraphics.layout.Viewport
- public class Viewport
- extends MonoGlyph
- implements Axis
A viewport allows adjustment of the view of a glyph.
-
GIVEN
-
-
NATURAL
-
-
Viewport(Glyph)
-
-
allocate(Allocation)
-
-
currentLength(int)
-
-
currentLower(int)
-
-
getAllocationMode(int)
- Get the allcoation mode.
-
getScrollAdjustment(int)
- Get the adjustment for an axis.
-
length(int)
-
-
lower(int)
-
-
needResize()
- This calls up the parent chain which leads to resizing and redrawing
all the glyphs under the Viewer.
-
requirements()
- Ask for the glyph's geometry requirements.
-
scrollTo(int, float)
-
-
setAllocationMode(int, int)
- By default, a viewport allocates the natural span
requested by its child in bot the X and Y dimensions.
NATURAL
public final static int NATURAL
GIVEN
public final static int GIVEN
Viewport
public Viewport(Glyph child)
requirements
public Requirements requirements()
- Ask for the glyph's geometry requirements.
- Overrides:
- requirements in class MonoGlyph
needResize
public void needResize()
- This calls up the parent chain which leads to resizing and redrawing
all the glyphs under the Viewer.
- Overrides:
- needResize in class GlyphImpl
setAllocationMode
public void setAllocationMode(int mode,
int axis)
- By default, a viewport allocates the natural span
requested by its child in bot the X and Y dimensions.
This method changes the mode for a given dimension.
- Parameters:
- mode - NATURAL or GIVEN.
- axis - the axis.
getAllocationMode
public int getAllocationMode(int axis)
- Get the allcoation mode.
- Returns:
- NATURAL or GIVEN.
getScrollAdjustment
public Adjustment getScrollAdjustment(int axis)
- Get the adjustment for an axis. This can be used to
change the scroll position and it is observable.
- Parameters:
- axis - the axis of the adjustment.
- Returns:
- the adjustment.
scrollTo
protected void scrollTo(int axis,
float lower)
lower
protected float lower(int axis)
length
protected float length(int axis)
currentLower
protected float currentLower(int axis)
currentLength
protected float currentLength(int axis)
allocate
public void allocate(Allocation a)
- Overrides:
- allocate in class MonoGlyph
All Packages Class Hierarchy This Package Previous Next Index