edu.cmu.sun.view
Class WindowContentView

java.lang.Object
  extended by Component3D
      extended by edu.cmu.sun.view.WindowContentView

public class WindowContentView
extends Component3D

creating a ListView is expensive. So, we try to recycle them here between layouts.

Author:
Administrator

Field Summary
(package private)  java.util.List<AbstractListView> abstractListViews
           
(package private)  Component3D contents
           
(package private)  java.util.LinkedList<ListView> recycledListViews
           
 
Constructor Summary
WindowContentView()
           
 
Method Summary
private  void cleanComponents(AnimationPlan plan)
          we remove all components in abstractListViews we place ListViews in the recycle bin.
 ItemView getItemViewMatchingModel(ItemModel itemModel)
           
private  AbstractListView getViewForLayout(LayoutComponent layoutComp, AnimationPlan plan, javax.vecmath.Vector3f position)
           
private  AbstractListView makeNewViewForLayout(LayoutComponent layoutComp)
           
 void syncToLayout(Layout activeLayout, AnimationPlan plan)
          make this windowContents match the given layout.
 void update(AnimationPlan plan, int msec)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

abstractListViews

java.util.List<AbstractListView> abstractListViews

recycledListViews

java.util.LinkedList<ListView> recycledListViews

contents

Component3D contents
Constructor Detail

WindowContentView

public WindowContentView()
Method Detail

syncToLayout

public void syncToLayout(Layout activeLayout,
                         AnimationPlan plan)
make this windowContents match the given layout. does this right away

Parameters:
activeLayout -

getViewForLayout

private AbstractListView getViewForLayout(LayoutComponent layoutComp,
                                          AnimationPlan plan,
                                          javax.vecmath.Vector3f position)

cleanComponents

private void cleanComponents(AnimationPlan plan)
we remove all components in abstractListViews we place ListViews in the recycle bin.

Parameters:
plan -

makeNewViewForLayout

private AbstractListView makeNewViewForLayout(LayoutComponent layoutComp)

update

public void update(AnimationPlan plan,
                   int msec)

getItemViewMatchingModel

public ItemView getItemViewMatchingModel(ItemModel itemModel)