Package org.jitterbit.ui.selection

Examples of org.jitterbit.ui.selection.IndexedSelection


        if (plugins.length > 0) {
            EventQueue.invokeLater(new Runnable() {

                @Override
                public void run() {
                    IndexedSelection selection = SelectionFactory.newIndexedSelection(model.getElementAt(0), 0);
                    list.setSelection(selection);
                    list.requestFocus();
                }
            });
        }
View Full Code Here


            model.addElement(o);
        }
    }

    public PipelinePluginManifest[] getSelection() {
        IndexedSelection selection = list.getSelection();
        if (selection.isEmpty()) {
            return new PipelinePluginManifest[0];
        }
        List<PipelinePluginManifest> plugins = new ArrayList<PipelinePluginManifest>();
        for (Object o : selection.items()) {
            if (o instanceof PipelinePluginListItem) {
                plugins.add(((PipelinePluginListItem) o).getPlugin());
            }
        }
        return plugins.toArray(new PipelinePluginManifest[plugins.size()]);
View Full Code Here

        return selectionHandler.getSelection();
    }

    @Override
    public void setSelectedIndex(int index) {
        IndexedSelection selection = null;
        if (index == -1) {
            selection = IndexedSelection.EMPTY;
        } else {
            Object o = list.getModel().getElementAt(index);
            selection = SelectionFactory.newIndexedSelection(o, index);
View Full Code Here

        }

        @Override
        public void valueChanged(ListSelectionEvent e) {
            if (!e.getValueIsAdjusting()) {
                IndexedSelection sel = new ListSelection(list, selectionConverter);
                onNewSelection(sel);
            }
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.selection.IndexedSelection

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.