Class LayerCommandUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnPositionCoordinate
convertColumnPositionToTargetContext
(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer) Convert the givenColumnPositionCoordinate
to the given targetILayer
.static ColumnPositionCoordinate
convertColumnPositionToTargetContext
(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenColumnPositionCoordinate
to the given targetILayer
.static PositionCoordinate
convertPositionToTargetContext
(PositionCoordinate positionCoordinate, ILayer targetLayer) Convert the givenPositionCoordinate
to the given targetILayer
.static PositionCoordinate
convertPositionToTargetContext
(PositionCoordinate positionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenPositionCoordinate
to the given targetILayer
.static RowPositionCoordinate
convertRowPositionToTargetContext
(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer) Convert the givenRowPositionCoordinate
to the given targetILayer
.static RowPositionCoordinate
convertRowPositionToTargetContext
(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenRowPositionCoordinate
to the given targetILayer
.
-
Method Details
-
convertPositionToTargetContext
public static PositionCoordinate convertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer) Convert the givenPositionCoordinate
to the given targetILayer
.- Parameters:
positionCoordinate
- ThePositionCoordinate
that should be converted.targetLayer
- TheILayer
to which thePositionCoordinate
should be converted to.- Returns:
- The converted
PositionCoordinate
ornull
if a conversion is not possible.
-
convertPositionToTargetContext
public static PositionCoordinate convertPositionToTargetContext(PositionCoordinate positionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenPositionCoordinate
to the given targetILayer
.- Parameters:
positionCoordinate
- ThePositionCoordinate
that should be converted.targetLayer
- TheILayer
to which thePositionCoordinate
should be converted to.acceptNegativePosition
-true
if a negative position value should be accepted,false
if 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
PositionCoordinate
ornull
if a conversion is not possible. - Since:
- 1.6
-
convertColumnPositionToTargetContext
public static ColumnPositionCoordinate convertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer) Convert the givenColumnPositionCoordinate
to the given targetILayer
.- Parameters:
columnPositionCoordinate
- TheColumnPositionCoordinate
that should be converted.targetLayer
- TheILayer
to which theColumnPositionCoordinate
should be converted to.- Returns:
- The converted
ColumnPositionCoordinate
ornull
if a conversion is not possible.
-
convertColumnPositionToTargetContext
public static ColumnPositionCoordinate convertColumnPositionToTargetContext(ColumnPositionCoordinate columnPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenColumnPositionCoordinate
to the given targetILayer
.- Parameters:
columnPositionCoordinate
- TheColumnPositionCoordinate
that should be converted.targetLayer
- TheILayer
to which theColumnPositionCoordinate
should be converted to.acceptNegativePosition
-true
if a negative column position should be accepted,false
if 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
ColumnPositionCoordinate
ornull
if a conversion is not possible. - Since:
- 1.6
-
convertRowPositionToTargetContext
public static RowPositionCoordinate convertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer) Convert the givenRowPositionCoordinate
to the given targetILayer
.- Parameters:
rowPositionCoordinate
- TheRowPositionCoordinate
that should be converted.targetLayer
- TheILayer
to which theRowPositionCoordinate
should be converted to.- Returns:
- The converted
RowPositionCoordinate
ornull
if a conversion is not possible.
-
convertRowPositionToTargetContext
public static RowPositionCoordinate convertRowPositionToTargetContext(RowPositionCoordinate rowPositionCoordinate, ILayer targetLayer, boolean acceptNegativePosition) Convert the givenRowPositionCoordinate
to the given targetILayer
.- Parameters:
rowPositionCoordinate
- TheRowPositionCoordinate
that should be converted.targetLayer
- TheILayer
to which theRowPositionCoordinate
should be converted to.acceptNegativePosition
-true
if a negative row position should be accepted,false
if 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
RowPositionCoordinate
ornull
if a conversion is not possible. - Since:
- 1.6
-