cz.hdf.cdnavigator
Class DisplayPhotos

java.lang.Object
  extended by cz.hdf.cdnavigator.DisplayPhotos
All Implemented Interfaces:
java.lang.Runnable

public class DisplayPhotos
extends java.lang.Object
implements java.lang.Runnable

DOCUMENT ME!

Author:
hunter

Field Summary
private  java.awt.Cursor cursorInvisible
           
private  javax.swing.JFrame displayWindow
          window to show photos
private  java.awt.GraphicsDevice gd
          display device
private  javax.swing.JTextArea imageInfoArea
           
private  javax.swing.JPanel imagePanel
          image panel with photo
private  LoadImage li
           
private  LoadImage liNext
           
private  LoadImage liPrev
           
private  java.util.logging.Logger logger
          Logger.
private  PrepareFiles preparePhotos
           
private  java.awt.Font printFont
           
private  javax.swing.JLabel rateLabel
           
private  java.awt.event.ComponentListener resizeListener
           
private  java.lang.String scale
          scale - type
static java.lang.String SCALE_1_1
          scale image to 1:1 - no scale
static java.lang.String SCALE_1_2
          scale image to 1:2
static java.lang.String SCALE_1_3
          scale image to 1:3
static java.lang.String SCALE_1_5
          scale image to 1:5
static java.lang.String SCALE_2_1
          scale image to 2:1
static java.lang.String SCALE_3_1
          scale image to 3:1
static java.lang.String SCALE_5_1
          scale image to 5:1
static java.lang.String[] SCALE_RATIOS
          all scale ratios
private  PhotoShowPanel showPanel
           
private  int slideInterval
          slideshow interval
private  SlideShow slideShow
           
private  java.util.Timer timerCursor
           
private  java.util.Timer timerResize
           
static int WINDOW_SIZE_FULLSCREEN
          fullscreen or window take display size
static int WINDOW_SIZE_PHOTO
          window take size from photo size
static int WINDOW_SIZE_USER
          window set the preferred size
private  java.awt.Dimension windowDimension
          window dimension
private  int windowSize
          window size - type
 
Constructor Summary
DisplayPhotos(java.util.ArrayList<FileRecord> _photos, int _index, PhotoShowPanel _showPanel, java.lang.String _scale, int _slideInterval, boolean _slideRandom, boolean _slideRepeat, java.awt.Font _printFont)
          Initialize window for photos.
 
Method Summary
 void close()
          Close window with photos.
private  void deleteFile()
           
 javax.swing.JFrame getFrame()
          Get photo frame.
 void nextPhoto()
          Show next photo as actual and preload next (next.next) photo.
 void prevPhoto()
          Load and show previous photo.
private  void reloadPhotos()
          Reload actual and preload next photo.
private  void rotateLeft()
           
private  void rotateRight()
           
 void run()
          Initialize and show window.
private  void setInfo()
           
 void setPrintFont(java.awt.Font _printFont)
           
private  void setRating(int _rating)
           
 void setScale(java.lang.String _scale)
           
 void setWindowSize(int _windowSize)
           
 void showPhoto()
          Draw photo into window panel and set window size.
private  void slideshow()
           
 void synchronize()
          Synchronize displayed photo with CDnavigator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WINDOW_SIZE_PHOTO

public static final int WINDOW_SIZE_PHOTO
window take size from photo size

See Also:
Constant Field Values

WINDOW_SIZE_USER

public static final int WINDOW_SIZE_USER
window set the preferred size

See Also:
Constant Field Values

WINDOW_SIZE_FULLSCREEN

public static final int WINDOW_SIZE_FULLSCREEN
fullscreen or window take display size

See Also:
Constant Field Values

SCALE_5_1

public static final java.lang.String SCALE_5_1
scale image to 5:1

See Also:
Constant Field Values

SCALE_3_1

public static final java.lang.String SCALE_3_1
scale image to 3:1

See Also:
Constant Field Values

SCALE_2_1

