Package org.jitterbit.ui.selection

Examples of org.jitterbit.ui.selection.Selection


        }
    }

    @Override
    public final IndexedSelection getSelection() {
        Selection sel = super.getSelection();
        return (sel == null) ? IndexedSelection.EMPTY : (IndexedSelection) sel;
    }
View Full Code Here


    public boolean isEnabled() {
        return true;
    }

    private AbstractGraphNode getSelectedNode() {
        Selection sel = getSelection();
        if (sel instanceof OrderedSelection) {
            return SelectionUtils.getSingleSelection(sel, AbstractGraphNode.class);
        }
        return null;
    }
View Full Code Here

   
    private class SelectionActionUpdater implements GraphSelectionListener {

        @Override
        public void selectionChanged(GraphSelectionEvent evt) {
            Selection selection = SelectionFactory.newOrderedSelection(selectionModel.getSelection());
            for (SelectionAction a : selectionActions.values()) {
                a.setSelection(selection);
            }
        }
View Full Code Here

    @Override
    public void actionPerformed(ActionEvent e) {
        if (!movingNodesSupported) {
            return;
        }
      Selection selection = getSelection();
      if (selection.isEmpty()) {
        return;
      }
      for (Object node : selection.items()) {
        getLayout().moveBy(node, delta);
      }
            layoutEditSender.newEdit();
    }
View Full Code Here

        // Do nothing. This action is always enabled.
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        Selection sel = getSelection();
        if (sel.isEmpty()) {
            resetGraphLayout();
        } else {
            resetNodeLayouts(sel);
        }
    }
View Full Code Here

     *            the ID of the <code>IntegrationEntity</code> to select, or <code>null</code>
     *            to clear the current selection.
     */
    public void setSelectedEntity(IntegrationEntityId id) {
        ListItem listItem = getEntityListItem(id);
        Selection sel = (listItem != null) ? SelectionFactory.newOrderedSelection(listItem) : Selection.EMPTY;
        entityList.setSelection(sel);
    }
View Full Code Here

        return value == null ? OrderedSelection.EMPTY : SelectionFactory.newOrderedSelection(value);
    }
   
    @Override
    protected T getValueFromUi() {
        Selection s = selectionSource.getSelection();
        for (Object o : s.items()) {
            if (cls.isInstance(o)) {
                return cls.cast(o);
            }
        }
        return null;
View Full Code Here

        entityList.setSelectionMode(mode.asListSelectionMode());
    }

    @Override
    public void setSelectedEntity(T entity) {
        Selection s = (entity != null ? SelectionFactory.newOrderedSelection(entity) : Selection.EMPTY);
        entityList.setSelection(s);
    }
View Full Code Here

    private void setSelectedIndex(final int index) {
        assert (EventQueue.isDispatchThread()) : "setSelectedIndex called from outside the EDT";
        // According to the KongaRowTable.setSelection() contract, we do not have to include
        // the selected object in the selection; only the index is of interest:
        Selection sel = SelectionFactory.newIndexedSelection(null, index);
        table.setSelection(sel);
    }
View Full Code Here

        public void valueChanged(ListSelectionEvent e) {
            if (e.getValueIsAdjusting() || blocked) {
                return;
            }
            checkOppositeSelection((JList) e.getSource());
            Selection selection = getSelection();
            selectionListeners.call().selectionChanged(new SelectionChangedEvent(ConnectedLists.this, selection));
        }
View Full Code Here

TOP

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

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.