public class CGM
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected java.util.Vector<Command> |
commandList |
protected static java.util.logging.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
void |
changeColor(java.awt.Color oldc,
java.awt.Color newc) |
java.lang.Object |
clone() |
int[] |
extent() |
ColorTable |
getColorTable() |
static void |
main(java.lang.String[] args) |
protected void |
paint(CGMDisplay d)
The paint call managed by the CGMDisplay object, which holds changes to
the Graphics object based on different Commands held by this CGM.
|
void |
paint(java.awt.Graphics g,
int width,
int height)
A direct call to paint on the CGM file, creates a CGMDisplay that marches
through the CGM commands and renders into the provided Graphics object.
|
void |
read(java.io.DataInputStream in) |
void |
scale(CGMDisplay d) |
void |
showCGMCommands() |
protected void |
sortColors()
Allows color commands to look up indexes in ColorTable to find real
values.
|
java.lang.String |
toString() |
protected java.util.Vector<Command> commandList
protected static java.util.logging.Logger logger
public CGM()
public CGM(java.lang.String path) throws java.io.IOException
java.io.IOException
public void read(java.io.DataInputStream in) throws java.io.IOException
java.io.IOException
protected void paint(CGMDisplay d)
d
- public void paint(java.awt.Graphics g, int width, int height)
g
- java Graphics objectwidth
- the pixel width of image to render into.height
- the pixel height of image to render info.protected void sortColors()
public void scale(CGMDisplay d)
public int[] extent()
public ColorTable getColorTable()
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public java.lang.Object clone()
clone
in class java.lang.Object
public void showCGMCommands()
public void changeColor(java.awt.Color oldc, java.awt.Color newc)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details