public class IlvCenteredLayout extends Object implements IlvLayoutManager
IlvAttachable
object, the outer object,
inside another one, the inner object.
The size of the outer object is determined
by the inner object plus an insets.
The outer IlvAttachable
instance must the first child and
the inner IlvAttachable
instance must the second child of the containerIlvAttachable
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
INNER
The inner layout constraint.
|
static String |
OUTER
The outer layout constraint.
|
Constructor and Description |
---|
IlvCenteredLayout()
Creates a new layout.
|
IlvCenteredLayout(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
IlvCenteredLayout(Insets insets)
Creates a new layout.
|
Modifier and Type | Method and Description |
---|---|
void |
attach(IlvAttachable target)
Sets the constraints defined by the supplied
IlvAttachable |
Object |
clone()
Creates a copy of this object.
|
Insets |
getInsets()
Returns the margin.
|
void |
layoutGroup(IlvAttachable target)
Lays out the specified
IlvAttachable container. |
void |
removeConstraints(IlvAttachable element)
Removes the specified
IlvAttachable from the layout. |
void |
reset()
Remove all the constraints
|
boolean |
resizeFirstChildOnly()
Returns always
true |
void |
setConstraints(IlvAttachable element,
Object constraints)
Adds the specified
IlvAttachable to the layout, using the specified
constraint object. |
void |
setInsets(Insets insets)
Sets the margin.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public static final String INNER
public static final String OUTER
public IlvCenteredLayout()
public IlvCenteredLayout(IlvInputStream stream) throws IlvReadFileException
IlvInputStream
.stream
- The input stream.IlvReadFileException
- if the format is not correct.public IlvCenteredLayout(Insets insets)
insets
- The insets used to compute the size of the outer object.public void setInsets(Insets insets)
public Insets getInsets()
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
- where/how the component is added to the layout.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 target)
Lays out the specified IlvAttachable
container.
- Specified by:
layoutGroup
in interface IlvLayoutManager
- Parameters:
target
- the container to be laid out
-
attach
public void attach(IlvAttachable target)
Sets the constraints defined by the supplied IlvAttachable
- Specified by:
attach
in interface IlvLayoutManager
- Parameters:
target
- the container to be laid out
- See Also:
IlvAttachable.getAttachables()
,
IlvAttachable.getConstraints()
-
reset
public void reset()
Remove 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.