ilog.views.graphic.composite.layout
Class IlvCardLayout

java.lang.Object
  extended by ilog.views.graphic.composite.layout.IlvCardLayout
All Implemented Interfaces:
IlvLayoutManager, IlvPersistentObject, Cloneable

public class IlvCardLayout
extends Object
implements IlvLayoutManager

This class treats each 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.

Since:
JViews 6.0
See Also:
CardLayout

Constructor Summary
IlvCardLayout()
          Creates a new instance of IlvCardLayout.
IlvCardLayout(IlvInputStream stream)
          Reads the object from an IlvInputStream.
 
Method Summary
 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 IlvAttachablecontainer.
 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.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvCardLayout

public IlvCardLayout()
Creates a new instance of IlvCardLayout.


IlvCardLayout

public IlvCardLayout(IlvInputStream stream)
              throws IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - The input stream.
Throws:
IlvReadFileException - if the format is not correct.
Method Detail

setConstraints

public void setConstraints(IlvAttachable element,
                           Object constraints)
Adds the specified IlvAttachable to the layout, using the specified constraint object.

Specified by:
setConstraints in interface IlvLayoutManager
Parameters:
element - the IlvAttachable to be added
constraints - where/how the component is added to the layout.

removeConstraints

public void removeConstraints(IlvAttachable element)
Removes the specified IlvAttachable from the layout.

Specified by:
removeConstraints in interface IlvLayoutManager
Parameters:
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 IlvAttachablecontainer.

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 -

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 © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.