Package bdsup2sub.tools

Examples of bdsup2sub.tools.Props


    private Props props;

    private Configuration() {
        configFilePath = getConfigFilePath();
        props = new Props();
    }
View Full Code Here


                        if (JOptionPane.showConfirmDialog(view, "Target exists! Overwrite?", "", JOptionPane.YES_NO_OPTION) == 1) {
                            throw new CoreException();
                        }
                    }
                    model.setColorProfilePath(filename);
                    Props colProps = new Props();
                    colProps.setHeader("COL - created by " + Constants.APP_NAME + " " + Constants.APP_VERSION);
                    for (int i=0; i<  model.getSelectedColors().length; i++) {
                        String s = String.valueOf(model.getSelectedColors()[i].getRed()) + "," +  model.getSelectedColors()[i].getGreen() + "," + model.getSelectedColors()[i].getBlue();
                        colProps.set("Color_" + i, s);
                    }
                    colProps.save(model.getColorProfilePath());
                } catch (CoreException ex) {
                    if (ex.getMessage() != null) {
                        JOptionPane.showMessageDialog(view, ex.getMessage(), "Error!", JOptionPane.WARNING_MESSAGE);
                    }
                }
View Full Code Here

                            throw new CoreException();
                        }
                    } else {
                        throw new CoreException("File not found.");
                    }
                    Props colProps = new Props();
                    colProps.load(filename);
                    model.setColorProfilePath(filename);
                    for (int i=0; i < model.getSelectedColors().length; i++) {
                        String s = colProps.get("Color_"+i, "0,0,0");
                        String sp[] = s.split(",");
                        if (sp.length >= 3) {
                            int r = Integer.valueOf(sp[0].trim())&0xff;
                            int g = Integer.valueOf(sp[1].trim())&0xff;
                            int b = Integer.valueOf(sp[2].trim())&0xff;
View Full Code Here

        configuration.setLuminanceThreshold(lt);
    }

    private void processPaletteFile() {
        if (options.getPaletteFile() != null) {
            Props colProps = new Props();
            colProps.load(options.getPaletteFile().getAbsolutePath());
            for (int c = 0; c < 15; c++) {
                String s = colProps.get("Color_" + c, "0,0,0");
                String sp[] = s.split(",");
                if (sp.length >= 3) {
                    int red = Integer.valueOf(sp[0].trim()) & 0xff;
                    int green = Integer.valueOf(sp[1].trim()) & 0xff;
                    int blue = Integer.valueOf(sp[2].trim()) & 0xff;
View Full Code Here

TOP

Related Classes of bdsup2sub.tools.Props

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.