Package org.bric.processor

Examples of org.bric.processor.ImageProcessHandler


        new Thread(new Runnable() {

            @Override
            public void run() {
               
                ImageProcessHandler mainProcess;
               
                if(!preview){
                    mainProcess = new ImageProcessHandler(model);
                } else {
                    ImportedImage importedImage = (ImportedImage) model.get(jList1.getSelectedIndex());
                    mainProcess = new ImageProcessHandler(importedImage);
                }
                OutputParameters outputParameters = null;
                ResizeParameters resizeParameters = null;
                RotateParameters rotateParameters = null;
                WatermarkParameters watermarkParameters = null;

                for (int i = 0; i < jTabbedPane1.getComponentCount(); i++) {
                    ImageEditParameters imageEditParameters = ((ImageEditTab) jTabbedPane1.getComponentAt(i)).getImageEditParameters();
                    if (imageEditParameters instanceof OutputParameters) {
                        outputParameters = (OutputParameters) imageEditParameters;
                    } else if (imageEditParameters instanceof ResizeParameters) {
                        resizeParameters = (ResizeParameters) imageEditParameters;
                    } else if (imageEditParameters instanceof RotateParameters) {
                        rotateParameters = (RotateParameters) imageEditParameters;
                    } else if (imageEditParameters instanceof WatermarkParameters) {
                        watermarkParameters = (WatermarkParameters) imageEditParameters;
                    }
                }

                mainProcess.setResizeParameters(resizeParameters);
                mainProcess.setRotateParameters(rotateParameters);
                mainProcess.setWatermarkParameters(watermarkParameters);
                mainProcess.setOutputParameters(outputParameters);
               
                mainProcess.start();
               
            }
        }).start();
    }
View Full Code Here

TOP

Related Classes of org.bric.processor.ImageProcessHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.