public class IlvCardLayout extends Object implements IlvLayoutManager
IlvAttachable
object within a
container as a card. Only one card is visible at a time, and the
container acts as a stack of cards.
The first component added to a CardLayout object is the visible component
when the container is first displayed.CardLayout
,
Serialized FormConstructor and Description |
---|
IlvCardLayout()
Creates a new instance of
IlvCardLayout . |
IlvCardLayout(IlvInputStream stream)
Reads the object from an
IlvInputStream . |
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.
|
protected void |
computeChildrenAttachmentCoordinates(IlvAttachable target)
Sets the attachment coordinates of the card with respect to
the attachment bounds of the specified target.
|
String |
getVisible()
Returns the name of the visible card.
|
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()
Always returns
false |
void |
setConstraints(IlvAttachable element,
Object constraints)
Adds the specified
IlvAttachable to the layout, using the specified
constraint object. |
void |
setVisible(String name)
Sets the name of the visible card.
|
protected void |
visible(int newIndex)
Flips to the card that was added to this layout with the specified index.
|
void |
visible(String name)
Flips to the card that was added to this layout with the specified name.
|
void |
write(IlvOutputStream stream)
Writes the attributes of a persistent object.
|
public IlvCardLayout()
IlvCardLayout
.public IlvCardLayout(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
- 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 reset()
reset
in interface IlvLayoutManager
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()
protected void computeChildrenAttachmentCoordinates(IlvAttachable target)
public void visible(String name)
public void setVisible(String name)
public String getVisible()
protected void visible(int newIndex)
newIndex
- The index of the card to be made visible.public boolean resizeFirstChildOnly()
false
resizeFirstChildOnly
in interface IlvLayoutManager
public Object clone()
clone
in interface IlvLayoutManager
clone
in class Object
public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- The output stream.IOException
- Thrown when an exception
occurs during the write operation for this object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.