edu.cmu.sun.view
Class ListView

java.lang.Object
  extended by Component3D
      extended by edu.cmu.sun.view.AbstractListView
          extended by edu.cmu.sun.view.ListView

public class ListView
extends AbstractListView

The view of a list within a window in the file manager


Field Summary
(package private)  int currentPosition
           
private  int currentSize
           
(package private) static float DEPTH
           
(package private)  java.util.List<ItemView> itemViews
          a set of itemViews so that we can access them later.
(package private)  Component3D listItemContainer
          component that holds the item views.
(package private)  BoxComponent slab
           
(package private) static float WIDTH
           
 
Fields inherited from class edu.cmu.sun.view.AbstractListView
layout
 
Constructor Summary
ListView(LayoutComponent layout)
           
 
Method Summary
private  void addListItemViews()
          adds all of the ListItemViews to this component.
 java.util.List<ItemModel> getActiveListItemModels()
           
 float getHeight()
           
 ItemView getItemViewMatchingModel(ItemModel itemModel)
           
private  boolean getItemVisibility(int index)
          returns the visibility for an ItemView at the specified index in the model
private  float getItemYPosition(int index)
          returns the Y position for the listItemContainer
private  float getListContainerYPosition()
           
private  javax.vecmath.Vector3f getSlabScaling()
           
private  void initialize()
          creates the SLAB component, the container component for ListItemViews and the ListItemsViews for this list view.
 void syncToLayout(LayoutComponent newLayout, AnimationPlan plan)
           
 void update(AnimationPlan plan, int msec)
           
private  void updateNow()
           
private  void updateNow(AnimationPlan plan)
          updates using set methods instead of change (To avoid animation) used in ListView recycling.
 
Methods inherited from class edu.cmu.sun.view.AbstractListView
getAppearance, getLayout, setLayout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

slab

BoxComponent slab

listItemContainer

Component3D listItemContainer
component that holds the item views. this component moves to scroll the items.


itemViews

java.util.List<ItemView> itemViews
a set of itemViews so that we can access them later.


currentPosition

int currentPosition

currentSize

private int currentSize

WIDTH

static final float WIDTH
See Also:
Constant Field Values

DEPTH

static final float DEPTH
See Also:
Constant Field Values
Constructor Detail

ListView

public ListView(LayoutComponent layout)
Method Detail

initialize

private void initialize()
creates the SLAB component, the container component for ListItemViews and the ListItemsViews for this list view.


addListItemViews

private void addListItemViews()
adds all of the ListItemViews to this component. initially, they are all invisible and not yet positioned


getItemYPosition

private float getItemYPosition(int index)
returns the Y position for the listItemContainer

Returns:

getListContainerYPosition

private float getListContainerYPosition()

getItemVisibility

private boolean getItemVisibility(int index)
returns the visibility for an ItemView at the specified index in the model

Returns:

getActiveListItemModels

public java.util.List<ItemModel> getActiveListItemModels()

update

public void update(AnimationPlan plan,
                   int msec)
Specified by:
update in class AbstractListView

updateNow

private void updateNow()

updateNow

private void updateNow(AnimationPlan plan)
updates using set methods instead of change (To avoid animation) used in ListView recycling.

Parameters:
plan -

getSlabScaling

private javax.vecmath.Vector3f getSlabScaling()

getHeight

public float getHeight()
Specified by:
getHeight in class AbstractListView

syncToLayout

public void syncToLayout(LayoutComponent newLayout,
                         AnimationPlan plan)

getItemViewMatchingModel

public ItemView getItemViewMatchingModel(ItemModel itemModel)