Class LayerCommandUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnPositionCoordinateconvertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer) Convert the givenColumnPositionCoordinateto the given targetILayer.static ColumnPositionCoordinateconvertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenColumnPositionCoordinateto the given targetILayer.static PositionCoordinateconvertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer) Convert the givenPositionCoordinateto the given targetILayer.static PositionCoordinateconvertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenPositionCoordinateto the given targetILayer.static RowPositionCoordinateconvertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer) Convert the givenRowPositionCoordinateto the given targetILayer.static RowPositionCoordinateconvertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenRowPositionCoordinateto the given targetILayer.
-
Method Details
-
convertPositionToTargetContext
public static PositionCoordinate convertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer) Convert the givenPositionCoordinateto the given targetILayer.- Parameters:
positionCoordinate- ThePositionCoordinatethat should be converted.targetLayer- TheILayerto which thePositionCoordinateshould be converted to.- Returns:
- The converted
PositionCoordinateornullif a conversion is not possible.
-
convertPositionToTargetContext
public static PositionCoordinate convertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenPositionCoordinateto the given targetILayer.- Parameters:
positionCoordinate- ThePositionCoordinatethat should be converted.targetLayer- TheILayerto which thePositionCoordinateshould be converted to.acceptNegativePosition-trueif a negative position value should be accepted,falseif not.Note: Accepting a negative position value could cause serious issues as a negative position typically means the position does not exist. Only in cases where the ViewportLayer and spanning is involved a negative position could make sense as the position could be for example not visible at the moment.
- Returns:
- The converted
PositionCoordinateornullif a conversion is not possible. - Since:
- 1.6
-
convertColumnPositionToTargetContext
public static ColumnPositionCoordinate convertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer) Convert the givenColumnPositionCoordinateto the given targetILayer.- Parameters:
columnPositionCoordinate- TheColumnPositionCoordinatethat should be converted.targetLayer- TheILayerto which theColumnPositionCoordinateshould be converted to.- Returns:
- The converted
ColumnPositionCoordinateornullif a conversion is not possible.
-
convertColumnPositionToTargetContext
public static ColumnPositionCoordinate convertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenColumnPositionCoordinateto the given targetILayer.- Parameters:
columnPositionCoordinate- TheColumnPositionCoordinatethat should be converted.targetLayer- TheILayerto which theColumnPositionCoordinateshould be converted to.acceptNegativePosition-trueif a negative column position should be accepted,falseif not.Note: Accepting a negative position could cause serious issues as a negative position typically means the position does not exist. Only in cases where the ViewportLayer and spanning is involved a negative position could make sense as the position could be for example not visible at the moment.
- Returns:
- The converted
ColumnPositionCoordinateornullif a conversion is not possible. - Since:
- 1.6
-
convertRowPositionToTargetContext
public static RowPositionCoordinate convertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer) Convert the givenRowPositionCoordinateto the given targetILayer.- Parameters:
rowPositionCoordinate- TheRowPositionCoordinatethat should be converted.targetLayer- TheILayerto which theRowPositionCoordinateshould be converted to.- Returns:
- The converted
RowPositionCoordinateornullif a conversion is not possible.
-
convertRowPositionToTargetContext
public static RowPositionCoordinate convertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenRowPositionCoordinateto the given targetILayer.- Parameters:
rowPositionCoordinate- TheRowPositionCoordinatethat should be converted.targetLayer- TheILayerto which theRowPositionCoordinateshould be converted to.acceptNegativePosition-trueif a negative row position should be accepted,falseif not.Note: Accepting a negative position could cause serious issues as a negative position typically means the position does not exist. Only in cases where the ViewportLayer and spanning is involved a negative position could make sense as the position could be for example not visible at the moment.
- Returns:
- The converted
RowPositionCoordinateornullif a conversion is not possible. - Since:
- 1.6
-