Package org.jitterbit.ui.selection

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


                FileDescriber.Element.LAST_MODIFIED));

        @Override
        public void selectionChanged(SelectionChangedEvent evt) {
            OrderedSelection selection = (OrderedSelection) evt.getSelection();
            Object[] files = selection.toArray();
            if (files.length == 0) {
                onNothingSelected();
            } else if (files.length == 1) {
                onOneFileSelected((File) files[0]);
            }
View Full Code Here


        }
       
        private List<Object> getMovableObjects() {
            OrderedSelection sel = (OrderedSelection) getSelection();
            List<Object> movable = new ArrayList<Object>();
            for (Object o : sel.toArray()) {
                if (canItemBeMovedToTarget(o)) {
                    movable.add(o);
                }
            }
            return movable;
View Full Code Here

        }

        @Override
        protected void handleSelectionChange() {
            OrderedSelection sel = (OrderedSelection) getSelection();
            for (Object o : sel.toArray()) {
                if (canItemBeMovedToTarget(o)) {
                    setEnabled(true);
                    return;
                }
            }
View Full Code Here

        }
       
        private boolean updateTargetModel() {
            OrderedSelection sel = (OrderedSelection) getSelection();
            boolean changed = false;
            for (Object o : sel.toArray()) {
                if (targetModel.removeElement(o)) {
                    changed = true;
                }
                targetItems.remove(o);
            }
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.