public class Align extends BoxAligner
larger
without resizing.Constructor and Description |
---|
Align() |
Align(String alignX,
String alignY,
String alignZ)
Creates with alignment text for each axis.
|
Modifier and Type | Method and Description |
---|---|
protected BoundingBox |
alignAfterCheck(BoundingBox smaller,
BoundingBox larger)
|
protected BoundingBox |
alignAfterCheck(Extent smaller,
BoundingBox larger)
|
protected BoundingBox |
alignAfterCheck(Extent smaller,
Extent larger)
|
Point3i |
alignCorner(BoundingBox smaller,
Extent larger)
The minimum corner at which the entity should be locate after alignment, ignoring the space
to the left.
|
void |
checkMisconfigured(BeanInstanceMap defaultInstances)
Checks that a bean's properties conform to expectations.
|
Align |
duplicateBean()
Creates a new bean that deep-copies every property value.
|
String |
getAlignX()
Indicates how to align the image across the X-axis (i.e.
|
String |
getAlignY()
Indicates how to align the image across the Y-axis (i.e.
|
String |
getAlignZ()
Indicates how to align the image across the Z-axis: one of
top, bottom, center,
repeat . |
void |
setAlignX(String alignX)
Indicates how to align the image across the X-axis (i.e.
|
void |
setAlignY(String alignY)
Indicates how to align the image across the Y-axis (i.e.
|
void |
setAlignZ(String alignZ)
Indicates how to align the image across the Z-axis: one of
top, bottom, center,
repeat . |
align, align, align
describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public Align(String alignX, String alignY, String alignZ)
alignX
- indicates how to align the image across the X-axis: one of top,
bottom, center
.alignY
- indicates how to align the image across the Y-axis (i.e. vertically):
one of top, bottom, center
.alignZ
- indicates how to align the image across the Z-axis: one of top,
bottom, center, repeat
. See alignZ
.public Align()
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
AnchorBean
checkMisconfigured
in class AnchorBean<BoxAligner>
defaultInstances
- all available default instances if the DefaultInstance
annotation is usedBeanMisconfiguredException
- if the bean has not been configured properly as XMLprotected BoundingBox alignAfterCheck(BoundingBox smaller, BoundingBox larger)
BoxAligner
alignAfterCheck
in class BoxAligner
smaller
- the smaller bounding-box, relative to the minimum-corner of larger
. Often this is (0, 0, 0)
if it sits at the minimum corner of larger
.larger
- the larger bounding-box absolute coordinates.smaller
, while remaining inside larger
.protected BoundingBox alignAfterCheck(Extent smaller, Extent larger) throws OperationFailedException
BoxAligner
alignAfterCheck
in class BoxAligner
smaller
- the smaller bounding-box, relative to the minimum-corner of larger
. Often this is (0, 0, 0)
if it sits at the minimum corner of larger
.larger
- the larger bounding-box absolute coordinates.smaller
, while remaining inside larger
.OperationFailedException
- if an unrecognized parameter or illegal state exists
preventing successful alignment.protected BoundingBox alignAfterCheck(Extent smaller, BoundingBox larger) throws OperationFailedException
BoxAligner
alignAfterCheck
in class BoxAligner
smaller
- the smaller bounding-box, relative to the minimum-corner of larger
. Often this is (0, 0, 0)
if it sits at the minimum corner of larger
.larger
- the larger bounding-box absolute coordinates.smaller
, while remaining inside larger
.OperationFailedException
- if an unrecognized parameter or illegal state exists
preventing successful alignment.public Point3i alignCorner(BoundingBox smaller, Extent larger)
smaller
- the smaller size to align with larger
.larger
- the larger size to align against as a reference.public Align duplicateBean()
AnchorBean
Any state that is not a BeanField
is ignored.
duplicateBean
in class AnchorBean<BoxAligner>
public String getAlignX()
left, right, center
.public void setAlignX(String alignX)
left, right, center
.public String getAlignY()
top, bottom, center
.public void setAlignY(String alignY)
top, bottom, center
.public String getAlignZ()
top, bottom, center,
repeat
.
repeat
is a special-case where a single z-slice overlay will be duplicated across
the z-dimension of the stack onto which it is overlayed.
public void setAlignZ(String alignZ)
top, bottom, center,
repeat
.
repeat
is a special-case where a single z-slice overlay will be duplicated across
the z-dimension of the stack onto which it is overlayed.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.