Package com.lightcrafts.model

Examples of com.lightcrafts.model.Scale


        Rectangle rect = editor.getMaxImageBounds();
        // Sometimes during frame initialization, the max image bounds
        // is reported as zero.  Perhaps some layout glitch involving
        // scroll pane interaction?
        if ((rect.width > 0) && (rect.height > 0)) {
            Scale oldScale = scale.getCurrentScale();
            Scale newScale = engine.setScale(rect);
            if (! scale.setScale(newScale)) {
                engine.setScale(oldScale);
            }
        }
    }
View Full Code Here


        // Sometimes during frame initialization, the max image bounds
        // is reported as zero.  Perhaps some layout glitch involving
        // scroll pane interaction?
        if ((rect.width > 0) && (rect.height > 0)) {
            isChangingScale = true;
            Scale oldScale = scale.getCurrentScale();
            Scale newScale = engine.setScale(rect);
            if (! scale.setScale(newScale)) {
                engine.setScale(oldScale);
            }
            isChangingScale = false;
        }
View Full Code Here

    }

    private static void setInitialSize(Document doc) {
        doc.zoomToFit();
        ScaleModel scales = doc.getScaleModel();
        Scale s = scales.getCurrentScale();
        if (s.getFactor() > 1f) {
            s = new Scale(1, 1);
            scales.setScale(s);
        }
    }
View Full Code Here

            if (! name.equals(imageName)) {
                name = name + " [" + imageName + "]";
            }
            sb.append(name);
            ScaleModel scaleModel = doc.getScaleModel();
            Scale scale = scaleModel.getCurrentScale();
            sb.append(" (").append(scale).append(")");
            sb.append(" - ");
        }
        sb.append(Version.getApplicationName());
View Full Code Here

TOP

Related Classes of com.lightcrafts.model.Scale

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.