com.bbn.openmap.dataAccess.cgm
Class CGM
java.lang.Object
com.bbn.openmap.dataAccess.cgm.CGM
- All Implemented Interfaces:
- java.lang.Cloneable
public class CGM
- extends java.lang.Object
- implements java.lang.Cloneable
Constructor Summary |
CGM()
|
CGM(java.lang.String path)
|
Method Summary |
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()
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
commandList
protected java.util.Vector<Command> commandList
logger
protected static java.util.logging.Logger logger
CGM
public CGM()
CGM
public CGM(java.lang.String path)
throws java.io.IOException
- Throws:
java.io.IOException
read
public void read(java.io.DataInputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
paint
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.
- Parameters:
d
-
paint
public 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.
- Parameters:
g
- java Graphics objectwidth
- the pixel width of image to render into.height
- the pixel height of image to render info.
sortColors
protected void sortColors()
- Allows color commands to look up indexes in ColorTable to find real
values.
scale
public void scale(CGMDisplay d)
extent
public int[] extent()
getColorTable
public ColorTable getColorTable()
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
showCGMCommands
public void showCGMCommands()
changeColor
public void changeColor(java.awt.Color oldc,
java.awt.Color newc)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details