ilog.cpl.util
Interface IlpExpansionStrategy


public interface IlpExpansionStrategy

An instance of this interface can be installed on each representation object that is capable of having child objects. It may load or unload the child objects asynchronously, using an adapter to the back end.

Since:
JTGO 3.0
See Also:
IlpDefaultTreeNode, IlpDefaultNetworkNode, IlpDefaultNetworkLink, IlpDefaultEquipmentNode, IlpDefaultEquipmentLink, IlpExpansionStrategyFactory

Method Summary
 boolean areChildrenLoaded(IlpRepresentationObject representation)
          Indicates whether the child objects are already loaded with this expansion strategy.
 boolean isLoadingOnDemand()
          Indicates whether this strategy enables loading on demand.
 void loadChildren(IlpRepresentationObject representation)
          Loads the children objects of the given representation object so that they are added to the model and are visible to the attached views.
 boolean mayHaveChild(IlpRepresentationObject representation)
          Indicates whether the parameter may have children.
 void releaseChildren(IlpRepresentationObject representation)
          Signals that the model and the attached views do not need the child objects of the given object anymore.
 

Method Detail

loadChildren

void loadChildren(IlpRepresentationObject representation)
Loads the children objects of the given representation object so that they are added to the model and are visible to the attached views.

This method should load all child objects that are currently available in the back-end. When loading child objects asynchronously, they should all be loaded at once.

This method may be called more than once to a certain representation object.

Parameters:
representation - The representation object with children that are being queried.

releaseChildren

void releaseChildren(IlpRepresentationObject representation)
Signals that the model and the attached views do not need the child objects of the given object anymore. The child objects can be removed (but need not be) from working memory.

This method may be called more than once to a certain representation object.

Parameters:
representation - The representation object with children that are being released.

areChildrenLoaded

boolean areChildrenLoaded(IlpRepresentationObject representation)
Indicates whether the child objects are already loaded with this expansion strategy. This method should return true if the child objects have been queried at least once. This method is used to:

Parameters:
representation - The representation object.
Since:
JTGO 4.0
See Also:
loadChildren(ilog.cpl.model.IlpRepresentationObject)

isLoadingOnDemand

boolean isLoadingOnDemand()
Indicates whether this strategy enables loading on demand.


mayHaveChild

boolean mayHaveChild(IlpRepresentationObject representation)
Indicates whether the parameter may have children. Expansion strategies may implement this method to prevent that a container object without children appears as expandable. Most implementations will just return true.

Parameters:
representation - Representation object


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.