edu.cmu.sun.view
Class ColumnView

java.lang.Object
  extended by Component3D
      extended by edu.cmu.sun.view.ColumnView
All Implemented Interfaces:
HoverEventAdapter.Listener, ModelListener

public class ColumnView
extends Component3D
implements ModelListener, HoverEventAdapter.Listener

Coordinates the drawing of a ColumnModel, and contains several WindowViews. The column view represents each column in the sceen. Whenever the underlying column model changes, this view synchronizes with the model to update the surrounding views.

Author:
Braden Kowitz, Jessica Smith

Field Summary
(package private)  ColumnGlueView columnGlueView
           
(package private)  Component3D contents
           
private static int HOVER_TIME_MSEC
           
(package private)  ColumnModel model
           
private  javax.vecmath.Vector3f ROTATION_AXIS
           
(package private)  SceneView sceneView
           
private static float STACKING_ANGLE
           
private static int STACKING_DURATION_MSEC
           
private static boolean TOP_ALIGN
           
private static int WINDOW_POSITION_MSEC
           
(package private)  java.util.List<WindowView> windows
           
 
Constructor Summary
ColumnView(ColumnModel model, SceneView sceneView)
           
 
Method Summary
 ItemView getItemViewMatchingModel(ItemModel itemModel)
           
 ColumnModel getModel()
           
 ColumnView getPrevColumn()
           
 SceneView getSceneView()
           
private  WindowView getViewForModel(WindowModel winModel)
          returns the windowView with the corresponding WindowModel.
 java.util.List<WindowView> getWindows()
           
 void handleHoverEvent(int msec)
           
 void modelChanged(Model m)
           
private  void positionViews()
           
private  void syncViewsToModel()
           
 void update()
           
private  void updateStacked()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

ColumnModel model

windows

java.util.List<WindowView> windows

sceneView

SceneView sceneView

columnGlueView

ColumnGlueView columnGlueView

contents

Component3D contents

WINDOW_POSITION_MSEC

private static final int WINDOW_POSITION_MSEC
See Also:
Constant Field Values

HOVER_TIME_MSEC

private static final int HOVER_TIME_MSEC
See Also:
Constant Field Values

STACKING_ANGLE

private static final float STACKING_ANGLE
See Also:
Constant Field Values

STACKING_DURATION_MSEC

private static final int STACKING_DURATION_MSEC
See Also:
Constant Field Values

ROTATION_AXIS

private javax.vecmath.Vector3f ROTATION_AXIS

TOP_ALIGN

private static boolean TOP_ALIGN
Constructor Detail

ColumnView

public ColumnView(ColumnModel model,
                  SceneView sceneView)
Method Detail

update

public void update()

syncViewsToModel

private void syncViewsToModel()

positionViews

private void positionViews()

getViewForModel

private WindowView getViewForModel(WindowModel winModel)
returns the windowView with the corresponding WindowModel. However, if no view can be found, it returns null;

Parameters:
winModel -
Returns:

modelChanged

public void modelChanged(Model m)
Specified by:
modelChanged in interface ModelListener

updateStacked

private void updateStacked()

getModel

public ColumnModel getModel()

getWindows

public java.util.List<WindowView> getWindows()

getPrevColumn

public ColumnView getPrevColumn()

getSceneView

public SceneView getSceneView()

getItemViewMatchingModel

public ItemView getItemViewMatchingModel(ItemModel itemModel)

handleHoverEvent

public void handleHoverEvent(int msec)
Specified by:
handleHoverEvent in interface HoverEventAdapter.Listener