com.threerings.opengl.gui
Class ScrollPane

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.Container
          extended by com.threerings.opengl.gui.ScrollPane
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>

public class ScrollPane
extends Container

Provides a scrollable clipped view on a sub-heirarchy of components.


Nested Class Summary
protected static class ScrollPane.Viewport
          Does all the heavy lifting for the ScrollPane.
 
Nested classes/interfaces inherited from class com.threerings.opengl.gui.Container
Container.ChildOp
 
Field Summary
protected  ScrollBar _hbar
           
protected  ScrollButton _hlbtn
           
protected  ScrollButton _hmbtn
           
protected  boolean _layingOut
           
protected  boolean _showAlways
           
protected  ScrollBar _vbar
           
protected  ScrollButton _vlbtn
           
protected  ScrollButton _vmbtn
           
protected  ScrollPane.Viewport _vport
           
 
Fields inherited from class com.threerings.opengl.gui.Container
_children, _layout
 
Fields inherited from class com.threerings.opengl.gui.Component
_alpha, _backgrounds, _borders, _colors, _ctx, _cursor, _enabled, _height, _hover, _hoverable, _insets, _listeners, _parent, _preferredSize, _properties, _rect, _styleConfigs, _tipmouse, _tiptext, _tooltipStyle, _transferHandler, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES
 
Constructor Summary
ScrollPane(GlContext ctx, Component child)
           
ScrollPane(GlContext ctx, Component child, boolean vert, boolean horiz)
           
ScrollPane(GlContext ctx, Component child, boolean vert, boolean horiz, int snap)
           
ScrollPane(GlContext ctx, Component child, boolean vert, boolean horiz, int snap, boolean buttons)
           
 
Method Summary
 Component getChild()
          Returns a reference to the child of this scroll pane.
 ScrollBar getHorizontalScrollBar()
          Returns a reference to the horizontal scroll bar.
 ScrollBar getVerticalScrollBar()
          Returns a reference to the vertical scroll bar.
 void layout()
          Instructs this component to lay itself out.
 void setShowScrollbarAlways(boolean showAlways)
          Toggles the scroll bar policy.
 void setViewportStyleConfig(ConfigReference<StyleConfig> ref)
          Configures the style of the viewport (the non-scrolling container that will hold the scrolling contents).
 
Methods inherited from class com.threerings.opengl.gui.Container
add, add, add, add, applyOperation, computePreferredSize, getComponent, getComponentCount, getComponentIndex, getDefaultStyleConfig, getFirstDescendantFocus, getHitComponent, getLastDescendantFocus, getLayoutManager, getNextFocus, getPreviousFocus, remove, remove, removeAll, renderComponent, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate, wasAdded, wasRemoved
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, changeCursor, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFallbackState, getFocusTarget, getHeight, getInsets, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getWindow, getX, getY, hasFocus, intersectScissor, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, scrollRectToVisible, scrollRectToVisible, setBackground, setBounds, setCursor, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible, stateDidChange, updateCursor, updateFromStyleConfig, updateFromStyleConfig
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_vport

protected ScrollPane.Viewport _vport

_vbar

protected ScrollBar _vbar

_hbar

protected ScrollBar _hbar

_vlbtn

protected ScrollButton _vlbtn

_vmbtn

protected ScrollButton _vmbtn

_hlbtn

protected ScrollButton _hlbtn

_hmbtn

protected ScrollButton _hmbtn

_showAlways

protected boolean _showAlways

_layingOut

protected boolean _layingOut
Constructor Detail

ScrollPane

public ScrollPane(GlContext ctx,
                  Component child)

ScrollPane

public ScrollPane(GlContext ctx,
                  Component child,
                  boolean vert,
                  boolean horiz)

ScrollPane

public ScrollPane(GlContext ctx,
                  Component child,
                  boolean vert,
                  boolean horiz,
                  int snap)

ScrollPane

public ScrollPane(GlContext ctx,
                  Component child,
                  boolean vert,
                  boolean horiz,
                  int snap,
                  boolean buttons)
Method Detail

getChild

public Component getChild()
Returns a reference to the child of this scroll pane.


getVerticalScrollBar

public ScrollBar getVerticalScrollBar()
Returns a reference to the vertical scroll bar.


getHorizontalScrollBar

public ScrollBar getHorizontalScrollBar()
Returns a reference to the horizontal scroll bar.


setShowScrollbarAlways

public void setShowScrollbarAlways(boolean showAlways)
Toggles the scroll bar policy. If set to true, the bars will always show. If set to false, the bars will only show when needed.


setViewportStyleConfig

public void setViewportStyleConfig(ConfigReference<StyleConfig> ref)
Configures the style of the viewport (the non-scrolling container that will hold the scrolling contents).


layout

public void layout()
Description copied from class: Component
Instructs this component to lay itself out. This is called as a result of the component changing size.

Overrides:
layout in class Container