Package com.lightcrafts.app

Examples of com.lightcrafts.app.ComboFrame


            add(new PrefsMenuItem(frame));
        }
    }

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

        if (newDoc != oldDoc) {
            if (oldDoc != null) {
                final RegionManager oldRegions = oldDoc.getRegionManager();
View Full Code Here


        }
    }

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

    BrowserExportMenuItem(ComboFrame frame) {
        super(frame, "BrowserExport");
    }

    public void actionPerformed(ActionEvent event) {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = getBrowser();
        List<File> list = browser.getSelectedFiles();
        File[] files = list.toArray(new File[0]);
        if (files.length > 1) {
            Application.export(frame, files);
View Full Code Here

    SendMenuItem(ComboFrame frame) {
        super(frame, "Send");
    }

    public void actionPerformed(ActionEvent event) {
        ComboFrame frame = getComboFrame();
        AbstractImageBrowser browser = frame.getBrowser();
        List<File> list = browser.getSelectedFiles();
        if (! list.isEmpty()) {
            File[] files = list.toArray(new File[0]);
            Application.send(frame, files);
        }
View Full Code Here

        super(frame, "CloseDoc");
    }

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

    RescanMenuItem(ComboFrame frame) {
        super(frame, "Rescan");
    }

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

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

    AbstractImageBrowser getBrowser() {
        ComboFrame frame = getComboFrame();
        return frame.getBrowser();
    }
View Full Code Here

        ComboFrame frame = getComboFrame();
        return frame.getBrowser();
    }

    void update() {
        ComboFrame frame = getComboFrame();
        if (frame != null) {
            boolean visible = frame.isBrowserVisible();
            boolean empty = getSelection().isEmpty();
            setEnabled(visible && ! empty);
        }
    }
View Full Code Here

        noneItem.setEnabled(false);
        add(noneItem);
    }

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

        if (newDoc != oldDoc) {
            try {
                removeAll();
                if (newDoc != null) {
                    List<TemplateKey> keys = TemplateDatabase.getTemplateKeys();
                    if (! keys.isEmpty()) {
                        LinkedHashMap<String, LinkedList<TemplateKey>> nsMap =
                            new LinkedHashMap<String, LinkedList<TemplateKey>>();
                        for (TemplateKey key : keys) {
                            String namespace = key.getNamespace();
                            if (! nsMap.containsKey(namespace)) {
                                nsMap.put(
                                    namespace, new LinkedList<TemplateKey>()
                                );
                            }
                            nsMap.get(namespace).add(key);
                        }
                        for (String namespace : nsMap.keySet()) {
                            JMenu nsItem = new JMenu(namespace);
                            List<TemplateKey> nsKeys = nsMap.get(namespace);
                            for (final TemplateKey key : nsKeys) {
                                JMenuItem templateItem =
                                    new JMenuItem(key.getName());
                                templateItem.addActionListener(
                                    new ActionListener() {
                                        public void actionPerformed(
                                            ActionEvent event
                                        ) {
                                            ComboFrame frame = getComboFrame();
                                            Application.applyTemplate(frame, key);
                                        }
                                    }
                                );
                                nsItem.add(templateItem);
View Full Code Here

        }
    }

    public void actionPerformed(ActionEvent event) {
        performPreAction( event );
        final ComboFrame frame = getComboFrame();
        Application.reOpen(frame);
    }
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.