org.dillenburg.pictureframe
Class PictureFrame

java.lang.Object
  extended by org.dillenburg.pictureframe.PictureFrame
All Implemented Interfaces:
SlideshowListener

public class PictureFrame
extends java.lang.Object
implements SlideshowListener

Displays pictures in a directory. Periodically copies files from a remote directory (NFS mounted for example) to the local slide show directory. Also periodically downloads images from an e-mail account and displays these first. After e-mailed pictures have been displayed for a given period of time (default is 1 hour), the display reverts to pictures in the slide show directory. Pictures in the e-mail download directory are scaled to the screen size and moved to the slideshow directory after they become more than displayDownloadedPicturesInterval milliseconds old.


Constructor Summary
PictureFrame(java.lang.String remoteDirectory, Slideshow slideshow, MailDownloader mailDownloader)
          Start up picture frame with remoteDirectory, slideshowDirectory and mailDirectory.
 
Method Summary
 long getDisplayDownloadedPicturesInterval()
           
 long getMailCheckFrequency()
           
 MailDownloader getMailDownloader()
           
 java.lang.String getRemoteDirectory()
           
 Slideshow getSlideshow()
           
 long getSynchronizationFrequency()
           
static void main(java.lang.String[] args)
          Parse command line arguments and start up picture frame.
 void setDisplayDownloadedPicturesInterval(long displayDownloadedPicturesInterval)
           
 void setMailCheckFrequency(long mailCheckFrequency)
           
 void setMailDownloader(MailDownloader mailDownloader)
           
 void setRemoteDirectory(java.lang.String remoteDirectory)
           
 void setSlideshow(Slideshow slideshow)
           
 void setSynchronizationFrequency(long synchronizationFrequency)
           
 void shutdown(SlideshowEvent ev)
          The user hit ESC to shutdown slideshow
 void slideDisplayed(SlideshowEvent ev)
          A slide was just displayed
 void start()
          Start picture frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PictureFrame

public PictureFrame(java.lang.String remoteDirectory,
                    Slideshow slideshow,
                    MailDownloader mailDownloader)
Start up picture frame with remoteDirectory, slideshowDirectory and mailDirectory. Files from remoteDirectory will be copied/synchronized to the slideshow directory every synchronizationFrequency milliseconds. Files in the mailDownloader outputFolder will be rescaled and moved to the slideshow directory

Parameters:
remoteDirectory - directory to monitor for additional pictures, or null to disable remote monitoring
slideshow - used to display pictures
mailDownloader - used to download pictures from an e-mail account, or null to disable
Method Detail

start

public void start()
Start picture frame.


getMailCheckFrequency

public long getMailCheckFrequency()
Returns:
the mailCheckFrequency

setMailCheckFrequency

public void setMailCheckFrequency(long mailCheckFrequency)
Parameters:
mailCheckFrequency - the mailCheckFrequency to set

getSynchronizationFrequency

public long getSynchronizationFrequency()
Returns:
the synchronizationFrequency

setSynchronizationFrequency

public void setSynchronizationFrequency(long synchronizationFrequency)
Parameters:
synchronizationFrequency - the synchronizationFrequency to set

getDisplayDownloadedPicturesInterval

public long getDisplayDownloadedPicturesInterval()
Returns:
the displayDownloadedPicturesInterval

setDisplayDownloadedPicturesInterval

public void setDisplayDownloadedPicturesInterval(long displayDownloadedPicturesInterval)
Parameters:
displayDownloadedPicturesInterval - the displayDownloadedPicturesInterval to set

getRemoteDirectory

public java.lang.String getRemoteDirectory()
Returns:
the remoteDirectory

setRemoteDirectory

public void setRemoteDirectory(java.lang.String remoteDirectory)
Parameters:
remoteDirectory - the remoteDirectory to set

getSlideshow

public Slideshow getSlideshow()
Returns:
the slideshow

setSlideshow

public void setSlideshow(Slideshow slideshow)
Parameters:
slideshow - the slideshow to set

getMailDownloader

public MailDownloader getMailDownloader()
Returns:
the mailDownloader

setMailDownloader

public void setMailDownloader(MailDownloader mailDownloader)
Parameters:
mailDownloader - the mailDownloader to set

shutdown

public void shutdown(SlideshowEvent ev)
Description copied from interface: SlideshowListener
The user hit ESC to shutdown slideshow

Specified by:
shutdown in interface SlideshowListener
Parameters:
ev - event information

slideDisplayed

public void slideDisplayed(SlideshowEvent ev)
Description copied from interface: SlideshowListener
A slide was just displayed

Specified by:
slideDisplayed in interface SlideshowListener
Parameters:
ev - event information

main

public static void main(java.lang.String[] args)
Parse command line arguments and start up picture frame.

Parameters:
args - -cursor Show mouse cursor/pointer -flat Stops scanning of all sub-directories for image files (i.e., not recursive) -help Print this message -mailhost Mail host name or ip address -mailpause Milliseconds to displayed pictures downloaded from mail host -ordered Stops shuffle of pictures so they are displayed in a random order -password Mail password -pause Milliseconds to pause between pictures during slideshow -pop3 Use pop3 protocol instead of imap -remotedirectory Remote directory to sync with local slideshow directory (-directory) -scaninterval How often to rescan slideshow directory for new files in milliseconds -user Mail user name


JPictureFrame hosted by SourceForge.net - John Dillenburg - john_sourceforge@dillenburg.org