edu.iastate.metnet.metaomgraph
Class ComponentToImage
java.lang.Object
edu.iastate.metnet.metaomgraph.ComponentToImage
public class ComponentToImage
- extends java.lang.Object
|
Method Summary |
static java.lang.String |
getExtension(java.io.File f)
Determines the extension of a given file. |
static void |
main(java.lang.String[] args)
|
static void |
saveAsPNG(java.awt.Component c,
java.io.File f)
|
static void |
saveAsPNG(java.awt.Component c,
java.io.File f,
int width,
int height)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentToImage
public ComponentToImage()
saveAsPNG
public static void saveAsPNG(java.awt.Component c,
java.io.File f,
int width,
int height)
throws java.io.IOException
- Throws:
java.io.IOException
saveAsPNG
public static void saveAsPNG(java.awt.Component c,
java.io.File f)
throws java.io.IOException
- Throws:
java.io.IOException
main
public static void main(java.lang.String[] args)
- Parameters:
args -
getExtension
public static java.lang.String getExtension(java.io.File f)
- Determines the extension of a given file. The file's extension is
anything after the last period in the filename.
- Parameters:
f - The file from which to get an extension.
- Returns:
- The extension of the given file. Returns null if the given file
is null, or if it has no extension.