Package com.lightcrafts.ui.browser.model

Examples of com.lightcrafts.ui.browser.model.ImageDatum


        List<ImageDatum> selected = selection.getSelected();
        if (selected.contains(datum)) {
            if (selected.size() == 1) {
                ArrayList<ImageDatum> visible = getAllImageData();
                ArrayList<ImageDatum> all = list.getAllImageData();
                ImageDatum next = null;
                if (index == 0) {
                    // If the first image was deleted, select the new first
                    if (visible.size() > 0) {
                        next = visible.get(0);
                    }
View Full Code Here


        setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    }
   
    public void selectionChanged(ImageBrowserEvent event) {
        ImageDatum datum = event.getLead();
        File lead = (datum != null) ? datum.getFile() : null;
        List<File> files = event.getFiles();
        int count = event.getImageCount();
        setSelectedFiles(lead, files, count);
    }
View Full Code Here

        // Set an initial selection in the browser, from prefs if possible
        File file = BrowserSelectionMemory.getRememberedFile(folder);
        if (file == null) {
            Collection<ImageDatum> datums = images.getAllImageData();
            if (! datums.isEmpty()) {
                ImageDatum datum = images.getAllImageData().get(0);
                file = datum.getFile();
            }
        }
        if (file != null) {
            // Enqueue, because this method is called during the constructor.
            final Collection<File> files = Collections.singleton(file);
View Full Code Here

                // Use the DocumentDatabase to find the versions of this image:
                List<File> docs = DocumentDatabase.getDocumentsForImage(file);

                ImageGroup group = datum.newGroup();
                for (File doc : docs) {
                    ImageDatum docDatum = fileDatumMap.get(doc);
                    if (docDatum != null) {
                        // The DocumentDatabase can get stale, and we can't
                        // have inconsistencies in the group structure:
                        if (DocumentReader.isReadable(doc)) {
                            docDatum.setGroup(group);
                        }
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of com.lightcrafts.ui.browser.model.ImageDatum

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.