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.
-
RecorderGraphics()
- Create a recorder graphics with no draw graphics.
-
RecorderGraphics(Graphics)
- Create a recorder graphics with a draw graphics.
-
clearRect(int, int, int, int)
- Do operation if we have a graphics object, then record.
-
clipRect(int, int, int, int)
- Record and pass on if we have a display graphics.
-
copyArea(int, int, int, int, int, int)
- Do operation if we have a graphics object, then record.
-
create()
- If we have a draw graphics, then let it do the job.
-
create(int, int, int, int)
- Let parent class do the job.
-
dispose()
- Release all memory resources.
-
draw3DRect(int, int, int, int, boolean)
- Do operation if we have a graphics object, then record.
-
drawArc(int, int, int, int, int, int)
- Draw an arc if graphics, record operation.
-
drawBytes(byte[], int, int, int, int)
- Draw bytes if graphics, record operation.
-
drawChars(char[], int, int, int, int)
- Draw chars if graphics, record operation.
-
drawImage(Image, int, int, Color, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawImage(Image, int, int, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawImage(Image, int, int, int, int, Color, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawImage(Image, int, int, int, int, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawImage(Image, int, int, int, int, int, int, int, int, Color, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
- Draw image if we have a draw graphics, record operation.
-
drawLine(int, int, int, int)
- Draw a line.
-
drawOval(int, int, int, int)
- Draw an oval.
-
drawPolygon(int[], int[], int)
- Draw a polygon.
-
drawPolygon(Polygon)
- Draw a polygon.
-
drawPolyline(int[], int[], int)
- Draw a polyline if graphics, record operation.
-
drawRect(int, int, int, int)
- Draw a rectangle.
-
drawRoundRect(int, int, int, int, int, int)
- Do operation if we have a graphics object, then record.
-
drawString(String, int, int)
- Draw a string.
-
fill3DRect(int, int, int, int, boolean)
- Do operation if we have a graphics object, then record.
-
fillArc(int, int, int, int, int, int)
- Fill an arc if graphics, record operation.
-
fillOval(int, int, int, int)
- Fill an oval if graphics, record operation.
-
fillPolygon(int[], int[], int)
- Fill a polygon.
-
fillPolygon(Polygon)
- Fill a polygon.
-
fillRect(int, int, int, int)
- Do operation if we have a graphics object, then record.
-
fillRoundRect(int, int, int, int, int, int)
- Do operation if we have a graphics object, then record.
-
finalize()
- Finalize everything.
-
getClip()
- Return the clip shape set previously if no draw graphics,
otherwise return display graphics clip shape.
-
getClipBounds()
- Return null if no draw graphics, return display graphics clip bounds
otherwise.
-
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.
-
getColor()
- Return null if no draw graphics, return display graphics color
otherwise.
-
getFont()
- Return null if no draw graphics, return display graphics font
otherwise.
-
getFontMetrics()
- Return null if no draw graphics, return display graphics fotn metrics
otherwise.
-
getFontMetrics(Font)
- Return null if no draw graphics, return display graphics fotn metrics
otherwise.
-
getRecording()
- Returns the graphics recording object.
-
main(String[])
- Main function for debugging and test purposes.
-
setClip(int, int, int, int)
- Set clip rect.
-
setClip(Shape)
- Set the clip shape.
-
setColor(Color)
- Set foreground color.
-
setFont(Font)
- Set the font used.
-
setPaintMode()
- Record and pass on if we have a display graphics.
-
setXORMode(Color)
- Record and pass on if we have a display graphics.
-
toString()
-
-
translate(int, int)
- Record and pass on if we have a display graphics.
RecorderGraphics
public RecorderGraphics()
- Create a recorder graphics with no draw graphics. This simply
means that there will be no simultaneous graphics output.
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.
main
public static void main(String argv[])
- Main function for debugging and test purposes.
getRecording
public GraphicsRecording getRecording()
- Returns the graphics recording object.
create
public Graphics create()
- If we have a draw graphics, then let it do the job.
NULL otherwise.
- Overrides:
- create in class Graphics
create
public Graphics create(int x,
int y,
int width,
int height)
- Let parent class do the job.
- Overrides:
- create in class Graphics
translate
public void translate(int x,
int y)
- Record and pass on if we have a display graphics.
- Overrides:
- translate in class Graphics
getColor
public Color getColor()
- Return null if no draw graphics, return display graphics color
otherwise.
- Overrides:
- getColor in class Graphics
setColor
public void setColor(Color c)
- Set foreground color.
- Overrides:
- setColor in class Graphics
setPaintMode
public void setPaintMode()
- Record and pass on if we have a display graphics.
- Overrides:
- setPaintMode in class Graphics
setXORMode
public void setXORMode(Color c1)
- Record and pass on if we have a display graphics.
- Overrides:
- setXORMode in class Graphics
getFont
public Font getFont()
- Return null if no draw graphics, return display graphics font
otherwise.
- Overrides:
- getFont in class Graphics
setFont
public void setFont(Font font)
- Set the font used.
- Overrides:
- setFont in class Graphics
getFontMetrics
public FontMetrics getFontMetrics()
- Return null if no draw graphics, return display graphics fotn metrics
otherwise.
- Overrides:
- getFontMetrics in class Graphics
getFontMetrics
public FontMetrics getFontMetrics(Font f)
- Return null if no draw graphics, return display graphics fotn metrics
otherwise.
- Overrides:
- getFontMetrics in class Graphics
getClipBounds
public Rectangle getClipBounds()
- Return null if no draw graphics, return display graphics clip bounds
otherwise.
- Overrides:
- getClipBounds in class Graphics
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
setClip
public void setClip(int x,
int y,
int width,
int height)
- Set clip rect.
- Overrides:
- setClip in class Graphics
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
setClip
public void setClip(Shape clip)
- Set the clip shape. Also store a local copy.
- Overrides:
- setClip in class Graphics
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
drawLine
public void drawLine(int x1,
int y1,
int x2,
int y2)
- Draw a line.
- Overrides:
- drawLine in class Graphics
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
drawRect
public void drawRect(int x,
int y,
int width,
int height)
- Draw a rectangle.
- Overrides:
- drawRect in class Graphics
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
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
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
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
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
drawOval
public void drawOval(int x,
int y,
int width,
int height)
- Draw an oval.
- Overrides:
- drawOval in class Graphics
fillOval
public void fillOval(int x,
int y,
int width,
int height)
- Fill an oval if graphics, record operation.
- Overrides:
- fillOval in class Graphics
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
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
drawPolyline
public void drawPolyline(int xPoints[],
int yPoints[],
int nPoints)
- Draw a polyline if graphics, record operation.
- Overrides:
- drawPolyline in class Graphics
drawPolygon
public void drawPolygon(int xPoints[],
int yPoints[],
int nPoints)
- Draw a polygon.
- Overrides:
- drawPolygon in class Graphics
drawPolygon
public void drawPolygon(Polygon p)
- Draw a polygon.
- Overrides:
- drawPolygon in class Graphics
fillPolygon
public void fillPolygon(int xPoints[],
int yPoints[],
int nPoints)
- Fill a polygon.
- Overrides:
- fillPolygon in class Graphics
fillPolygon
public void fillPolygon(Polygon p)
- Fill a polygon.
- Overrides:
- fillPolygon in class Graphics
drawString
public void drawString(String str,
int x,
int y)
- Draw a string.
- Overrides:
- drawString in class Graphics
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
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
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
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
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
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
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
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
dispose
public void dispose()
- Release all memory resources.
- Overrides:
- dispose in class Graphics
finalize
public void finalize()
- Finalize everything.
- Overrides:
- finalize in class Graphics
toString
public String toString()
- Overrides:
- toString in class Graphics
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