001/**
002 * 
003 */
004package bradleyross.opensource.pdfbox;
005import java.awt.image.BufferedImage;
006// import java.awt.image.WritableRaster;
007import java.awt.Graphics;
008import javax.swing.JPanel;
009import javax.swing.SwingUtilities;
010
011// import bradleyross.swing.SwingDemo.MainPage;
012
013import javax.swing.JFrame;
014/**
015 * First test for pdfbox (under development).
016 * 
017 * @author Bradley Ross
018 * 
019 * <p>Questions on StackOverflow</p>
020 * <ul>
021 * <li><a href="http://stackoverflow.com/questions/37478424/bufferedimage-color-saturation" target="_blank">
022 *     http://stackoverflow.com/questions/37478424/bufferedimage-color-saturation</a></li>
023 * </ul>
024 *
025 */
026public class PdfTest1 {
027        JFrame mainFrame;
028        JPanel mainPanel;
029        BufferedImage image1;
030        Graphics graph1;
031        @SuppressWarnings("serial")
032        protected class MainPanel extends JPanel {
033                
034        }
035        protected void buildImage1() {
036                image1 = new BufferedImage(300, 300, BufferedImage.TYPE_3BYTE_BGR);
037                graph1 = image1.createGraphics();
038
039        }
040        protected void createFrame() {
041                mainFrame = new JFrame();
042                mainPanel = new MainPanel();
043
044        }
045        protected class MainPage implements Runnable {
046                public void run() {
047                        createFrame(); 
048                                
049                        
050                }
051        }
052
053        public void run2() {
054                System.out.println("starting run2");
055                try {
056                        SwingUtilities.invokeLater(new MainPage());
057                }catch (Exception e) {
058                        System.out.println("Exception in main page");
059                        e.printStackTrace();
060                }
061                System.out.println("run2 complete");
062        }
063}