com.jmex.bui
Class BScrollingList<V,C extends BComponent>

java.lang.Object
  extended by com.jmex.bui.BComponent
      extended by com.jmex.bui.BContainer
          extended by com.jmex.bui.BScrollingList<V,C>
Direct Known Subclasses:
BButtonScrollingList, BMultiSelectBox

public abstract class BScrollingList<V,C extends BComponent>
extends BContainer


Nested Class Summary
protected  class BScrollingList.BViewport
           
protected static class BScrollingList.Entry<V,C extends BComponent>
          Used to track the total height of our entries.
 
Nested classes/interfaces inherited from class com.jmex.bui.BContainer
BContainer.ChildOp
 
Field Summary
protected  int _lastBottom
           
protected  BoundedRangeModel _model
           
protected  java.util.List<BScrollingList.Entry<V,C>> _values
           
protected  BScrollBar _vbar
           
protected  BScrollingList.BViewport _vport
           
protected  MouseWheelListener _wheelListener
           
protected static int EXTENT
           
 
Fields inherited from class com.jmex.bui.BContainer
_children, _layout
 
Fields inherited from class com.jmex.bui.BComponent
_alpha, _backgrounds, _bbuf, _borders, _colors, _cursor, _enabled, _height, _hover, _insets, _listeners, _parent, _preferredSize, _properties, _styleClass, _tipmouse, _tipStyle, _tiptext, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES
 
Constructor Summary
BScrollingList()
           
BScrollingList(java.util.Collection<V> values)
           
 
Method Summary
 void addValue(int index, V value)
           
protected  void addValue(int index, V value, boolean snap)
           
 void addValue(V value, boolean snapToBottom)
           
protected abstract  C createComponent(V value)
          Must be implemented by subclasses to instantiate the correct BComponent subclass for a given list value.
 void removeValues()
           
 void removeValuesFromTop(int num)
          Removes values from the top of the list.
 
Methods inherited from class com.jmex.bui.BContainer
add, add, add, add, applyOperation, computePreferredSize, getComponent, getComponentCount, getComponentIndex, getDefaultStyleClass, getHitComponent, getLayoutManager, getNextFocus, getPreviousFocus, layout, remove, remove, removeAll, renderComponent, replace, setAlpha, setEnabled, setLayoutManager, setVisible, validate, wasAdded, wasRemoved
 
Methods inherited from class com.jmex.bui.BComponent
acceptsFocus, addListener, addListeners, applyDefaultStates, boundsToString, changeCursor, configureStyle, createTooltipComponent, dispatchEvent, emitEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getCursor, getFocusTarget, getHeight, getInsets, getLocation, getName, getNextFocus, getParent, getPreferredSize, getPreviousFocus, getProperty, getState, getStateCount, getStatePseudoClass, getStyleClass, getTooltipText, getWidth, getWindow, getX, getY, hasFocus, intersectScissorBox, invalidate, isAdded, isConsumeMouseEvents, isEnabled, isHoverEnabled, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeListener, render, renderBackground, renderBorder, requestFocus, restoreScissorState, setBackground, setBounds, setConsumeMouseEvents, setCursor, setHoverEnabled, setLocation, setName, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleClass, setTooltipRelativeToMouse, setTooltipText, stateDidChange, updateCursor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_wheelListener

protected MouseWheelListener _wheelListener

_model

protected BoundedRangeModel _model

_values

protected java.util.List<BScrollingList.Entry<V,C extends BComponent>> _values

_vport

protected BScrollingList.BViewport _vport

_vbar

protected BScrollBar _vbar

_lastBottom

protected int _lastBottom

EXTENT

protected static final int EXTENT
See Also:
Constant Field Values
Constructor Detail

BScrollingList

public BScrollingList()

BScrollingList

public BScrollingList(java.util.Collection<V> values)
Method Detail

addValue

public void addValue(V value,
                     boolean snapToBottom)

addValue

public void addValue(int index,
                     V value)

removeValues

public void removeValues()

removeValuesFromTop

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


createComponent

protected abstract C createComponent(V value)
Must be implemented by subclasses to instantiate the correct BComponent subclass for a given list value.


addValue

protected void addValue(int index,
                        V value,
                        boolean snap)


Copyright © 2011 Michael Bayne. All Rights Reserved.