org.jscience.architecture.traffic
Class ViewScroller

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.ScrollPane
              extended by org.jscience.architecture.traffic.ViewScroller
All Implemented Interfaces:
java.awt.event.AdjustmentListener, java.awt.event.ComponentListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class ViewScroller
extends java.awt.ScrollPane
implements java.awt.event.AdjustmentListener, java.awt.event.ComponentListener

DOCUMENT ME!

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.ScrollPane
java.awt.ScrollPane.AccessibleAWTScrollPane
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  View view
          DOCUMENT ME!
 
Fields inherited from class java.awt.ScrollPane
SCROLLBARS_ALWAYS, SCROLLBARS_AS_NEEDED, SCROLLBARS_NEVER
 
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
ViewScroller(View view)
          Create a new ViewScroller for a given Container and View.
ViewScroller(View view, boolean scrollbars)
          Create a new ViewScroller for a given Container and View.
 
Method Summary
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
          DOCUMENT ME!
 void center()
          Centers the view
 void center(java.awt.Point p)
          Centers the view on the specified infrastructure point
 void componentHidden(java.awt.event.ComponentEvent e)
          DOCUMENT ME!
 void componentMoved(java.awt.event.ComponentEvent e)
          DOCUMENT ME!
 void componentResized(java.awt.event.ComponentEvent e)
          DOCUMENT ME!
 void componentShown(java.awt.event.ComponentEvent e)
          DOCUMENT ME!
 java.awt.Point getCurrentCenter()
          Returns the current center point in infrastructure coordinate space
 void resizeInfra(java.awt.Dimension infras)
          Called when infrastructure is resized
 void scrollTo(java.awt.Point p)
          Scrolls the view to the specified infrastructure point
 void zoomIn(java.awt.Point p)
          Zooms the view in, centering on the given point
 void zoomOut(java.awt.Point p)
          Zooms the view out, centering on the given point
 void zoomTo(int index)
          Zooms the view to the specified index
 
Methods inherited from class java.awt.ScrollPane
addImpl, addNotify, doLayout, eventTypeEnabled, getAccessibleContext, getHAdjustable, getHScrollbarHeight, getScrollbarDisplayPolicy, getScrollPosition, getVAdjustable, getViewportSize, getVScrollbarWidth, isWheelScrollingEnabled, layout, paramString, printComponents, processMouseWheelEvent, setLayout, setScrollPosition, setScrollPosition, setWheelScrollingEnabled
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, getBaseline, getBaselineResizeBehavior, 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, handleEvent, 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, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, 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
 

Field Detail

view

protected View view
DOCUMENT ME!

Constructor Detail

ViewScroller

public ViewScroller(View view)
Create a new ViewScroller for a given Container and View.

Parameters:
view - the View for this ViewScroller

ViewScroller

public ViewScroller(View view,
                    boolean scrollbars)
Create a new ViewScroller for a given Container and View.

Parameters:
view - the View for this ViewScroller
scrollbars - the parentContainer for this ViewScroller
Method Detail

resizeInfra

public void resizeInfra(java.awt.Dimension infras)
Called when infrastructure is resized

Parameters:
infras - DOCUMENT ME!

center

public void center()
Centers the view


scrollTo

public void scrollTo(java.awt.Point p)
Scrolls the view to the specified infrastructure point

Parameters:
p - DOCUMENT ME!

center

public void center(java.awt.Point p)
Centers the view on the specified infrastructure point

Parameters:
p - DOCUMENT ME!

getCurrentCenter

public java.awt.Point getCurrentCenter()
Returns the current center point in infrastructure coordinate space

Returns:
DOCUMENT ME!

zoomTo

public void zoomTo(int index)
Zooms the view to the specified index

Parameters:
index - DOCUMENT ME!

zoomIn

public void zoomIn(java.awt.Point p)
Zooms the view in, centering on the given point

Parameters:
p - DOCUMENT ME!

zoomOut

public void zoomOut(java.awt.Point p)
Zooms the view out, centering on the given point

Parameters:
p - DOCUMENT ME!

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
DOCUMENT ME!

Specified by:
adjustmentValueChanged in interface java.awt.event.AdjustmentListener
Parameters:
e - DOCUMENT ME!

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
DOCUMENT ME!

Specified by:
componentHidden in interface java.awt.event.ComponentListener
Parameters:
e - DOCUMENT ME!

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
DOCUMENT ME!

Specified by:
componentMoved in interface java.awt.event.ComponentListener
Parameters:
e - DOCUMENT ME!

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
DOCUMENT ME!

Specified by:
componentResized in interface java.awt.event.ComponentListener
Parameters:
e - DOCUMENT ME!

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
DOCUMENT ME!

Specified by:
componentShown in interface java.awt.event.ComponentListener
Parameters:
e - DOCUMENT ME!