org.dillenburg.pictureframe
Class CenteredPictureLayout

java.lang.Object
  extended by org.dillenburg.pictureframe.PictureLayout
      extended by org.dillenburg.pictureframe.CenteredPictureLayout

public class CenteredPictureLayout
extends PictureLayout

Center a single image on the screen.


Constructor Summary
CenteredPictureLayout(java.io.File f)
          Centered layout with the given image file.
 
Method Summary
 java.util.List<java.io.File> getFiles()
          Get all files to be drawn by this layout.
 void paint(java.awt.Graphics2D g, java.awt.Dimension screenSize)
          Paint the image files onto the given graphics canvas with the overall size given.
 
Methods inherited from class org.dillenburg.pictureframe.PictureLayout
scaleAndCenterWithin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CenteredPictureLayout

public CenteredPictureLayout(java.io.File f)
Centered layout with the given image file.

Parameters:
f - file with image in it
Method Detail

paint

public void paint(java.awt.Graphics2D g,
                  java.awt.Dimension screenSize)
           throws java.io.IOException
Description copied from class: PictureLayout
Paint the image files onto the given graphics canvas with the overall size given.

Specified by:
paint in class PictureLayout
Parameters:
g - graphics canvas
screenSize - size of drawing area
Throws:
java.io.IOException - on error loading image files

getFiles

public java.util.List<java.io.File> getFiles()
Description copied from class: PictureLayout
Get all files to be drawn by this layout.

Specified by:
getFiles in class PictureLayout
Returns:
list of files to be drawn using the given layout


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