Package com.lightcrafts.app

Examples of com.lightcrafts.app.ComboFrame


    BrowserLayoutMenuItem(ComboFrame frame) {
        super(frame, "BrowserLayout");
    }

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


        setEnabled(frame != null);
    }

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

        // FIXME: allow export based on browser selection
    }

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

        super(frame, "Close");
    }

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

            addNoFrameAction();
        }
    }

    void update() {
        ComboFrame frame = getComboFrame();
        if (frame == null) {
            // This is the Mac placeholder frame.
            return;
        }
        AbstractImageBrowser newBrowser = frame.getBrowser();
        AbstractImageBrowser oldBrowser = browserRef.get();

        boolean isVisible = frame.isBrowserVisible();

        if ((newBrowser != oldBrowser) || (isVisible != wasVisible)) {
            removeAll();
            if (isVisible) {
                addBrowserActions();
View Full Code Here

        }
        super.update();
    }

    private void addBrowserActions() {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = frame.getBrowser();
        ImageBrowserActions actions = browser.getActions();

        add(actions.getLeftAction());
        add(actions.getRightAction());
        addRatingMenu();
View Full Code Here

        add(actions.getShowHideTypesAction());
    }

    private void addNoBrowserAction() {
        JMenuItem noBrowser = MenuFactory.createMenuItem("NoBrowser");
        final ComboFrame frame = getComboFrame();
        noBrowser.addActionListener(
            new ActionListener() {
                public void actionPerformed(ActionEvent actionEvent) {
                    // Enqueue, because this update can itself be
                    // called from a perspective change.
                    EventQueue.invokeLater(
                        new Runnable() {
                            public void run() {
                                final Editor editor = frame.getEditor();
                                editor.setMode( EditorMode.ARROW );
                                frame.showBrowserPerspective();
                            }
                        }
                    );
                }
            }
View Full Code Here

            for (final TemplateKey key : keys) {
                JMenuItem item = new JMenuItem(key.toString());
                item.addActionListener(
                    new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            ComboFrame frame = getComboFrame();
                            AbstractImageBrowser browser = frame.getBrowser();
                            List<File> list = browser.getSelectedFiles();
                            if (list.size() > 0) {
                                File[] files = list.toArray(new File[0]);
                                Application.applyTemplate(frame, files, key);
                            }
View Full Code Here

        add(templateItem);
    }

    private void addRatingMenu() {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = frame.getBrowser();
        ImageBrowserActions actions = browser.getActions();

        JMenu menu = MenuFactory.createMenu("Rate");
        for (Action action : actions.getRatingActions()) {
            JMenuItem item = menu.add(action);
View Full Code Here

    protected DocumentMenuItem(ComboFrame frame, String key) {
        super(frame, key);
    }

    Document getDocument() {
        final ComboFrame frame = getComboFrame();
        return (frame != null) ? frame.getDocument() : null;
    }
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.