use of org.eclipse.nebula.widgets.nattable.coordinate.ColumnPositionCoordinate in project nebula.widgets.nattable by eclipse.
the class MultiColumnReorderCommand method convertToTargetLayer.
@Override
public boolean convertToTargetLayer(ILayer targetLayer) {
List<ColumnPositionCoordinate> convertedFromColumnPositionCoordinates = new ArrayList<ColumnPositionCoordinate>(this.fromColumnPositionCoordinates.size());
for (ColumnPositionCoordinate fromColumnPositionCoordinate : this.fromColumnPositionCoordinates) {
ColumnPositionCoordinate convertedFromColumnPositionCoordinate = LayerCommandUtil.convertColumnPositionToTargetContext(fromColumnPositionCoordinate, targetLayer);
if (convertedFromColumnPositionCoordinate != null) {
convertedFromColumnPositionCoordinates.add(convertedFromColumnPositionCoordinate);
}
}
ColumnPositionCoordinate targetToColumnPositionCoordinate = LayerCommandUtil.convertColumnPositionToTargetContext(this.toColumnPositionCoordinate, targetLayer);
if (convertedFromColumnPositionCoordinates.size() > 0 && targetToColumnPositionCoordinate != null) {
this.fromColumnPositionCoordinates = convertedFromColumnPositionCoordinates;
this.toColumnPositionCoordinate = targetToColumnPositionCoordinate;
return true;
} else {
return false;
}
}
Aggregations