use of com.cubrid.common.ui.er.commands.MoveColumnCommand in project cubrid-manager by CUBRID.
the class TableLayoutEditPolicy method createMoveChildCommand.
@SuppressWarnings("rawtypes")
@Override
protected Command createMoveChildCommand(EditPart child, EditPart after) {
if (after == null) {
return null;
}
ERTableColumn childModel = (ERTableColumn) child.getModel();
ERTable parentTable = (ERTable) getHost().getModel();
List hostParts = getHost().getChildren();
int oldIndex = hostParts.indexOf(child);
int newIndex = hostParts.indexOf(after);
return new MoveColumnCommand(childModel, parentTable, oldIndex, newIndex);
}
Aggregations