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.
public void layoutGroup(IlvAttachable target)
IlvAttachable
container.layoutGroup
in interface IlvLayoutManager
target
- the container to be laid outpublic void attach(IlvAttachable target)
IlvAttachable
attach
in interface IlvLayoutManager
target
- the container to be laid outIlvAttachable.getAttachables()
,
IlvAttachable.getConstraints()
public void reset()
reset
in interface IlvLayoutManager
public Object clone()
clone
in interface IlvLayoutManager
clone
in class Object
public boolean resizeFirstChildOnly()
true
resizeFirstChildOnly
in interface IlvLayoutManager
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 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.