org.strbio.util
Class JMCScrollPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by org.strbio.util.JMCScrollPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class JMCScrollPane
extends java.awt.Panel

This is basically a lame re-implementation of ScrollPane, but it works with AWT 1.0 applets... can therefore use for Netscape 4.0, which supports Java 1.1 with AWT 1.0. Scroll bars are always visible, even when unnecessary.

  Version 1.01, 8/14/98 - made it really AWT 1.0 compliant; i.e. no
    Adjustable, size(), etc..
  Version 1.0, 8/12/98 - original version.
  

Version:
1.01, 8/14/98
Author:
JMC
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JMCScrollPane(java.awt.Component c)
          Create a ScrollPane containing an AWT component; this component shouldn't be added anywhere else.
 
Method Summary
 java.awt.Scrollbar getHScrollbar()
          returns the horizontal scroll bar.
 java.awt.Rectangle getViewRect()
          Gets the viewport rectangle
 java.awt.Scrollbar getVScrollbar()
          returns the vertical scroll bar.
 boolean handleEvent(java.awt.Event evt)
           
 boolean mouseDown(java.awt.Event evt, int x, int y)
          mouse events are passed through to the child
 boolean mouseUp(java.awt.Event evt, int x, int y)
          mouse events are passed through to the child
 void paint(java.awt.Graphics g)
           
 void revalidate()
          should be called if the image or the size of the window are changed.
 void setBackground(java.awt.Color c)
          Sets the background of the viewport, not the scroll bars
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDrag, mouseEnter, mouseExit, mouseMove, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JMCScrollPane

public JMCScrollPane(java.awt.Component c)
Create a ScrollPane containing an AWT component; this component shouldn't be added anywhere else.

Method Detail

handleEvent

public boolean handleEvent(java.awt.Event evt)
Overrides:
handleEvent in class java.awt.Component

mouseUp

public boolean mouseUp(java.awt.Event evt,
                       int x,
                       int y)
mouse events are passed through to the child

Overrides:
mouseUp in class java.awt.Component

mouseDown

public boolean mouseDown(java.awt.Event evt,
                         int x,
                         int y)
mouse events are passed through to the child

Overrides:
mouseDown in class java.awt.Component

revalidate

public void revalidate()
should be called if the image or the size of the window are changed.


paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class java.awt.Container

getHScrollbar

public java.awt.Scrollbar getHScrollbar()
returns the horizontal scroll bar.


getVScrollbar

public java.awt.Scrollbar getVScrollbar()
returns the vertical scroll bar.


setBackground

public void setBackground(java.awt.Color c)
Sets the background of the viewport, not the scroll bars

Overrides:
setBackground in class java.awt.Component

getViewRect

public java.awt.Rectangle getViewRect()
Gets the viewport rectangle