fi.helsinki.dacopan.model
Class ENCTreeModel

java.lang.Object
  extended by fi.helsinki.dacopan.model.ENCTreeModel

public class ENCTreeModel
extends java.lang.Object

This class encloses the model of an encapsulation tree. It provides the services that are needed by the ENC animation to properly display the encapsulation animation of a particular transfer unit. The class is instantiated each time an encapsulation is to be shown, and constructed with transfer unit or the unit itself. Normally we wouldn't care who authors our classes, but this one is a little bit tricky. Ask Jonathan or Jarkko if you need to understand this in more depth.


Nested Class Summary
static class ENCTreeModel.DrawableEncLayer
          This inner class encloses the concept of a single layer that's going to be drawn in the ENC animation.
static class ENCTreeModel.DrawableTransferUnit
          This inner class encloses the concept of a single unit that's going to be drawn in the ENC animation.
 
Constructor Summary
ENCTreeModel(TransferUnit selectedUnit, DataView dataView)
          An Enc Tree Model instance must be constructed with a particular transfer unit.
 
Method Summary
 java.util.List[] getLayeredEncTree()
           
 ENCTreeModel.DrawableEncLayer[] getLayeredEncTreeToDraw()
           
 TransferUnit getRootUnit()
           
 TransferUnit getSelectedUnit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ENCTreeModel

public ENCTreeModel(TransferUnit selectedUnit,
                    DataView dataView)
An Enc Tree Model instance must be constructed with a particular transfer unit.

Parameters:
transferUnit - The selected transfer unit, whos enc tree this is
dataView - The current dataview instance
Method Detail

getLayeredEncTree

public java.util.List[] getLayeredEncTree()
Returns:
Returns the layeredEncTree.

getLayeredEncTreeToDraw

public ENCTreeModel.DrawableEncLayer[] getLayeredEncTreeToDraw()
Returns:
Returns the layeredEncTreeToDraw.

getSelectedUnit

public TransferUnit getSelectedUnit()
Returns:
Returns the selectedUnit to outside users of the model, mainly the ENC panel.

getRootUnit

public TransferUnit getRootUnit()
Returns:
Returns the root unit of the stored enc tree.


© Dacopan2 team, 2005-