charvax.swing

Class JScrollPane

Implemented Interfaces:
EventListener, ScrollListener

public class JScrollPane
extends Container
implements ScrollListener

provides a scrollable view of a component.

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

JScrollPane()
Creates an empty JScrollPane.
JScrollPane(Component component_)
Create a JScrollPane that displays the contents of the specified component.

Method Summary

void
debug(int level_)
void
draw()
JViewport
getViewport()
Returns the viewport of the component being displayed.
Border
getViewportBorder()
Returns a reference to the border around the JScrollPane's viewport.
Dimension
minimumSize()
Overrides the minimumSize() method of Container.
void
scroll(ScrollEvent e_)
Called by a Scrollable object such as JTable or JList, when its state changes in such a way that it may need to be scrolled.
void
setSize(Dimension size_)
Overrides the corresponding method in Container.
void
setSize(int width_, int height_)
Overrides the corresponding method in Container.
void
setViewportBorder(Border viewportBorder_)
Adds a border around the viewport.
void
setViewportView(Component component_)
Creates a viewport if necessary, and then sets its view.
String
toString()

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, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setParent, setVisible, show, validate, validateCursesColor

Constructor Details

JScrollPane

public JScrollPane()
Creates an empty JScrollPane.

JScrollPane

public JScrollPane(Component component_)
Create a JScrollPane that displays the contents of the specified component.
Parameters:
component_ - The component to be displayed. This component must implement the Scrollable interface.

Method Details

debug

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

draw

public void draw()
Overrides:
draw in interface Container

getViewport

public JViewport getViewport()
Returns the viewport of the component being displayed.

getViewportBorder

public Border getViewportBorder()
Returns a reference to the border around the JScrollPane's viewport.

minimumSize

public Dimension minimumSize()
Overrides the minimumSize() method of Container.
Overrides:
minimumSize in interface Container

scroll

public void scroll(ScrollEvent e_)
Called by a Scrollable object such as JTable or JList, when its state changes in such a way that it may need to be scrolled.
Specified by:
scroll in interface ScrollListener

setSize

public void setSize(Dimension size_)
Overrides the corresponding method in Container.
Overrides:
setSize in interface Container

setSize

public void setSize(int width_,
                    int height_)
Overrides the corresponding method in Container.
Overrides:
setSize in interface Container

setViewportBorder

public void setViewportBorder(Border viewportBorder_)
Adds a border around the viewport.

setViewportView

public void setViewportView(Component component_)
Creates a viewport if necessary, and then sets its view.
Parameters:
component_ - the view to set in the viewport.

toString

public String toString()