|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dillenburg.pictureframe.PictureLayout
public abstract class PictureLayout
Base class for all picture layout sub-classes. Renders one or more picture files using the
paint(Graphics2D, Dimension)
method.
Constructor Summary | |
---|---|
PictureLayout()
|
Method Summary | |
---|---|
abstract java.util.List<java.io.File> |
getFiles()
Get all files to be drawn by this layout. |
abstract void |
paint(java.awt.Graphics2D g,
java.awt.Dimension screenSize)
Paint the image files onto the given graphics canvas with the overall size given. |
protected void |
scaleAndCenterWithin(java.awt.Graphics2D g,
java.awt.Rectangle r,
java.awt.image.BufferedImage image)
Scale and center an image within a rectangle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PictureLayout()
Method Detail |
---|
public abstract void paint(java.awt.Graphics2D g, java.awt.Dimension screenSize) throws java.io.IOException
g
- graphics canvasscreenSize
- size of drawing area
java.io.IOException
- on error loading image filesprotected void scaleAndCenterWithin(java.awt.Graphics2D g, java.awt.Rectangle r, java.awt.image.BufferedImage image)
g
- graphics canvasr
- rectangel to center withinimage
- image to drawpublic abstract java.util.List<java.io.File> getFiles()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |