Package slash.navigation.converter.gui.dnd

Examples of slash.navigation.converter.gui.dnd.PositionSelection


            Transferable transferable = support.getTransferable();
            try {
                if (support.isDataFlavorSupported(positionFlavor)) {
                    Object selection = transferable.getTransferData(positionFlavor);
                    if (selection != null) {
                        PositionSelection positionsSelection = (PositionSelection) selection;
                        int[] rows = toRows(positionsSelection.getPositions());
                        if (rows.length > 0) {
                            moveRows(rows, support);
                            return true;
                        }
                    }
View Full Code Here


            return MOVE;
        }

        protected Transferable createTransferable(JComponent c) {
            int[] selectedRows = tablePositions.getSelectedRows();
            return new PositionSelection(getPositionsModel().getPositions(selectedRows),
                    getPositionsModel().getRoute().getFormat());
        }
View Full Code Here

        try {
            if (transferable.isDataFlavorSupported(positionFlavor)) {
                Object selection = transferable.getTransferData(positionFlavor);
                if (selection != null) {
                    PositionSelection positionsSelection = (PositionSelection) selection;
                    paste(positionsSelection.getPositions());
                }
            } else if (transferable.isDataFlavorSupported(stringFlavor)) {
                Object string = transferable.getTransferData(stringFlavor);
                if (string != null) {
                    paste((String) string);
View Full Code Here

    }

    public void run() {
        int[] selectedRows = table.getSelectedRows();
        if (selectedRows.length > 0) {
            clipboardInteractor.putIntoClipboard(new PositionSelection(positionsModel.getPositions(selectedRows),
                    positionsModel.getRoute().getFormat()));

            positionsModel.remove(selectedRows);
            final int removeRow = selectedRows[0] > 0 ? selectedRows[0] - 1 : 0;
            if (table.getRowCount() > 0) {
View Full Code Here

    public void run() {
        int[] selectedRows = table.getSelectedRows();
        if (selectedRows.length > 0) {
            BaseNavigationFormat format = positionsModel.getRoute().getFormat();
            clipboardInteractor.putIntoClipboard(new PositionSelection(copy(positionsModel.getPositions(selectedRows)), format));
        }
    }
View Full Code Here

TOP

Related Classes of slash.navigation.converter.gui.dnd.PositionSelection

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.