org.swiftgantt.common
Class SwingComImageGenerator

java.lang.Object
  extended by org.swiftgantt.common.SwingComImageGenerator

public class SwingComImageGenerator
extends java.lang.Object

Swing Component Image Generator.

Author:
Yuxing Wang

Method Summary
static void checkAndCreateDirForFilePath(java.lang.String filePath)
           
 void genJPEGImage(java.awt.Dimension size, javax.swing.JComponent[] components, java.awt.Rectangle[] areas, java.lang.String filePath)
           
 void genJPEGImage(javax.swing.JComponent component, java.lang.String filePath)
           
 void genPNGImage(java.awt.Dimension size, javax.swing.JComponent[] components, java.awt.Rectangle[] areas, java.lang.String filePath)
           
 void genPNGImage(javax.swing.JComponent component, java.lang.String filePath)
           
static SwingComImageGenerator getInstance()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SwingComImageGenerator getInstance()
Returns:

genJPEGImage

public void genJPEGImage(javax.swing.JComponent component,
                         java.lang.String filePath)
                  throws java.io.IOException
Parameters:
component -
filePath -
Throws:
java.lang.Exception
java.io.IOException

genJPEGImage

public void genJPEGImage(java.awt.Dimension size,
                         javax.swing.JComponent[] components,
                         java.awt.Rectangle[] areas,
                         java.lang.String filePath)
                  throws java.io.IOException
Parameters:
size -
components -
areas -
filePath -
Throws:
java.io.IOException

genPNGImage

public void genPNGImage(javax.swing.JComponent component,
                        java.lang.String filePath)
                 throws java.io.IOException
Parameters:
component -
filePath -
Throws:
java.lang.Exception
java.io.IOException

genPNGImage

public void genPNGImage(java.awt.Dimension size,
                        javax.swing.JComponent[] components,
                        java.awt.Rectangle[] areas,
                        java.lang.String filePath)
                 throws java.io.IOException
Parameters:
size -
components -
areas -
filePath -
Throws:
java.io.IOException

checkAndCreateDirForFilePath

public static void checkAndCreateDirForFilePath(java.lang.String filePath)
Parameters:
filePath -

main

public static void main(java.lang.String[] args)