portaview
Class AbstractViewer

java.lang.Object
  extended byportaview.AbstractViewer
All Implemented Interfaces:
java.util.Observer
Direct Known Subclasses:
Displayer, Previewer

public abstract class AbstractViewer
extends java.lang.Object
implements java.util.Observer

The general implementation of a viewer controller. This is used in the case where one needs to show a preview or full-screen view of an image. Note that this is an controller, not a view.

Author:
William Lee

Field Summary
protected  PortaViewModel model
           
protected  AbstractDisplayerView view
           
 
Constructor Summary
AbstractViewer(PortaViewModel m)
          Constructs an AbstractViewer, given the model that that this view observes on.
 
Method Summary
 PortaViewModel getModel()
           
 AbstractDisplayerView getView()
           
 void nextSlide()
          Moves to the next slide.
 void pause()
          Sets the viewer to pause.
 void play()
          Sets the viewer to play.
 void prevSlide()
          Moves to the previous slide.
 void setModel(PortaViewModel model)
          Changes the internal PortaView model for this view.
 void setView(AbstractDisplayerView view)
          Changes the view associated with this controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Observer
update
 

Field Detail

model

protected PortaViewModel model

view

protected AbstractDisplayerView view
Constructor Detail

AbstractViewer

public AbstractViewer(PortaViewModel m)
Constructs an AbstractViewer, given the model that that this view observes on.

Parameters:
m - the PortaViewModel that this view observes on.
Method Detail

getModel

public PortaViewModel getModel()
Returns:
the PortaView model

setModel

public void setModel(PortaViewModel model)
Changes the internal PortaView model for this view.

Parameters:
model - the PortaView model.

nextSlide

public void nextSlide()
Moves to the next slide.


prevSlide

public void prevSlide()
Moves to the previous slide.


play

public void play()
Sets the viewer to play.


pause

public void pause()
Sets the viewer to pause.


getView

public AbstractDisplayerView getView()
Returns:
the view associated with this controller.

setView

public void setView(AbstractDisplayerView view)
Changes the view associated with this controller.

Parameters:
view - the view to set.


Copyright © 2003 The PortaView Team. All Rights Reserved.