edu.cmu.sun.view
Class ColumnGlueView

java.lang.Object
  extended by Component3D
      extended by edu.cmu.sun.view.ColumnGlueView
All Implemented Interfaces:
AnimationAction, ModelListener

public class ColumnGlueView
extends Component3D
implements AnimationAction, ModelListener

Coordinates the drawing and updating of the glue (or spreads) that visually conect windows (or panels) together. Objects of this class belong to a column and are responsible for coordinating the drawing of glue to the previous column.

Author:
Braden Kowitz, Jake Pierson, Jessica Smith

Field Summary
(package private)  ColumnView columnView
           
(package private)  java.util.List<GlueView> glueViews
           
(package private)  ColumnModel.Stacked prevColumnStackedModel
           
private static float WIDTH
           
(package private)  java.util.List<WindowModel> windowModelsForThisGlue
           
 
Constructor Summary
ColumnGlueView(ColumnView columnView)
           
 
Method Summary
private  void createGlueView(WindowView windowView, ItemView itemView, ItemModel itemModel)
           
private  void createGlueViews()
           
 void doAnimationAction(Component3D target, int duration)
          The implementing class shoud perform an animation on the provided target, for a specified duration.
private  boolean isGlueVisible()
           
private  void listenToAdjacentColumnModels()
           
private  void listenToWindowModel(WindowModel windowModel)
           
 void modelChanged(Model m)
           
private  void removeGlueViews()
           
private  void scheduleGlueCreation()
           
private  void stopListeningToWindowModels()
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

private static final float WIDTH
See Also:
Constant Field Values

columnView

ColumnView columnView

prevColumnStackedModel

ColumnModel.Stacked prevColumnStackedModel

glueViews

java.util.List<GlueView> glueViews

windowModelsForThisGlue

java.util.List<WindowModel> windowModelsForThisGlue
Constructor Detail

ColumnGlueView

public ColumnGlueView(ColumnView columnView)
Method Detail

listenToAdjacentColumnModels

private void listenToAdjacentColumnModels()

update

public void update()

isGlueVisible

private boolean isGlueVisible()

scheduleGlueCreation

private void scheduleGlueCreation()

removeGlueViews

private void removeGlueViews()

doAnimationAction

public void doAnimationAction(Component3D target,
                              int duration)
Description copied from interface: AnimationAction
The implementing class shoud perform an animation on the provided target, for a specified duration. This function should perform animations immediately on the target object.

Specified by:
doAnimationAction in interface AnimationAction
Parameters:
target - The target Component3D to be animatied
duration - The duration of the animation, in msec.

createGlueViews

private void createGlueViews()

createGlueView

private void createGlueView(WindowView windowView,
                            ItemView itemView,
                            ItemModel itemModel)

listenToWindowModel

private void listenToWindowModel(WindowModel windowModel)

stopListeningToWindowModels

private void stopListeningToWindowModels()

modelChanged

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