|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.haphazard.gui.engine.Frame
A frame contains an image of an animation
Field Summary | |
java.lang.String |
name
|
Constructor Summary | |
Frame(long displayTime)
A constructor for frame |
|
Frame(java.util.Vector images,
long displayTime)
A constructor for frame |
Method Summary | |
void |
addFrameImage(FrameImage image)
Adds an image to the frame image buffer. |
java.lang.Object |
clone()
|
Frame |
combine(Frame frameToBeInFront)
Combine this frame with the Frame that is sent in. |
Frame |
flipHorizontally()
Flips a new frame horizontally (copy of this frame) |
Frame |
flipVertically()
Flips a new frame vertically (copy of this frame) |
java.awt.Rectangle |
getBoundingBox(java.awt.Point middleTileCoordinate)
Return the bounding box on the screen of this image. |
long |
getDisplayTime()
Returns the display time of this frame in milliseconds |
java.util.Vector |
getFrameImages()
Returns the array of FrameImage that this Frame contains. |
void |
optimize()
Optimizes the clipping box for all images in this frame |
void |
paintComponent(java.awt.Graphics2D g,
java.awt.Point point)
Paint this component |
void |
setDisplayTime(long time)
Gets the height of the image |
void |
setFrameImages(java.util.Vector images)
Sets the images in this frame |
java.lang.String |
toString()
Turns this frame into a string notation |
java.lang.String |
toXML(int indent)
Transforms this object into XML-notation |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String name
Constructor Detail |
public Frame(java.util.Vector images, long displayTime)
images
- the array of images.displayTime
- the time in milliseconds that this frame should be diplayedpublic Frame(long displayTime)
displayTime
- the time in milliseconds that this frame should be diplayedMethod Detail |
public void setFrameImages(java.util.Vector images)
images
- The images to setpublic void addFrameImage(FrameImage image)
image
- The image to addpublic java.util.Vector getFrameImages()
public void setDisplayTime(long time)
public long getDisplayTime()
public java.awt.Rectangle getBoundingBox(java.awt.Point middleTileCoordinate)
middleTileCoordinate
- The middle coordinate of the tile the character is residing on
public Frame flipVertically()
public Frame flipHorizontally()
public Frame combine(Frame frameToBeInFront)
frameToBeInFront
- the frame that is in front of this frame
public void optimize()
public void paintComponent(java.awt.Graphics2D g, java.awt.Point point)
g
- the Graphics where to be drawnpoint
- the coordinate where the sprite ispublic java.lang.String toXML(int indent)
indent
- The level of indentation to use
public java.lang.String toString()
public java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |