All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fi.faidon.jvg.RecorderGraphics

java.lang.Object
   |
   +----java.awt.Graphics
           |
           +----fi.faidon.jvg.RecorderGraphics

public class RecorderGraphics
extends Graphics
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 Index

 o RecorderGraphics()
Create a recorder graphics with no draw graphics.
 o RecorderGraphics(Graphics)
Create a recorder graphics with a draw graphics.

Method Index

 o clearRect(int, int, int, int)
Do operation if we have a graphics object, then record.
 o clipRect(int, int, int, int)
Record and pass on if we have a display graphics.
 o copyArea(int, int, int, int, int, int)
Do operation if we have a graphics object, then record.
 o create()
If we have a draw graphics, then let it do the job.
 o create(int, int, int, int)
Let parent class do the job.
 o dispose()
Release all memory resources.
 o draw3DRect(int, int, int, int, boolean)
Do operation if we have a graphics object, then record.
 o drawArc(int, int, int, int, int, int)
Draw an arc if graphics, record operation.
 o drawBytes(byte[], int, int, int, int)
Draw bytes if graphics, record operation.
 o drawChars(char[], int, int, int, int)
Draw chars if graphics, record operation.
 o drawImage(Image, int, int, Color, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawImage(Image, int, int, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawImage(Image, int, int, int, int, Color, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawImage(Image, int, int, int, int, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
Draw image if we have a draw graphics, record operation.
 o drawLine(int, int, int, int)
Draw a line.
 o drawOval(int, int, int, int)
Draw an oval.
 o drawPolygon(int[], int[], int)
Draw a polygon.
 o drawPolygon(Polygon)
Draw a polygon.
 o drawPolyline(int[], int[], int)
Draw a polyline if graphics, record operation.
 o drawRect(int, int, int, int)
Draw a rectangle.
 o drawRoundRect(int, int, int, int, int, int)
Do operation if we have a graphics object, then record.
 o drawString(String, int, int)
Draw a string.
 o fill3DRect(int, int, int, int, boolean)
Do operation if we have a graphics object, then record.
 o fillArc(int, int, int, int, int, int)
Fill an arc if graphics, record operation.
 o fillOval(int, int, int, int)
Fill an oval if graphics, record operation.
 o fillPolygon(int[], int[], int)
Fill a polygon.
 o fillPolygon(Polygon)
Fill a polygon.
 o fillRect(int, int, int, int)
Do operation if we have a graphics object, then record.
 o fillRoundRect(int, int, int, int, int, int)
Do operation if we have a graphics object, then record.
 o finalize()
Finalize everything.
 o getClip()
Return the clip shape set previously if no draw graphics, otherwise return display graphics clip shape.
 o getClipBounds()
Return null if no draw graphics, return display graphics clip bounds otherwise.
 o 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.
 o getColor()
Return null if no draw graphics, return display graphics color otherwise.
 o getFont()
Return null if no draw graphics, return display graphics font otherwise.
 o getFontMetrics()
Return null if no draw graphics, return display graphics fotn metrics otherwise.
 o getFontMetrics(Font)
Return null if no draw graphics, return display graphics fotn metrics otherwise.
 o getRecording()
Returns the graphics recording object.
 o main(String[])
Main function for debugging and test purposes.
 o setClip(int, int, int, int)
Set clip rect.
 o setClip(Shape)
Set the clip shape.
 o setColor(Color)
Set foreground color.
 o setFont(Font)
Set the font used.
 o setPaintMode()
Record and pass on if we have a display graphics.
 o setXORMode(Color)
Record and pass on if we have a display graphics.
 o toString()
 o translate(int, int)
Record and pass on if we have a display graphics.

Constructors

 o RecorderGraphics
 public RecorderGraphics()
Create a recorder graphics with no draw graphics. This simply means that there will be no simultaneous graphics output.

 o RecorderGraphics
 public RecorderGraphics(Graphics g)
Create a recorder graphics with a draw graphics. This means that there will be simultaneous graphics output and that all "get..."-methods return correct information.

Methods

 o main
 public static void main(String argv[])
Main function for debugging and test purposes.

 o getRecording
 public GraphicsRecording getRecording()
Returns the graphics recording object.

 o create
 public Graphics create()
If we have a draw graphics, then let it do the job. NULL otherwise.

Overrides:
create in class Graphics
 o create
 public Graphics create(int x,
                        int y,
                        int width,
                        int height)
Let parent class do the job.

Overrides:
create in class Graphics
 o translate
 public void translate(int x,
                       int y)
Record and pass on if we have a display graphics.

Overrides:
translate in class Graphics
 o getColor
 public Color getColor()
Return null if no draw graphics, return display graphics color otherwise.

Overrides:
getColor in class Graphics
 o setColor
 public void setColor(Color c)
Set foreground color.

Overrides:
setColor in class Graphics
 o setPaintMode
 public void setPaintMode()
Record and pass on if we have a display graphics.

Overrides:
setPaintMode in class Graphics
 o setXORMode
 public void setXORMode(Color c1)
Record and pass on if we have a display graphics.

Overrides:
setXORMode in class Graphics
 o getFont
 public Font getFont()
Return null if no draw graphics, return display graphics font otherwise.

Overrides:
getFont in class Graphics
 o setFont
 public void setFont(Font font)
Set the font used.

Overrides:
setFont in class Graphics
 o getFontMetrics
 public FontMetrics getFontMetrics()
Return null if no draw graphics, return display graphics fotn metrics otherwise.

Overrides:
getFontMetrics in class Graphics
 o getFontMetrics
 public FontMetrics getFontMetrics(Font f)
Return null if no draw graphics, return display graphics fotn metrics otherwise.

Overrides:
getFontMetrics in class Graphics
 o getClipBounds
 public Rectangle getClipBounds()
Return null if no draw graphics, return display graphics clip bounds otherwise.

Overrides:
getClipBounds in class Graphics
 o clipRect
 public void clipRect(int x,
                      int y,
                      int width,
                      int height)
Record and pass on if we have a display graphics.

Overrides:
clipRect in class Graphics
 o setClip
 public void setClip(int x,
                     int y,
                     int width,
                     int height)
Set clip rect.

Overrides:
setClip in class Graphics
 o getClip
 public Shape getClip()
Return the clip shape set previously if no draw graphics, otherwise return display graphics clip shape.

Overrides:
getClip in class Graphics
 o setClip
 public void setClip(Shape clip)
Set the clip shape. Also store a local copy.

Overrides:
setClip in class Graphics
 o copyArea
 public void copyArea(int x,
                      int y,
                      int width,
                      int height,
                      int dx,
                      int dy)
Do operation if we have a graphics object, then record.

Overrides:
copyArea in class Graphics
 o drawLine
 public void drawLine(int x1,
                      int y1,
                      int x2,
                      int y2)
Draw a line.

Overrides:
drawLine in class Graphics
 o fillRect
 public void fillRect(int x,
                      int y,
                      int width,
                      int height)
Do operation if we have a graphics object, then record.

Overrides:
fillRect in class Graphics
 o drawRect
 public void drawRect(int x,
                      int y,
                      int width,
                      int height)
Draw a rectangle.

Overrides:
drawRect in class Graphics
 o clearRect
 public void clearRect(int x,
                       int y,
                       int width,
                       int height)
Do operation if we have a graphics object, then record.

Overrides:
clearRect in class Graphics
 o drawRoundRect
 public void drawRoundRect(int x,
                           int y,
                           int width,
                           int height,
                           int arcWidth,
                           int arcHeight)
Do operation if we have a graphics object, then record.

Overrides:
drawRoundRect in class Graphics
 o fillRoundRect
 public void fillRoundRect(int x,
                           int y,
                           int width,
                           int height,
                           int arcWidth,
                           int arcHeight)
Do operation if we have a graphics object, then record.

Overrides:
fillRoundRect in class Graphics
 o draw3DRect
 public void draw3DRect(int x,
                        int y,
                        int width,
                        int height,
                        boolean raised)
Do operation if we have a graphics object, then record.

Overrides:
draw3DRect in class Graphics
 o fill3DRect
 public void fill3DRect(int x,
                        int y,
                        int width,
                        int height,
                        boolean raised)
Do operation if we have a graphics object, then record.

Overrides:
fill3DRect in class Graphics
 o drawOval
 public void drawOval(int x,
                      int y,
                      int width,
                      int height)
Draw an oval.

Overrides:
drawOval in class Graphics
 o fillOval
 public void fillOval(int x,
                      int y,
                      int width,
                      int height)
Fill an oval if graphics, record operation.

Overrides:
fillOval in class Graphics
 o drawArc
 public void drawArc(int x,
                     int y,
                     int width,
                     int height,
                     int startAngle,
                     int arcAngle)
Draw an arc if graphics, record operation.

Overrides:
drawArc in class Graphics
 o fillArc
 public void fillArc(int x,
                     int y,
                     int width,
                     int height,
                     int startAngle,
                     int arcAngle)
Fill an arc if graphics, record operation.

Overrides:
fillArc in class Graphics
 o drawPolyline
 public void drawPolyline(int xPoints[],
                          int yPoints[],
                          int nPoints)
Draw a polyline if graphics, record operation.

Overrides:
drawPolyline in class Graphics
 o drawPolygon
 public void drawPolygon(int xPoints[],
                         int yPoints[],
                         int nPoints)
Draw a polygon.

Overrides:
drawPolygon in class Graphics
 o drawPolygon
 public void drawPolygon(Polygon p)
Draw a polygon.

Overrides:
drawPolygon in class Graphics
 o fillPolygon
 public void fillPolygon(int xPoints[],
                         int yPoints[],
                         int nPoints)
Fill a polygon.

Overrides:
fillPolygon in class Graphics
 o fillPolygon
 public void fillPolygon(Polygon p)
Fill a polygon.

Overrides:
fillPolygon in class Graphics
 o drawString
 public void drawString(String str,
                        int x,
                        int y)
Draw a string.

Overrides:
drawString in class Graphics
 o drawChars
 public void drawChars(char data[],
                       int offset,
                       int length,
                       int x,
                       int y)
Draw chars if graphics, record operation.

Overrides:
drawChars in class Graphics
 o drawBytes
 public void drawBytes(byte data[],
                       int offset,
                       int length,
                       int x,
                       int y)
Draw bytes if graphics, record operation.

Overrides:
drawBytes in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int x,
                          int y,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int x,
                          int y,
                          int width,
                          int height,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int x,
                          int y,
                          Color bgcolor,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int x,
                          int y,
                          int width,
                          int height,
                          Color bgcolor,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int dx1,
                          int dy1,
                          int dx2,
                          int dy2,
                          int sx1,
                          int sy1,
                          int sx2,
                          int sy2,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o drawImage
 public boolean drawImage(Image img,
                          int dx1,
                          int dy1,
                          int dx2,
                          int dy2,
                          int sx1,
                          int sy1,
                          int sx2,
                          int sy2,
                          Color bgcolor,
                          ImageObserver observer)
Draw image if we have a draw graphics, record operation.

Overrides:
drawImage in class Graphics
 o dispose
 public void dispose()
Release all memory resources.

Overrides:
dispose in class Graphics
 o finalize
 public void finalize()
Finalize everything.

Overrides:
finalize in class Graphics
 o toString
 public String toString()
Overrides:
toString in class Graphics
 o getClipRect
 public 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.

Overrides:
getClipRect in class Graphics

All Packages  Class Hierarchy  This Package  Previous  Next  Index