charvax.swing

Class JViewport


public class JViewport
extends Container

The JViewport class provides a scrollable window onto an underlying component, whose size can be greater than the size of the JViewport. The underlying component must implement the Scrollable interface.

Field Summary

Fields inherited from class charva.awt.Container

_components, _currentFocus, _insets, _isValid, _layoutMgr, _minimumSize, _size

Fields inherited from class charva.awt.Component

BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT, _alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible

Constructor Summary

JViewport()
Construct a JViewport.

Method Summary

void
debug(int level_)
void
draw()
Rectangle
getBounds()
Dimension
getExtentSize()
Returns the size of the visible part of the view.
Component
getView()
Returns the JViewport's one child.
Point
getViewPosition()
Gets the coordinates of the origin of the view, relative to the origin of the viewport.
Dimension
getViewSize()
Returns the child component's size.
void
setView(Component child_)
Set the JViewport's one child.
void
setViewPosition(Point origin_)
Sets the coordinates of the origin of the view, relative to the origin of the viewport.

Methods inherited from class charva.awt.Container

add, add, debug, doLayout, draw, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getCurrentFocus, getHeight, getInsets, getSize, getWidth, invalidate, isFocusTraversable, isValid, minimumSize, nextFocus, previousFocus, processKeyEvent, remove, requestFocus, setBackground, setFocus, setForeground, setHeight, setLayout, setSize, setSize, setWidth, validate

Methods inherited from class charva.awt.Component

addFocusListener, addKeyListener, contains, contains, debug, draw, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getHeight, getLocation, getLocationOnScreen, getName, getParent, getSize, getWidth, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isTotallyObscured, isValid, isVisible, minimumSize, processEvent, processFocusEvent, processKeyEvent, processMouseEvent, repaint, requestFocus, requestSync, setBackground, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Constructor Details

JViewport

public JViewport()
Construct a JViewport.

Method Details

debug

public void debug(int level_)
Overrides:
debug in interface Container

draw

public void draw()
Overrides:
draw in interface Container

getBounds

public Rectangle getBounds()
Overrides:
getBounds in interface Component

getExtentSize

public Dimension getExtentSize()
Returns the size of the visible part of the view.

getView

public Component getView()
Returns the JViewport's one child.

getViewPosition

public Point getViewPosition()
Gets the coordinates of the origin of the view, relative to the origin of the viewport.

getViewSize

public Dimension getViewSize()
Returns the child component's size.

setView

public void setView(Component child_)
Set the JViewport's one child.

setViewPosition

public void setViewPosition(Point origin_)
Sets the coordinates of the origin of the view, relative to the origin of the viewport.