Package com.lightcrafts.ui.editor

Examples of com.lightcrafts.ui.editor.ScaleModel


    void update() {
        Document newDoc = getDocument();
        Document oldDoc = docRef.get();
        if (newDoc != oldDoc) {
            if (oldDoc != null) {
                ScaleModel model = oldDoc.getScaleModel();
                model.removeScaleListener(this);
            }
            if (newDoc != null) {
                ScaleModel model = newDoc.getScaleModel();
                model.addScaleListener(this);
                setEnabled(model.canScaleUp());
            }
            else {
                setEnabled(false);
            }
            docRef = new WeakReference<Document>(newDoc);
View Full Code Here


    }

    public void actionPerformed(ActionEvent event) {
        performPreAction( event );
        Document doc = getDocument();
        ScaleModel model = doc.getScaleModel();
        model.setScale(Unity);
    }
View Full Code Here

    void update() {
        Document newDoc = getDocument();
        Document oldDoc = docRef.get();
        if (newDoc != oldDoc) {
            if (oldDoc != null) {
                ScaleModel model = oldDoc.getScaleModel();
                model.removeScaleListener(this);
            }
            if (newDoc != null) {
                ScaleModel model = newDoc.getScaleModel();
                model.addScaleListener(this);
                setEnabled(model.canScaleUp());
            }
            else {
                setEnabled(false);
            }
            docRef = new WeakReference<Document>(newDoc);
View Full Code Here

        }
    }

    public void actionPerformed(ActionEvent event) {
        Document doc = getDocument();
        ScaleModel model = doc.getScaleModel();
        model.scaleUp();
    }
View Full Code Here

        model.scaleUp();
    }

    public void scaleChanged(Scale scale) {
        Document doc = getDocument();
        ScaleModel model = doc.getScaleModel();
        setEnabled(model.canScaleUp());
    }
View Full Code Here

    void update() {
        Document newDoc = getDocument();
        Document oldDoc = docRef.get();
        if (newDoc != oldDoc) {
            if (oldDoc != null) {
                ScaleModel model = oldDoc.getScaleModel();
                model.removeScaleListener(this);
            }
            if (newDoc != null) {
                ScaleModel model = newDoc.getScaleModel();
                model.addScaleListener(this);
                setEnabled(model.canScaleDown());
            }
            else {
                setEnabled(false);
            }
            docRef = new WeakReference<Document>(newDoc);
View Full Code Here

        }
    }

    public void actionPerformed(ActionEvent event) {
        Document doc = getDocument();
        ScaleModel model = doc.getScaleModel();
        model.scaleDown();
    }
View Full Code Here

        model.scaleDown();
    }

    public void scaleChanged(Scale scale) {
        Document doc = getDocument();
        ScaleModel model = doc.getScaleModel();
        setEnabled(model.canScaleDown());
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.editor.ScaleModel

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.