|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jcgm.core.CGM
public class CGM
The main class for Computer Graphics Metafile support.
Constructor Summary | |
---|---|
CGM()
|
|
CGM(java.io.File cgmFile)
|
Method Summary | |
---|---|
void |
addCommandListener(ICommandListener listener)
Adds the given listener to the list of command listeners |
java.awt.geom.Point2D.Double[] |
extent()
|
java.util.List<Command> |
getCommands()
|
java.util.List<Message> |
getMessages()
|
java.awt.Dimension |
getSize()
Returns the size of the CGM graphic. |
java.awt.Dimension |
getSize(double dpi)
Returns the size of the CGM graphic taking into account a specific DPI setting |
void |
paint(CGMDisplay d)
|
void |
read(java.io.DataInput in)
|
void |
showCGMCommands()
|
void |
showCGMCommands(java.io.PrintStream stream)
|
static void |
split(java.io.File cgmFile,
java.io.File outputDir,
IBeginMetafileNameExtractor extractor)
Splits a CGM file containing several CGM files into pieces. |
static void |
split(java.io.File cgmFile,
ICgmExtractor extractor)
Splits a CGM file containing several CGM files into pieces. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CGM()
public CGM(java.io.File cgmFile) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void read(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public static void split(java.io.File cgmFile, java.io.File outputDir, IBeginMetafileNameExtractor extractor) throws java.io.IOException
extractor
.
cgmFile
- The CGM file to splitoutputDir
- The output directory to use. Must exist and be writable.extractor
- The extractor in charge of naming the split CGM files
java.io.IOException
- If the given CGM file could not be read or there was an error
splitting the filepublic static void split(java.io.File cgmFile, ICgmExtractor extractor) throws java.io.IOException, CgmException
cgmFile
- The CGM file to splitextractor
- An extractor that knows what to do with the extracted CGM file
java.io.IOException
- If an error happened reading the CGM file
CgmException
- If an error happened during the handling of the extracted CGM
filepublic void addCommandListener(ICommandListener listener)
listener
- The listener to addpublic java.util.List<Message> getMessages()
public void paint(CGMDisplay d)
public java.awt.Dimension getSize()
VDCExtent
command was found.public java.awt.Dimension getSize(double dpi)
dpi
- The DPI value to use
VDCExtent
command was found.public java.awt.geom.Point2D.Double[] extent()
public void showCGMCommands()
public void showCGMCommands(java.io.PrintStream stream)
public java.util.List<Command> getCommands()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |