public ItemTable() {
        super(new ItemTableModel());
        makeSettingColumn();
        setAutoCreateRowSorter(true);
        setFillsViewportHeight(true);
        setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
        addMouseListener(new ItemTableMouseListener());
        setDragEnabled(true);
        setTransferHandler(new TransferHandler() {
            @Override
            public int getSourceActions(JComponent c) {
                return TransferHandler.COPY_OR_MOVE;
            }

            @Override
            protected Transferable createTransferable(JComponent component) {
                ItemTable table = (ItemTable) component;
                int[] selectedRows = table.getSelectedRows();
                ItemTableModel model = table.getModel();
                StringBuilder buffer = new StringBuilder();
                for (int i = 0; i < selectedRows.length; i++) {
                    Item item = model.getItem(selectedRows[i]);
                    buffer.append(item.getId());
                    if (i != selectedRows.length - 1) {
                        buffer.append("\n");
                    }
                }
                return new StringSelection(buffer.toString());
            }

            /**
             * Remove the items moved from the list.
             */
            @Override
            protected void exportDone(JComponent component, Transferable data, int action) {
                if (action == TransferHandler.MOVE) {
                    ItemTable table = (ItemTable) component;
                    int[] selectedRows = table.getSelectedRows();
                    for (int i = 0; i < selectedRows.length; i++) {
                        selectedRows[i] = convertRowIndexToModel(selectedRows[i]);
                    }
                    ItemTableModel model = table.getModel();
                    model.removeItems(selectedRows);
                }
            }
        });
    }