Package com.lightcrafts.ui.templates

Examples of com.lightcrafts.ui.templates.TemplateControl


        // Don't let the split panes make the editor image too small.
        editor.getImage().setMinimumSize(new Dimension(120, 120));

        history = new DocUndoHistory();

        templates = new TemplateControl(null, this);

        menus = new ComboFrameMenuBar(this);
        setJMenuBar(menus);

        File folder = folders.getSelection();
View Full Code Here


        if (doc != null) {
            editor = doc.getEditor();
            history = new DocUndoHistory(doc);
            templates.dispose();
            templates = new TemplateControl(editor, this);
            ScaleModel scale = doc.getScaleModel();
            scale.addScaleListener(this);
            doc.addDocumentListener(this);
            OtherApplication source = (OtherApplication) doc.getSource();
            if ((! isEditorVisible) || (source != null)) {
                showEditorPerspective();
            }
            toolButtonListener =
                new PropertyChangeListener() {
                    public void propertyChange(PropertyChangeEvent event) {
                        String propName = event.getPropertyName();
                        if (propName.equals(ToggleAction.TOGGLE_STATE)) {
                            boolean selected = (Boolean) event.getNewValue();
                            if (selected && (layout instanceof EditorLayout)) {
                               ((EditorLayout) layout).ensureToolsVisible();
                            }
                        }
                    }
                };
            // Don't let the split panes make the editor image too small.
            editor.getImage().setMinimumSize(new Dimension(120, 120));

            doc.getProofAction().addPropertyChangeListener(toolButtonListener);
        }
        else {
            editor = disabledEditor;

            // Don't let the split panes make the editor image too small.
            editor.getImage().setMinimumSize(new Dimension(120, 120));

            String disabledText = getDisabledEditorText();
            editor.setDisabledText(disabledText);

            history = new DocUndoHistory();

            templates.dispose();
            templates = new TemplateControl(null, this);

            // TODO: we come here from showBrowserPerspective...
            if (! isBrowserVisible) {
                showBrowserPerspective();
            }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.templates.TemplateControl

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.