public static final java.lang.String SCALE_2_1
scale image to 2:1

See Also:
Constant Field Values

SCALE_1_1

public static final java.lang.String SCALE_1_1
scale image to 1:1 - no scale

See Also:
Constant Field Values

SCALE_1_2

public static final java.lang.String SCALE_1_2
scale image to 1:2

See Also:
Constant Field Values

SCALE_1_3

public static final java.lang.String SCALE_1_3
scale image to 1:3

See Also:
Constant Field Values

SCALE_1_5

public static final java.lang.String SCALE_1_5
scale image to 1:5

See Also:
Constant Field Values

SCALE_RATIOS

public static final java.lang.String[] SCALE_RATIOS
all scale ratios


windowSize

private int windowSize
window size - type


scale

private java.lang.String scale
scale - type


slideInterval

private int slideInterval
slideshow interval


printFont

private java.awt.Font printFont

li

private LoadImage li

liPrev

private LoadImage liPrev

liNext

private LoadImage liNext

displayWindow

private final javax.swing.JFrame displayWindow
window to show photos


gd

private java.awt.GraphicsDevice gd
display device


windowDimension

private java.awt.Dimension windowDimension
window dimension


imagePanel

private javax.swing.JPanel imagePanel
image panel with photo


imageInfoArea

private javax.swing.JTextArea imageInfoArea

rateLabel

private javax.swing.JLabel rateLabel

timerResize

private java.util.Timer timerResize

timerCursor

private java.util.Timer timerCursor

cursorInvisible

private java.awt.Cursor cursorInvisible

resizeListener

private java.awt.event.ComponentListener resizeListener

slideShow

private SlideShow slideShow

preparePhotos

private PrepareFiles preparePhotos

showPanel

private PhotoShowPanel showPanel

logger

private java.util.logging.Logger logger
Logger. Hierarchy is set to name of this class.

Constructor Detail

DisplayPhotos

public DisplayPhotos(java.util.ArrayList<FileRecord> _photos,
                     int _index,
                     PhotoShowPanel _showPanel,
                     java.lang.String _scale,
                     int _slideInterval,
                     boolean _slideRandom,
                     boolean _slideRepeat,
                     java.awt.Font _printFont)
              throws java.io.FileNotFoundException
Initialize window for photos.

Parameters:
_photos -
_index -
_showPanel -
_scale -
_slideInterval -
_slideRandom -
_slideRepeat -
_printFont -
Throws:
java.io.FileNotFoundException
Method Detail

setWindowSize

public void setWindowSize(int _windowSize)
                   throws java.io.FileNotFoundException
Parameters:
_windowSize -
Throws:
java.io.FileNotFoundException

setScale

public void setScale(java.lang.String _scale)
              throws java.io.FileNotFoundException
Parameters:
_scale -
Throws:
java.io.FileNotFoundException

setPrintFont

public void setPrintFont(java.awt.Font _printFont)
Parameters:
_printFont -

synchronize

public void synchronize()
Synchronize displayed photo with CDnavigator.


getFrame

public javax.swing.JFrame getFrame()
Get photo frame.

Returns:

prevPhoto

public void prevPhoto()
Load and show previous photo.


nextPhoto

public void nextPhoto()
Show next photo as actual and preload next (next.next) photo.


deleteFile

private void deleteFile()

rotateLeft

private void rotateLeft()

rotateRight

private void rotateRight()

setRating

private void setRating(int _rating)
Parameters:
_rating -

setInfo

private void setInfo()

reloadPhotos

private void reloadPhotos()
                   throws java.io.FileNotFoundException
Reload actual and preload next photo.

Throws:
java.io.FileNotFoundException

showPhoto

public void showPhoto()
Draw photo into window panel and set window size.


close

public void close()
Close window with photos.


slideshow

private void slideshow()

run

public void run()
Initialize and show window.

Specified by:
run in interface java.lang.Runnable


CDnavigator JavaDoc, HDF company www.hdf.cz