public class IlvAttachmentLayout extends Object implements IlvLayoutManager
IlvAttachmentLayout
class is a flexible layout manager
that attaches graphic objects.
Each object managed by an IlvAttachmentLayout
is associated
with an instance of
IlvAttachmentConstraint
. The
constraints object specifies where a graphic objects should be located.
One particular object is identified by the constant REFERENCE
.
This object will not be moved the layout. Its attachment rectangle is used by
the other objects in their attachment locations.
IlvAttachmentConstraint
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
ANCHOR
The anchor layout constraint
|
Constructor and Description |
---|
IlvAttachmentLayout()
Creates an
IlvAttachmentLayout instance. |
IlvAttachmentLayout(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
void |
attach(IlvAttachable target)
Sets the constraints.
|
Object |
clone()
Creates a copy of this object.
|
IlvAttachable |
getAnchor()
Returns the anchor of this object.The anchor object is the
IlvAttachable instance used to attach the other elements. |
void |
layoutGroup(IlvAttachable parent)
Lays out the specified
IlvAttachable container. |
void |
removeConstraints(IlvAttachable element)
Removes the specified
IlvAttachable from the layout. |
void |
reset()
Removes all the constraints.
|
boolean |
resizeFirstChildOnly()
Returns always
true . |
void |
setAnchor(IlvAttachable anchor)
Sets the anchor.
|
void |
setConstraints(IlvAttachable element,
Object constraints)
Adds the specified
IlvAttachable to the layout, using the
specified constraint object. |
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public static final String ANCHOR
public IlvAttachmentLayout()
IlvAttachmentLayout
instance.public IlvAttachmentLayout(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public void setConstraints(IlvAttachable element, Object constraints)
IlvAttachable
to the layout, using the
specified constraint object.setConstraints
in interface IlvLayoutManager
element
- the IlvAttachable
to be addedconstraints
- This must be an IlvAttachmentConstraint
instance or
the string "Anchor".setAnchor(ilog.views.graphic.composite.layout.IlvAttachable)
,
IlvAttachmentConstraint
public void removeConstraints(IlvAttachable element)
IlvAttachable
from the layout.removeConstraints
in interface IlvLayoutManager
element
- the IlvAttachable>/code> object to be removed.
-
layoutGroup
public void layoutGroup(IlvAttachable parent)
Lays out the specified IlvAttachable
container.
- Specified by:
layoutGroup
in interface IlvLayoutManager
- Parameters:
parent
- the container to be laid out
-
attach
public void attach(IlvAttachable target)
Sets the constraints.
- Specified by:
attach
in interface IlvLayoutManager
- Parameters:
target
- the container to be laid out
- See Also:
IlvAttachable.getAttachables()
,
IlvAttachable.getConstraints()
-
setAnchor
public void setAnchor(IlvAttachable anchor)
Sets the anchor. The anchor object is the IlvAttachable
instance used to attach the other elements.
- Internal: do not use!
-
getAnchor
public IlvAttachable getAnchor()
Returns the anchor of this object.The anchor object is the
IlvAttachable
instance used to attach the other elements.
-
reset
public void reset()
Removes all the constraints.
- Specified by:
reset
in interface IlvLayoutManager
-
clone
public Object clone()
Creates a copy of this object.
- Specified by:
clone
in interface IlvLayoutManager
- Overrides:
clone
in class Object
-
resizeFirstChildOnly
public boolean resizeFirstChildOnly()
Returns always true
.
- Specified by:
resizeFirstChildOnly
in interface IlvLayoutManager
-
write
public void write(IlvOutputStream stream)
throws IOException
Writes the attributes of a persistent object.
- Specified by:
write
in interface IlvPersistentObject
- Parameters:
stream
- the output stream
- Throws:
IOException
- thrown when an exception occurs during the write operation for
this object.
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.