portaview.model
Class PortaViewModel

java.lang.Object
  extended byjava.util.Observable
      extended byportaview.model.DomainModel
          extended byportaview.model.NameModel
              extended byportaview.model.PortaViewModel
All Implemented Interfaces:
java.util.Observer

public class PortaViewModel
extends NameModel
implements java.util.Observer

Represents a PortaView. This main contains two parts. One is the SlideSettings, which controls the settings. The other is the image associated with the PortaView.

Author:
William Lee

Field Summary
static java.lang.String IMAGE_CHANGED
           
static java.lang.String SETTINGS_CHANGED
           
 
Constructor Summary
PortaViewModel(java.lang.String name, java.net.InetAddress address, AlbumModel album)
           
 
Method Summary
 AlbumModel getAlbum()
           
 PortaViewImageModel getImageModel()
           
 java.net.InetAddress getInetAddress()
           
 SlideSettings getSlideSettings()
           
 void nextSlide()
          Moves to the next slide.
 void pause()
          Sets the PortaView to pause.
 void play()
          Sets the PortaView pause play.
 void prevSlide()
          Moves to the previous slide.
 void setAlbum(AlbumModel model)
           
 void setImageModel(PortaViewImageModel imageModel)
          Sets the image model.
 void setInetAddress(java.net.InetAddress address)
          Sets the Ip for the PortaView.
 void setSlideSettings(SlideSettings slideSettings)
          Sets the slide settings and notify all the observers about the change.
 void update(java.util.Observable arg0, java.lang.Object arg1)
          Underlying models have changed.
 void updateRemote()
          Update this portaview model with the remote portaview's state.
 
Methods inherited from class portaview.model.NameModel
getName, setName
 
Methods inherited from class portaview.model.DomainModel
forceNotifyObservers
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IMAGE_CHANGED

public static final java.lang.String IMAGE_CHANGED
See Also:
Constant Field Values

SETTINGS_CHANGED

public static final java.lang.String SETTINGS_CHANGED
See Also:
Constant Field Values
Constructor Detail

PortaViewModel

public PortaViewModel(java.lang.String name,
                      java.net.InetAddress address,
                      AlbumModel album)
Method Detail

nextSlide

public void nextSlide()
Moves to the next slide.


prevSlide

public void prevSlide()
Moves to the previous slide.


play

public void play()
Sets the PortaView pause play.


pause

public void pause()
Sets the PortaView to pause.


getInetAddress

public java.net.InetAddress getInetAddress()
Returns:
the internet address for a given PortaView

setInetAddress

public void setInetAddress(java.net.InetAddress address)
Sets the Ip for the PortaView.

Parameters:
address - the internet address for the PortaView

getAlbum

public AlbumModel getAlbum()
Returns:
the AlbumModel that thie PortaView is showing.

setAlbum

public void setAlbum(AlbumModel model)
Parameters:
model - the album model.

getSlideSettings

public SlideSettings getSlideSettings()
Returns:
the slide settings, which contain most internal state for a PortaView.

setSlideSettings

public void setSlideSettings(SlideSettings slideSettings)
Sets the slide settings and notify all the observers about the change.

Parameters:
slideSettings - slide settings to set.

getImageModel

public PortaViewImageModel getImageModel()
Returns:
the image model

setImageModel

public void setImageModel(PortaViewImageModel imageModel)
Sets the image model.

Parameters:
imageModel - model to set.

update

public void update(java.util.Observable arg0,
                   java.lang.Object arg1)
Underlying models have changed. Notify the observers to this displayer model.

Specified by:
update in interface java.util.Observer
See Also:
Observer.update(java.util.Observable, java.lang.Object)

updateRemote

public void updateRemote()
Update this portaview model with the remote portaview's state.



Copyright © 2003 The PortaView Team. All Rights Reserved.