Package org.jitterbit.ui.selection

Examples of org.jitterbit.ui.selection.OrderedSelection.head()


        @Override
        public void selectionChanged(SelectionChangedEvent evt) {
            OrderedSelection selection = (OrderedSelection) evt.getSelection();
            SelectedTables tables = new SelectedTables();
            if (!selection.isEmpty()) {
                DatabaseObject table = (DatabaseObject) selection.head();
                tables.setTableUsage(table, 1);
            }
            model.setUsageCount(tables);
        }
    }
View Full Code Here


        @Override
        public void selectionChanged(SelectionChangedEvent evt) {
            OrderedSelection s = (OrderedSelection) evt.getSelection();
            if (s.size() == 1) {
                showReferences((String) s.head());
            } else {
                referencesTable.clear();
            }
        }
    }
View Full Code Here

    }

    @Override
    public ProjectLocation getSelectedProject() {
        OrderedSelection sel = getSelection();
        return sel.size() == 1 ? (ProjectLocation) sel.head() : null;
    }

    @Override
    public void update() {
        new Builder().update();
View Full Code Here

        panel.addTypeSelectionListener(new SelectionListener() {

            @Override
            public void selectionChanged(SelectionChangedEvent evt) {
                OrderedSelection sel = (OrderedSelection) evt.getSelection();
                DataLocationType type = (DataLocationType) sel.head();
                setCurrentLocationType(type);
            }
        });
        return panel;
    }
View Full Code Here

        panel.addTypeSelectionListener(new SelectionListener() {

            @Override
            public void selectionChanged(SelectionChangedEvent evt) {
                OrderedSelection sel = (OrderedSelection) evt.getSelection();
                DataLocationType type = (DataLocationType) sel.head();
                setCurrentLocationType(type);
            }
        });
        return panel;
    }
View Full Code Here

    @Override
    public T getSelectedEntity() {
        if (mode == SelectionMode.SINGLE) {
            OrderedSelection sel = entityList.getSelection();
            if (sel.size() == 1) {
                IntegrationEntity entity = (IntegrationEntity) sel.head();
                return clazz.cast(entity);
            }
        } else {
            List<T> sel = getSelectedEntities();
            if (!sel.isEmpty()) {
View Full Code Here

    }

    private T getSingleSelection() {
        OrderedSelection sel = treeSelSrc.getSelection();
        if (sel.size() == 1) {
            IntegrationEntity entity = (IntegrationEntity) sel.head();
            if (isValidType(entity)) {
                return clazz.cast(entity);
            }
        }
        return null;
View Full Code Here

        public void selectionChanged(SelectionChangedEvent evt) {
            OrderedSelection sel = (OrderedSelection) evt.getSelection();
            if (sel.isEmpty()) {
                return;
            }
            DeployedEntityDescriptor entity = (DeployedEntityDescriptor) sel.head();
            warningsUi.setSelectedEntity((entity != null) ? entity.getId() : null);
        }
    }
   
   
View Full Code Here

        }
    }
   
    private CompletionToken getSelectedToken() {
        OrderedSelection sel = tokenList.getSelection();
        if (sel.size() == 1 && sel.head() instanceof CompletionToken) {
            return (CompletionToken) sel.head();
        }
        return null;
    }
View Full Code Here

    }
   
    private CompletionToken getSelectedToken() {
        OrderedSelection sel = tokenList.getSelection();
        if (sel.size() == 1 && sel.head() instanceof CompletionToken) {
            return (CompletionToken) sel.head();
        }
        return null;
    }

   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.