Пример #1
0
 private int moveRow(final int row, final int increment) {
   int newIndex = Math.abs(row + increment) % myModel.getRowCount();
   final ClasspathTableItem<?> item = myModel.removeDataRow(row);
   myModel.addItemAt(item, newIndex);
   return newIndex;
 }
 private int moveRow(final int row, final int increment) {
   int newIndex = Math.abs(row + increment) % myModel.getRowCount();
   myModel.exchangeRows(row, newIndex);
   return newIndex;
 }
 boolean isInDragZone(MouseEvent e) {
   final Point p = SwingUtilities.convertMouseEvent(e.getComponent(), e, this).getPoint();
   return Math.abs(myInfo.getAnchor().isHorizontal() ? p.y : p.x) < 6;
 }