charvax.swing
Class JScrollPane

java.lang.Object
  extended bycharva.awt.Component
      extended bycharva.awt.Container
          extended bycharvax.swing.JScrollPane
All 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
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
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()
          Draw all the components in this container.
 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.
 java.lang.String toString()
           
 
Methods inherited from class charva.awt.Container
add, add, doLayout, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getCurrentFocus, getHeight, getInsets, getSize, getWidth, invalidate, isFocusTraversable, isValid, nextFocus, previousFocus, processKeyEvent, remove, requestFocus, setBackground, setFocus, setForeground, setHeight, setLayout, setWidth, validate
 
Methods inherited from class charva.awt.Component
addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, isDisplayed, isEnabled, isTotallyObscured, isVisible, processEvent, processFocusEvent, processMouseEvent, repaint, requestSync, setBounds, setBounds, setBounds, setEnabled, setLocation, setLocation, setName, setParent, setVisible, show, validateCursesColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

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.

getViewport

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


setSize

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

Overrides:
setSize in class Container

setSize

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

Overrides:
setSize in class Container

minimumSize

public Dimension minimumSize()
Overrides the minimumSize() method of Container.

Overrides:
minimumSize in class 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

draw

public void draw()
Description copied from class: Container
Draw all the components in this container.

Overrides:
draw in class Container

setViewportBorder

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


getViewportBorder

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


debug

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

toString

public java.lang.String toString()