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.


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.Component
DEFAULT, DISABLED, HOVER
 
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, getComponent, getComponentCount, getComponentIndex, getHitComponent, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, dispatchEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setBackground, setBounds, setCursor, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.



Copyright © 2011. All Rights Reserved.