public class IlvAttachmentConstraint extends Object implements Cloneable, IlvPersistentObject
Constructor and Description |
---|
IlvAttachmentConstraint()
Creates an
IlvAttachmentConstraint instance with the default
values. |
IlvAttachmentConstraint(IlvAttachmentLocation anchor,
double dx,
double dy)
Creates a new instance of an attachment using the provided location,
reference, and offset values.
|
IlvAttachmentConstraint(IlvAttachmentLocation hotSpot,
IlvAttachmentLocation anchor)
Creates a new instance of an attachment using the provided hotspot, anchor
values.
|
IlvAttachmentConstraint(IlvAttachmentLocation hotSpot,
IlvAttachmentLocation anchor,
double dx,
double dy)
Creates a new instance of an attachment using the provided hotspot, anchor,
and offset values.
|
IlvAttachmentConstraint(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this object.
|
IlvPoint |
compute(IlvAttachable anchor,
IlvRect bboxAnchor)
Calculates the anchor point given the location and offset.
|
IlvAttachmentLocation |
getAnchor()
Returns the location of this constraint.
|
IlvChildSize |
getChildSize()
Returns the
IlvChildSize of this object |
double |
getHeight()
Returns the height of the child used with this attachment.
|
IlvAttachmentLocation |
getHotSpot()
Returns the location of this constraint.
|
IlvPoint |
getOffset()
Returns the offset being used in the attachment.
|
double |
getOffsetX()
Returns the X coordinate of the offset being used in the attachment.
|
double |
getOffsetY()
Returns the Y coordinate of the offset being used in the attachment.
|
double |
getRelativeHeight()
Deprecated.
Beginning with Rogue Wave JViews 8.0, use the method
getHeight() instead. |
double |
getRelativeWidth()
Deprecated.
Beginning with Rogue Wave JViews 8.0, use the method
getWidth() instead. |
double |
getRotationAngle()
Returns the rotation angle
|
IlvAttachmentLocation |
getRotationCenter()
Returns the rotation center on the child used with this attachment.
|
IlvPoint |
getSize()
Returns the size of the child used with this attachment.
|
double |
getWidth()
Returns the width of the child used with this attachment.
|
boolean |
isRelativeOffset()
Returns
true if the offset being used in the attachment is
relative to the bounding box of the first child of the Composite Graphic. |
boolean |
isRelativeSize()
Returns
true if the attachment layout uses the relative size
properties. |
boolean |
isRotationCenterRelativeToBase()
Returns whether the attachment defining the rotation center is
relative to the base.
|
void |
setAnchor(IlvAttachmentLocation anchor)
Sets the location of this constraint.
|
void |
setChildSize(IlvChildSize childSize)
Defines
IlvChildSize for this object |
void |
setHeight(double h)
Sets the height of the child used with this attachment.
|
void |
setHotSpot(IlvAttachmentLocation hotSpot)
Sets the location of this constraint.
|
void |
setOffset(IlvPoint dp)
Sets the offset used by this attachment.
|
void |
setOffsetX(double x)
Sets the X coordinate of the offset being used in the attachment.
|
void |
setOffsetY(double y)
Sets the Y coordinate of the offset being used in the attachment.
|
void |
setRelativeHeight(double h)
Deprecated.
Beginning with Rogue Wave JViews 8.0, use the methods
setHeight(double) and setRelativeSize(boolean) instead. |
void |
setRelativeOffset(boolean relativeOffset)
Indicates whether this attachment uses relative offset or fixed
offsets.
|
void |
setRelativeSize(boolean isRelativeSize)
Indicates whether this attachment uses relative sizes or fixed
sizes.
|
void |
setRelativeWidth(double w)
Deprecated.
Beginning with Rogue Wave JViews 8.0, use the methods
setWidth(double) and setRelativeSize(boolean) instead. |
void |
setRotationAngle(double angle)
Defines a rotation on the child used with this attachment.
|
void |
setRotationCenter(IlvAttachmentLocation rotationCenter)
Defines the rotation center on the child used with this attachment.
|
void |
setRotationCenterRelativeToBase(boolean rotationCenterRelativeToBase)
Indicates whether the rotation center is relative to the bounding box of
the base or relative to the bounding box of the child corresponding to this
attachment constraint.
|
void |
setSize(IlvPoint size)
Sets the size of the child used with this attachment.
|
void |
setWidth(double w)
Sets the width of the child used with this attachment.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public IlvAttachmentConstraint()
IlvAttachmentConstraint
instance with the default
values.public IlvAttachmentConstraint(IlvAttachmentLocation anchor, double dx, double dy)
anchor
- The position in the attachable object where the attachment will be
done. For example, the top side of the object is attached to
another object top location.dx
- The horizontal offset.dy
- The vertical offset.IlvAttachmentLocation
public IlvAttachmentConstraint(IlvAttachmentLocation hotSpot, IlvAttachmentLocation anchor, double dx, double dy)
hotSpot
- The position in the attachable object where the attachment will
take place. For example, the top side of the attachable object
will be attached to the bottom side of another object.anchor
- The position in the reference object where the attachment will
take place.dx
- The horizontal offset.dy
- The vertical offset.IlvAttachmentLocation
public IlvAttachmentConstraint(IlvAttachmentLocation hotSpot, IlvAttachmentLocation anchor)
hotSpot
- The position in the attachable object where the attachment will
take place. For example, the top side of the attachable object
will be attached to the bottom side of another object.anchor
- The position in the reference object where the attachment will
take place.IlvAttachmentLocation
public IlvAttachmentConstraint(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvAttachmentLocation getHotSpot()
public void setHotSpot(IlvAttachmentLocation hotSpot)
public IlvAttachmentLocation getAnchor()
public void setAnchor(IlvAttachmentLocation anchor)
public IlvPoint getOffset()
public void setOffset(IlvPoint dp)
public double getOffsetX()
public void setOffsetX(double x)
public double getOffsetY()
public void setOffsetY(double y)
public boolean isRelativeOffset()
true
if the offset being used in the attachment is
relative to the bounding box of the first child of the Composite Graphic.public void setRelativeOffset(boolean relativeOffset)
relativeOffset
- When true
, the offset values are ratios of the
bounding box of the first child of the Composite Graphic.public IlvPoint getSize()
public void setSize(IlvPoint size)
size
- The size is either defined as a ratio of the bounding box of the
composite graphic or in pixel unit. By default, the units are ratiospublic double getWidth()
setSize(ilog.views.IlvPoint)
,
getSize()
public void setWidth(double w)
setSize(ilog.views.IlvPoint)
,
getSize()
public double getHeight()
setSize(ilog.views.IlvPoint)
,
getSize()
public void setHeight(double h)
setSize(ilog.views.IlvPoint)
,
getSize()
public boolean isRelativeSize()
true
if the attachment layout uses the relative size
properties. Returns false
otherwise.IlvAttachmentLayout
public void setRelativeSize(boolean isRelativeSize)
isRelativeSize
- When true
, the attachment layout uses the relative
size properties:t the size is defined as a ratio of the bounding
box of the composite graphic. For example, (0.5,0.25) means that
the child will have a width equal to 50% of the width of the base
(the first child of the composite graphic) and a height equal to
25% of the height of the base.setHeight(double)
,
getHeight()
,
setWidth(double)
,
getWidth()
,
setSize(ilog.views.IlvPoint)
,
getSize()
,
IlvAttachmentLayout
@Deprecated public double getRelativeWidth()
getWidth()
instead.setSize(ilog.views.IlvPoint)
,
getSize()
@Deprecated public void setRelativeWidth(double w)
setWidth(double)
and setRelativeSize(boolean)
instead.setSize(ilog.views.IlvPoint)
,
getSize()
@Deprecated public double getRelativeHeight()
getHeight()
instead.setSize(ilog.views.IlvPoint)
,
getSize()
@Deprecated public void setRelativeHeight(double h)
setHeight(double)
and setRelativeSize(boolean)
instead.setSize(ilog.views.IlvPoint)
,
getSize()
public void setRotationAngle(double angle)
angle
- The rotation angle in degrees.public double getRotationAngle()
public void setRotationCenter(IlvAttachmentLocation rotationCenter)
public IlvAttachmentLocation getRotationCenter()
public void setChildSize(IlvChildSize childSize)
IlvChildSize
for this objectpublic IlvChildSize getChildSize()
IlvChildSize
of this objectpublic boolean isRotationCenterRelativeToBase()
setRotationCenter(ilog.views.graphic.composite.layout.IlvAttachmentLocation)
,
getRotationCenter()
public void setRotationCenterRelativeToBase(boolean rotationCenterRelativeToBase)
rotationCenterRelativeToBase
- true
means that the rotation center is relative to
the bounding box of the basepublic Object clone()
public IlvPoint compute(IlvAttachable anchor, IlvRect bboxAnchor)
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during the write operation for
this object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.