Package com.lightcrafts.app

Examples of com.lightcrafts.app.ComboFrame


            add(item);
        }
    }

    void update() {
        ComboFrame frame = getComboFrame();
        if (frame != null) {
            Document newDoc = frame.getDocument();
            Document oldDoc = docRef.get();
            if (newDoc != oldDoc) {
                removeAll();
                if (newDoc != null) {
                    Engine engine = newDoc.getEngine();
View Full Code Here


    ComboLayoutMenuItem(ComboFrame frame) {
        super(frame, "ComboLayout");
    }

    void update() {
        ComboFrame frame = getComboFrame();
        setEnabled(frame != null);
    }
View Full Code Here

        ComboFrame frame = getComboFrame();
        setEnabled(frame != null);
    }

    public void actionPerformed(ActionEvent event) {
        ComboFrame frame = getComboFrame();
        frame.showComboPerspective();
    }
View Full Code Here

        super(frame, "ApplyTemplate");
    }

    // Called from FileMenu when it is selected.
    void update() {
        ComboFrame frame = getComboFrame();
        Document doc = (frame != null) ? frame.getDocument() : null;
        if (doc == null) {
            setEnabled(false);
            return;
        }
        try {
            removeAll();
            List<TemplateKey> keys = TemplateDatabase.getTemplateKeys();
            if (! keys.isEmpty()) {
                for (final TemplateKey key : keys) {
                    JMenuItem templateItem = new JMenuItem(key.toString());
                    templateItem.addActionListener(
                        new ActionListener() {
                            public void actionPerformed(ActionEvent event) {
                                ComboFrame frame = getComboFrame();
                                Application.applyTemplate(frame, key);
                            }
                        }
                    );
                    add(templateItem);
View Full Code Here

            String path = file.getAbsolutePath();
            JMenuItem menuItem = new JMenuItem(path);
            menuItem.addActionListener(
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        final ComboFrame frame = getComboFrame();
                        final Editor editor = frame.getEditor();
                        editor.setMode( EditorMode.ARROW );
                        Application.open(frame, file);
                    }
                }
            );
View Full Code Here

            String path = folder.getAbsolutePath();
            JMenuItem menuItem = new JMenuItem(path);
            menuItem.addActionListener(
                new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        final ComboFrame frame = getComboFrame();
                        final Editor editor = frame.getEditor();
                        editor.setMode( EditorMode.ARROW );
                        Application.openRecentFolder(frame, folder);
                    }
                }
            );
View Full Code Here

        super(frame, "SaveAs");
    }

    public void actionPerformed(ActionEvent event) {
        performPreAction( event );
        final ComboFrame frame = getComboFrame();
        Application.saveAs(frame);
    }
View Full Code Here

            addPreviewItems();
        }
    }

    void update() {
        final ComboFrame frame = getComboFrame();
        final Document newDoc = (frame != null) ? frame.getDocument() : null;
        final Document oldDoc = docRef.get();

        if (newDoc != oldDoc) {
            removeAll();
            addFixedItems();
View Full Code Here

            add(item);
        }
    }

    private void addLayoutItems() {
        final ComboFrame frame = getComboFrame();
        add(new EditorLayoutMenuItem(frame));
        add(new BrowserLayoutMenuItem(frame));
    }
View Full Code Here

        add(new EditorLayoutMenuItem(frame));
        add(new BrowserLayoutMenuItem(frame));
    }

    private void addPreviewItems() {
        final ComboFrame frame = getComboFrame();
        final Document doc = frame.getDocument();
        final List<Preview> previews = doc.getEngine().getPreviews();
        int previewCount = 0;
        for ( final Preview preview : previews ) {
            if (previewCount == 0) {
                // The first preview is the "styles" preview, not for this menu.
View Full Code Here

TOP

Related Classes of com.lightcrafts.app.ComboFrame

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.