portaview.model
Class Photo

java.lang.Object
  extended byportaview.model.Photo

public class Photo
extends java.lang.Object

Represents a photo on disk. Note that this is not the model used in the PortaView manager. Provides an abstarction to access the pictures on disk.

Version:
$Id: Photo.java,v 1.3 2003/12/10 06:18:57 wlee Exp $
Author:
William Lee

Constructor Summary
Photo()
           
Photo(java.io.File f)
          Constructs a photo.
Photo(java.io.File f, java.lang.String caption)
          Constructs a photo with caption.
 
Method Summary
 java.lang.String getCaption()
           
 java.io.File getFile()
           
 byte[] getJpeg()
           
 byte[] getJpegIcon(int width, int height)
           
 void setCaption(java.lang.String caption)
          Sets the caption.
 void setFile(java.io.File file)
          Sets the file associated with this Photo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Photo

public Photo()

Photo

public Photo(java.io.File f,
             java.lang.String caption)
Constructs a photo with caption.

Parameters:
f - file that represents the photo
caption - caption for the photo

Photo

public Photo(java.io.File f)
Constructs a photo.

Parameters:
f - file that represents the photo
Method Detail

getCaption

public java.lang.String getCaption()
Returns:
the caption of this photo.

setCaption

public void setCaption(java.lang.String caption)
Sets the caption.

Parameters:
caption - caption to set.

getFile

public java.io.File getFile()
Returns:
the file associated with this Photo.

setFile

public void setFile(java.io.File file)
Sets the file associated with this Photo.

Parameters:
file - file to set.

getJpeg

public byte[] getJpeg()
Returns:
the jpeg encoding of this photo.

getJpegIcon

public byte[] getJpegIcon(int width,
                          int height)
Returns:
the jpeg encoding of this icon.


Copyright © 2003 The PortaView Team. All Rights Reserved.