com.yospace.yae.yogi
Class YogiScrollPane

java.lang.Object
  |
  +--com.yospace.yae.yogi.YogiComponent
        |
        +--com.yospace.yae.yogi.YogiScrollPane
All Implemented Interfaces:
PropertyChangeListener

public class YogiScrollPane
extends YogiComponent
implements PropertyChangeListener

Scroll pane class. Acts as a parent for 2 scrollbars and a content pane.


Fields inherited from class com.yospace.yae.yogi.YogiComponent
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, BORDER_DOTTED, BORDER_NONE, BORDER_PLAIN, BORDER_ROUNDED, BORDER_SOLID, COLOR_BACKGROUND, COLOR_BORDER, COLOR_FOREGROUND, FOCUS_DEFAULT, FOCUS_OFF, FOCUS_ON, PROPERTY_ALIGN, PROPERTY_BORDER_STYLE, PROPERTY_BOUNDS, PROPERTY_COLOR, PROPERTY_CONTEXT_ENABLED, PROPERTY_ENABLED, PROPERTY_FOCUS, PROPERTY_FOCUS_INDEX, PROPERTY_FOCUS_TRAVERSABLE, PROPERTY_FONT, PROPERTY_HOTKEY, PROPERTY_LOCATION, PROPERTY_OPAQUE, PROPERTY_SIZE, PROPERTY_VISIBLE, PROPERTY_X_INSET, PROPERTY_Y_INSET
 
Constructor Summary
YogiScrollPane()
          Default constructor where the two scrollbars are set to be at the right and bottom of the screen and will appear as needed.
YogiScrollPane(int horizontalConfig, int verticalConfig, int horizontalPlacement, int verticalPlacement)
          Constructs a YogiScrollPane with its scrollbars set to the specified configuration and placement.
YogiScrollPane(YogiComponent content)
          Constructs a YogiScrollPane with the specified contents.
 
Method Summary
 void add(YogiComponent c)
          Overrides the YogiComponent.add(YogiComponent c) method, to add any objects to the content pane rather than the scroll pane.
 YogiScrollContentPane getContentPane()
          Gets the scrollable content pane.
 YogiScrollBar getHorizScroller()
          Gets the horizontal scrollbar.
 YogiScrollBar getVertScroller()
          Gets the vertical scrollbar.
 void propertyChanged(java.lang.Object source, int property)
          Required by the PropertyChangeListener interface.
 void remove(YogiComponent c)
          Overrides the YogiComponent.remove(YogiComponent c) method, to remove any objects from the content pane rather than the scroll pane.
 void setHorizScroller(YogiScrollBar horizScroller)
          Sets the horizontal scrollbar.
 void setVertScroller(YogiScrollBar vertScroller)
          Sets the vertical scrollbar.
 
Methods inherited from class com.yospace.yae.yogi.YogiComponent
_debugPrintComponents, addPropertyChangeListener, bringForwards, bringInFrontOf, bringToFront, contains, containsComponent, ensureVisible, ensureVisible, findComponentAt, findCurrentFocus, findFirstFocus, findFocusDomainRoot, findFocusDomainRootImpl, findHotkeyComponent, findNextFocus, fireActionPerformedEvent, firePropertyChangeEvent, getAlign, getBorderStyle, getBounds, getColor, getColors, getComponent, getComponent, getComponentCount, getComponentIndex, getComponents, getFocusBounds, getFocusIndex, getFont, getGlobalLocation, getHeight, getHotkey, getId, getParent, getParent, getTreeLock, getUI, getWidth, getX, getXInset, getY, getYInset, hasFocus, isActive, isContextEnabled, isEnabled, isFocusDomainRoot, isFocusTraversable, isOpaque, isVisible, keyPressed, keyReleased, keyRepeated, paint, paintBackground, paintBorder, paintForeground, pointerDragged, pointerPressed, pointerReleased, remove, removeAll, removePropertyChangeListener, repaint, repaint, repaintAfterRebounding, requestFocus, requestFocus, sendBackwards, sendBehind, sendToBack, setActionListener, setActive, setAlign, setBorderStyle, setBounds, setColor, setColors, setContextEnabled, setDefaultColor, setEnabled, setFocusDomainRoot, setFocusIndex, setFocusTraversable, setFont, setHotkey, setId, setLocation, setNoFocus, setOpaque, setProperty, setSize, setUI, setVisible, setXInset, setYInset, updateUI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YogiScrollPane

public YogiScrollPane()
Default constructor where the two scrollbars are set to be at the right and bottom of the screen and will appear as needed.

YogiScrollPane

public YogiScrollPane(YogiComponent content)
Constructs a YogiScrollPane with the specified contents. The two scrollbars are set to be at the right and bottom of the screen and will appear as needed.
Parameters:
content - the YogiComponent to be displayed in the scroll pane.

YogiScrollPane

public YogiScrollPane(int horizontalConfig,
                      int verticalConfig,
                      int horizontalPlacement,
                      int verticalPlacement)
Constructs a YogiScrollPane with its scrollbars set to the specified configuration and placement.
Parameters:
horizontalConfig - the configuration of the horizontal scrollbar.
verticalConfig - the configuration of the vertical scrollbar.
horizontalPlacement - the placement of the horizontal scrollbar.
verticalPlacement - the placement of the vertical scrollbar.
See Also:
YogiScrollBar
Method Detail

getHorizScroller

public YogiScrollBar getHorizScroller()
Gets the horizontal scrollbar.
Returns:
the horizontal scrollbar

getVertScroller

public YogiScrollBar getVertScroller()
Gets the vertical scrollbar.
Returns:
the vertical scrollbar

setHorizScroller

public void setHorizScroller(YogiScrollBar horizScroller)
Sets the horizontal scrollbar.
Parameters:
horizScroller - the new horizontal scrollbar

setVertScroller

public void setVertScroller(YogiScrollBar vertScroller)
Sets the vertical scrollbar.
Parameters:
vertScroller - the new vertical scrollbar

getContentPane

public YogiScrollContentPane getContentPane()
Gets the scrollable content pane.
Returns:
the scrollable content pane.

add

public void add(YogiComponent c)
Overrides the YogiComponent.add(YogiComponent c) method, to add any objects to the content pane rather than the scroll pane.
Overrides:
add in class YogiComponent
Parameters:
c - the component to add.

remove

public void remove(YogiComponent c)
Overrides the YogiComponent.remove(YogiComponent c) method, to remove any objects from the content pane rather than the scroll pane.
Overrides:
remove in class YogiComponent
Parameters:
c - the component to remove.

propertyChanged

public void propertyChanged(java.lang.Object source,
                            int property)
Required by the PropertyChangeListener interface. Notified by the content pane when its contents change, and sets the modes of the scrollbars appropriately.
Specified by:
propertyChanged in interface PropertyChangeListener
Parameters:
source - the source of the property change event
property - the code of the property that changed

Copyright 2002 Yospace Holdings Ltd. All Rights Reserved.