|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ntnu.ecosim.visual.ScreenImage
public class ScreenImage
This class is NOT the work of Martin Børke, but is copied from http://www.discoverteenergy.com/files/ScreenImage.java The original author allows for usage of the code.
Constructor Summary | |
---|---|
ScreenImage()
|
Method Summary | |
---|---|
static java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component,
java.awt.Rectangle region,
java.lang.String fileName)
Create a BufferedImage for Swing components. |
static java.awt.image.BufferedImage |
createImage(javax.swing.JComponent component,
java.lang.String fileName)
Create a BufferedImage for Swing components. |
static void |
writeImage(java.awt.image.BufferedImage image,
java.lang.String fileName)
Write a BufferedImage to a File. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScreenImage()
Method Detail |
---|
public static java.awt.image.BufferedImage createImage(javax.swing.JComponent component, java.lang.String fileName) throws java.io.IOException
component
- Swing component to create image fromfileName
- name of file to be created or null
java.io.IOException
- if an error occurs during writingpublic static java.awt.image.BufferedImage createImage(javax.swing.JComponent component, java.awt.Rectangle region, java.lang.String fileName) throws java.io.IOException
component
- Swing component to create image fromregion
- The region of the component to be captured to an imagefileName
- name of file to be created or null
java.io.IOException
- if an error occurs during writingpublic static void writeImage(java.awt.image.BufferedImage image, java.lang.String fileName) throws java.io.IOException
image
- image to be writtenfileName
- name of file to be created
java.io.IOException
- if an error occurs during writing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |