Class CraneView

java.lang.Object
  |
  +--DisplayCollection
        |
        +--CraneView
All Implemented Interfaces:
EventListener, PropertyChangeListener

public class CraneView
extends DisplayCollection
implements PropertyChangeListener

View for the status of a warehouse crane.

See Also:
Serialized Form

Field Summary
protected  Annotation destinationView
          View for the destination of this crane.
protected  Annotation locationView
          View for the location of this crane.
protected  Vector log
          Vector to store status log.
protected  Crane model
          Warehouse crane data model for this view.
protected  Annotation statusView
          View for a status description of this crane.
protected  Annotation strategyNameView
          View for the name of the strategy for this crane.
 
Constructor Summary
CraneView(Crane c)
          Constructs a view for the given warehouse crane.
 
Method Summary
protected  void addComponents()
          Adds components to this GUI.
protected  void initializeComponents()
          Initializes the components used in this GUI.
protected  void initializeViews()
          Initializes the contents of the views in this GUI.
 void print()
          Prints the text of the status log to the console.
 void propertyChange(PropertyChangeEvent evt)
          Updates this when the data model changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected Crane model
Warehouse crane data model for this view.


strategyNameView

protected Annotation strategyNameView
View for the name of the strategy for this crane.


locationView

protected Annotation locationView
View for the location of this crane.


destinationView

protected Annotation destinationView
View for the destination of this crane.


statusView

protected Annotation statusView
View for a status description of this crane.


log

protected Vector log
Vector to store status log.

Constructor Detail

CraneView

public CraneView(Crane c)
Constructs a view for the given warehouse crane.

Parameters:
c - the warehouse crane data model for this view
Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Updates this when the data model changes.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - event object encapsulating the property change

initializeComponents

protected void initializeComponents()
Initializes the components used in this GUI.


addComponents

protected void addComponents()
Adds components to this GUI.


initializeViews

protected void initializeViews()
Initializes the contents of the views in this GUI.


print

public void print()
Prints the text of the status log to the console.