com.threerings.opengl.gui
Class ScrollingList<V,C extends Component>

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

public abstract class ScrollingList<V,C extends Component>
extends Container

Provides a scrollable, lazily instantiated component view of values


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.Component
DEFAULT, DISABLED, HOVER
 
Constructor Summary
ScrollingList(GlContext ctx)
          Instantiates an empty ScrollingList.
ScrollingList(GlContext ctx, Collection<? extends V> values)
          Instantiates a ScrollingList with an initial value collection.
 
Method Summary
 void addValue(int index, V value)
          Inserts a value into our list at the specified position.
 void addValue(V value, boolean snapToBottom)
          Appends a value to our list, possibly scrolling our view to display it.
 void addValues(Collection<? extends V> values)
          Inserts a collection of values into our list.
 void addValues(int index, Collection<? extends V> values)
          Inserts a collection of values into our list starting at the specified position.
 int getIndex(V value)
          Returns the index of a value.
 void removeValues()
          Clears all the current values and any related components.
 void removeValuesAt(int index, int num)
          Removes values starting at a specific index.
 void removeValuesFromTop(int num)
          Removes values from the top of the list.
 void snapToValue(V value)
          Snaps the view so the value is at the top.
 
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

ScrollingList

public ScrollingList(GlContext ctx)
Instantiates an empty ScrollingList.


ScrollingList

public ScrollingList(GlContext ctx,
                     Collection<? extends V> values)
Instantiates a ScrollingList with an initial value collection.

Method Detail

addValue

public void addValue(V value,
                     boolean snapToBottom)
Appends a value to our list, possibly scrolling our view to display it.


addValue

public void addValue(int index,
                     V value)
Inserts a value into our list at the specified position.


addValues

public void addValues(Collection<? extends V> values)
Inserts a collection of values into our list.


addValues

public void addValues(int index,
                      Collection<? extends V> values)
Inserts a collection of values into our list starting at the specified position.


removeValues

public void removeValues()
Clears all the current values and any related components.


getIndex

public int getIndex(V value)
Returns the index of a value.


removeValuesFromTop

public void removeValuesFromTop(int num)
Removes values from the top of the list.


removeValuesAt

public void removeValuesAt(int index,
                           int num)
Removes values starting at a specific index.


snapToValue

public void snapToValue(V value)
Snaps the view so the value is at the top.



Copyright © 2011. All Rights Reserved.