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.
-
reset
public void reset()
Remove all the constraints
- Specified by:
reset
in interface IlvLayoutManager
-
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()
-
computeChildrenAttachmentCoordinates
protected void computeChildrenAttachmentCoordinates(IlvAttachable target)
Sets the attachment coordinates of the card with respect to
the attachment bounds of the specified target.
-
visible
public void visible(String name)
Flips to the card that was added to this layout with the specified name.
-
setVisible
public void setVisible(String name)
Sets the name of the visible card.
-
getVisible
public String getVisible()
Returns the name of the visible card.
-
visible
protected void visible(int newIndex)
Flips to the card that was added to this layout with the specified index.
- Parameters:
newIndex
- The index of the card to be made visible.
-
resizeFirstChildOnly
public boolean resizeFirstChildOnly()
Always returns false
- Specified by:
resizeFirstChildOnly
in interface IlvLayoutManager
-
clone
public Object clone()
Creates a copy of this object.
- Specified by:
clone
in interface IlvLayoutManager
- Overrides:
clone
in class Object
-
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.