ilog.views.graphic.composite.layout
Class IlvAttachmentLayout

java.lang.Object
  extended by ilog.views.graphic.composite.layout.IlvAttachmentLayout
All Implemented Interfaces:
IlvLayoutManager, IlvPersistentObject, Cloneable
Direct Known Subclasses:
IlvLinkAttachmentLayout

public class IlvAttachmentLayout
extends Object
implements IlvLayoutManager

The IlvAttachmentLayout class is a flexible layout manager that attaches graphic objects. Each object managed by an IlvAttachmentLayout is associated with an instance of IlvAttachmentConstraint. The constraints object specifies where a graphic objects should be located. One particular object is identified by the constant REFERENCE. This object will not be moved the layout. Its attachment rectangle is used by the other objects in their attachment locations.

Since:
JViews 6.0
See Also:
IlvAttachmentConstraint

Field Summary
static String ANCHOR
          The anchor layout constraint
 
Constructor Summary
IlvAttachmentLayout()
          Creates an IlvAttachmentLayout instance.
IlvAttachmentLayout(IlvInputStream stream)
          Reads the object from an IlvInputStream.
 
Method Summary
 void attach(IlvAttachable target)
          Sets the constraints.
 Object clone()
          Creates a copy of this object.
 IlvAttachable getAnchor()
          Returns the anchor of this object.The anchor object is the IlvAttachable instance used to attach the other elements.
 void layoutGroup(IlvAttachable parent)
          Lays out the specified IlvAttachablecontainer.
 void removeConstraints(IlvAttachable element)
          Removes the specified IlvAttachable from the layout.
 void reset()
          Removes all the constraints.
 boolean resizeFirstChildOnly()
          Returns always true.
 void setAnchor(IlvAttachable anchor)
          Sets the anchor.
 void setConstraints(IlvAttachable element, Object constraints)
          Adds the specified IlvAttachable to the layout, using the specified constraint object.
 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
 

Field Detail

ANCHOR

public static final String ANCHOR
The anchor layout constraint

See Also:
Constant Field Values
Constructor Detail

IlvAttachmentLayout

public IlvAttachmentLayout()
Creates an IlvAttachmentLayout instance.


IlvAttachmentLayout

public IlvAttachmentLayout(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 - This must be an IlvAttachmentConstraint instance or the string "Anchor".
See Also:
setAnchor(ilog.views.graphic.composite.layout.IlvAttachable), IlvAttachmentConstraint
Internal method or field: do not use!

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.

layoutGroup

public void layoutGroup(IlvAttachable parent)
Lays out the specified IlvAttachablecontainer.

Specified by:
layoutGroup in interface IlvLayoutManager
Parameters:
parent - the container to be laid out

attach

public void attach(IlvAttachable target)
Sets the constraints.

Specified by:
attach in interface IlvLayoutManager
Parameters:
target - the container to be laid out
See Also:
IlvAttachable.getAttachables(), IlvAttachable.getConstraints()

setAnchor

public void setAnchor(IlvAttachable anchor)
Sets the anchor. The anchor object is the IlvAttachable instance used to attach the other elements.

Internal method or field: do not use!

getAnchor

public IlvAttachable getAnchor()
Returns the anchor of this object.The anchor object is the IlvAttachable instance used to attach the other elements.


reset

public void reset()
Removes 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 © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.