Package com.lightcrafts.model

Examples of com.lightcrafts.model.Operation


        } else {
            modeButtons.setRegionsEnabled(true);
        }

        if ( control != null ) {
            final Operation op = control.getOperation();
            final EditorMode prefMode = op.getPreferredMode();
            if ( isLocked || isRaw ||
                 prefMode != EditorMode.ARROW ||
                 m_editorMode == EditorMode.ARROW )
                setEditorMode( prefMode );
        }
View Full Code Here


        // Since region mode interacts with the tool stack selection,
        // be sure to pop out of that mode if it's the current mode at
        // the time a tool is deleted.
        if (overlay.peekMode() == regionMode) {
            if (this.control != null) {
                Operation op = this.control.getOperation();
                if (op.getPreferredMode() != EditorMode.REGION) {
                    EventQueue.invokeLater(
                        new Runnable() {
                            public void run() {
                                setEditorMode( EditorMode.ARROW );
                            }
View Full Code Here

        this.control = control;

        editor = new OpTitleEditor(this, control.undoSupport);
        editor.setLabel(label);

        Operation op = control.getOperation();
        BufferedImage image = OpActions.getIcon(op);
        setIcon(image);

        activeButton = createActiveButton();
        activeButton.setToolTipText(LOCALE.get("DisableToolTip"));
View Full Code Here

        content.add(Box.createVerticalStrut(8), 0);
    }

    private void setColor(Color color, boolean isChanging) {
        if (isChanging && ! wasChanging) {
            Operation op = getOperation();
            op.changeBatchStarted();
        }
        else if (wasChanging && ! isChanging) {
            Operation op = getOperation();
            op.changeBatchEnded();
        }
        wasChanging = isChanging;

        ColorPickerOperation op = (ColorPickerOperation) getOperation();
        Map<String, Double> map = op.setColor(color);
        updateColor(map);
        if (! undoSupport.isRestoring() && ! isChanging) {
            undoSupport.postEdit(LOCALE.get("SetColorEditName"));
        }
    }
View Full Code Here

TOP

Related Classes of com.lightcrafts.model.Operation

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.