|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Graphics | +--fi.faidon.jvg.RecorderGraphics
Class that extends the awt.Graphics class with a recording functionality. It also makes it possible to save the drawing operations into a file, from which they can be re-read in a standardized way. Image passing at least between Java applications through the clipboard also becomes feasible since the comminucating programs just need to implement this class for understanding each other.
Constructor Summary | |
RecorderGraphics()
Create a recorder graphics with no draw graphics. |
|
RecorderGraphics(java.awt.Graphics g)
Create a recorder graphics with a draw graphics. |
Method Summary | |
void |
clearRect(int x,
int y,
int width,
int height)
Do operation if we have a graphics object, then record. |
void |
clipRect(int x,
int y,
int width,
int height)
Record and pass on if we have a display graphics. |
void |
copyArea(int x,
int y,
int width,
int height,
int dx,
int dy)
Do operation if we have a graphics object, then record. |
java.awt.Graphics |
create()
If we have a draw graphics, then let it do the job. |
java.awt.Graphics |
create(int x,
int y,
int width,
int height)
Let parent class do the job. |
void |
dispose()
Release all memory resources. |
void |
draw3DRect(int x,
int y,
int width,
int height,
boolean raised)
Do operation if we have a graphics object, then record. |
void |
drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Draw an arc if graphics, record operation. |
void |
drawBytes(byte[] data,
int offset,
int length,
int x,
int y)
Draw bytes if graphics, record operation. |
void |
drawChars(char[] data,
int offset,
int length,
int x,
int y)
Draw chars if graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int x,
int y,
int width,
int height,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.Color bgcolor,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
boolean |
drawImage(java.awt.Image img,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2,
java.awt.image.ImageObserver observer)
Draw image if we have a draw graphics, record operation. |
void |
drawLine(int x1,
int y1,
int x2,
int y2)
Draw a line. |
void |
drawOval(int x,
int y,
int width,
int height)
Draw an oval. |
void |
drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Draw a polygon. |
void |
drawPolygon(java.awt.Polygon p)
Draw a polygon. |
void |
drawPolyline(int[] xPoints,
int[] yPoints,
int nPoints)
Draw a polyline if graphics, record operation. |
void |
drawRect(int x,
int y,
int width,
int height)
Draw a rectangle. |
void |
drawRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Do operation if we have a graphics object, then record. |
void |
drawString(java.text.AttributedCharacterIterator iterator,
int x,
int y)
Draw a string. |
void |
drawString(java.lang.String str,
int x,
int y)
Draw a string. |
void |
fill3DRect(int x,
int y,
int width,
int height,
boolean raised)
Do operation if we have a graphics object, then record. |
void |
fillArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
Fill an arc if graphics, record operation. |
void |
fillOval(int x,
int y,
int width,
int height)
Fill an oval if graphics, record operation. |
void |
fillPolygon(int[] xPoints,
int[] yPoints,
int nPoints)
Fill a polygon. |
void |
fillPolygon(java.awt.Polygon p)
Fill a polygon. |
void |
fillRect(int x,
int y,
int width,
int height)
Do operation if we have a graphics object, then record. |
void |
fillRoundRect(int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Do operation if we have a graphics object, then record. |
void |
finalize()
Finalize everything. |
java.awt.Shape |
getClip()
Return the clip shape set previously if no draw graphics, otherwise return display graphics clip shape. |
java.awt.Rectangle |
getClipBounds()
Return null if no draw graphics, return display graphics clip bounds otherwise. |
java.awt.Rectangle |
getClipRect()
Return the clip rect that has been set by a previous call if we have no draw graphics, otherwise return that of the draw graphics. |
java.awt.Color |
getColor()
Return null if no draw graphics, return display graphics color otherwise. |
java.awt.Font |
getFont()
Return null if no draw graphics, return display graphics font otherwise. |
java.awt.FontMetrics |
getFontMetrics()
Return null if no draw graphics, return display graphics fotn metrics otherwise. |
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
Return null if no draw graphics, return display graphics fotn metrics otherwise. |
GraphicsRecording |
getRecording()
Returns the graphics recording object. |
static void |
main(java.lang.String[] argv)
Main function for debugging and test purposes. |
void |
setClip(int x,
int y,
int width,
int height)
Set clip rect. |
void |
setClip(java.awt.Shape clip)
Set the clip shape. |
void |
setColor(java.awt.Color c)
Set foreground color. |
void |
setFont(java.awt.Font font)
Set the font used. |
void |
setPaintMode()
Record and pass on if we have a display graphics. |
void |
setXORMode(java.awt.Color c1)
Record and pass on if we have a display graphics. |
java.lang.String |
toString()
|
void |
translate(int x,
int y)
Record and pass on if we have a display graphics. |
Methods inherited from class java.awt.Graphics |
getClipBounds, hitClip |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RecorderGraphics()
public RecorderGraphics(java.awt.Graphics g)
Method Detail |
public static void main(java.lang.String[] argv)
public GraphicsRecording getRecording()
public java.awt.Graphics create()
create
in class java.awt.Graphics
public java.awt.Graphics create(int x, int y, int width, int height)
create
in class java.awt.Graphics
public void translate(int x, int y)
translate
in class java.awt.Graphics
public java.awt.Color getColor()
getColor
in class java.awt.Graphics
public void setColor(java.awt.Color c)
setColor
in class java.awt.Graphics
public void setPaintMode()
setPaintMode
in class java.awt.Graphics
public void setXORMode(java.awt.Color c1)
setXORMode
in class java.awt.Graphics
public java.awt.Font getFont()
getFont
in class java.awt.Graphics
public void setFont(java.awt.Font font)
setFont
in class java.awt.Graphics
public java.awt.FontMetrics getFontMetrics()
getFontMetrics
in class java.awt.Graphics
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
getFontMetrics
in class java.awt.Graphics
public java.awt.Rectangle getClipBounds()
getClipBounds
in class java.awt.Graphics
public void clipRect(int x, int y, int width, int height)
clipRect
in class java.awt.Graphics
public void setClip(int x, int y, int width, int height)
setClip
in class java.awt.Graphics
public java.awt.Shape getClip()
getClip
in class java.awt.Graphics
public void setClip(java.awt.Shape clip)
setClip
in class java.awt.Graphics
public void copyArea(int x, int y, int width, int height, int dx, int dy)
copyArea
in class java.awt.Graphics
public void drawLine(int x1, int y1, int x2, int y2)
drawLine
in class java.awt.Graphics
public void fillRect(int x, int y, int width, int height)
fillRect
in class java.awt.Graphics
public void drawRect(int x, int y, int width, int height)
drawRect
in class java.awt.Graphics
public void clearRect(int x, int y, int width, int height)
clearRect
in class java.awt.Graphics
public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
in class java.awt.Graphics
public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
in class java.awt.Graphics
public void draw3DRect(int x, int y, int width, int height, boolean raised)
draw3DRect
in class java.awt.Graphics
public void fill3DRect(int x, int y, int width, int height, boolean raised)
fill3DRect
in class java.awt.Graphics
public void drawOval(int x, int y, int width, int height)
drawOval
in class java.awt.Graphics
public void fillOval(int x, int y, int width, int height)
fillOval
in class java.awt.Graphics
public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
in class java.awt.Graphics
public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
in class java.awt.Graphics
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
drawPolyline
in class java.awt.Graphics
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
drawPolygon
in class java.awt.Graphics
public void drawPolygon(java.awt.Polygon p)
drawPolygon
in class java.awt.Graphics
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
fillPolygon
in class java.awt.Graphics
public void fillPolygon(java.awt.Polygon p)
fillPolygon
in class java.awt.Graphics
public void drawString(java.lang.String str, int x, int y)
drawString
in class java.awt.Graphics
public void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
drawString
in class java.awt.Graphics
public void drawChars(char[] data, int offset, int length, int x, int y)
drawChars
in class java.awt.Graphics
public void drawBytes(byte[] data, int offset, int length, int x, int y)
drawBytes
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int x, int y, int width, int height, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public boolean drawImage(java.awt.Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.Color bgcolor, java.awt.image.ImageObserver observer)
drawImage
in class java.awt.Graphics
public void dispose()
dispose
in class java.awt.Graphics
public void finalize()
finalize
in class java.awt.Graphics
public java.lang.String toString()
toString
in class java.awt.Graphics
public java.awt.Rectangle getClipRect()
getClipRect
in class java.awt.Graphics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |