001 package org.pscode.xui.ist;
002
003 import java.awt.Point;
004 import java.util.Date;
005
006 /** JavaBean used to store frame descriptions in an image sequence.
007 Designed for use with the J2SE XMLEncoder/Decoder.
008 @author Andrew Thompson
009 @version 2010-01-08
010 @license LGPL */
011 public class ImageSequenceFrame {
012
013 /** The frame number of this frame. */
014 public int frameNumber;
015
016 /** The date on which this frame was captured. */
017 public Date date;
018
019 /** The location of the mouse pointer when this frame was captured. */
020 public Point pointerLocation;
021
022 /** The name of the screenshot to use for this frame. Will be the time in
023 milliseconds with ".png" added at runtime. */
024 public long screenshotName = -1l;
025
026 /** The captions to apply to this frame (and probably subsequent frames). */
027 //public ImageSequenceCaption[] captions;
028
029 public ImageSequenceFrame() {
030 }
031
032 public ImageSequenceFrame(int frameNumber, Date date, Point pointerLocation, long screenshotName) {
033 this.frameNumber = frameNumber;
034 this.date = date;
035 this.pointerLocation = pointerLocation;
036 this.screenshotName = screenshotName;
037 }
038 /*
039 public void setCaptions(ImageSequenceCaption[] captions) {
040 this.captions = captions;
041 }
042
043 public ImageSequenceCaption[] getCaptions() {
044 return captions;
045 }
046 */
047 public void setFrameNumber(int frameNumber) {
048 this.frameNumber = frameNumber;
049 }
050
051 public int getFrameNumber() {
052 return frameNumber;
053 }
054
055 public void setDate(Date date) {
056 this.date = date;
057 }
058
059 public Date getDate() {
060 return date;
061 }
062
063 public void setPointerLocation(Point pointerLocation) {
064 this.pointerLocation = pointerLocation;
065 }
066
067 public Point getPointerLocation() {
068 return pointerLocation;
069 }
070
071 public void setScreenshotName(long screenshotName) {
072 this.screenshotName = screenshotName;
073 }
074
075 public long getScreenshotName() {
076 if (screenshotName<0l) {
077 return date.getTime();
078 } else {
079 return screenshotName;
080 }
081 }
082
083 public String toString() {
084 return "Frame " + frameNumber;
085 }
086 }