public class IlpDefaultTreeExpansionStrategyFactory extends Object implements IlpExpansionStrategyFactory
This factory returns specific expansion strategies according to the
value of the CSS property expansion
in the different business
objects. Expansion strategies are shared among all objects with a certain
expansion type.
By default, the following expansion types are supported:
IN_PLACE
: Loads the children objects on demand, as the
user expands the parent tree node. In this expansion strategy, tree
nodes are considered as parent nodes, only when they have containment
relationships. These relationships are defined in the attached data
source through its IlpContainer
interface.
The children objects should already be loaded in the data source, and
should be visible according to the data source filter, if there is one
defined.
IN_PLACE_MINIMAL_LOADING
: Loads the children objects on
demand, as the user expands the parent tree node. All tree nodes with
this expansion strategy are considered as possible parent nodes, and
are represented with an expansion icon. If the tree node does
not contain children objects, the expansion icon will disappear when
the expansion is executed for the first time.
NO_EXPANSION
: Expansion is not supported by the tree node.
IlpContainer
,
IlpAbstractHierarchyAdapter.setExpansionStrategyFactory(ilog.cpl.util.IlpExpansionStrategyFactory)
Modifier and Type | Field and Description |
---|---|
protected IlpExpansionStrategy |
inPlaceExpansionStrategy
Expansion strategy for IN_PLACE expansion
|
protected IlpExpansionStrategy |
inPlaceMinimalLoadingExpansionStrategy
Expansion strategy for IN_PLACE_MINIMAL_LOADING expansion
|
DEFAULT
Constructor and Description |
---|
IlpDefaultTreeExpansionStrategyFactory(IlpAbstractTreeAdapter adapter)
Creates an expansion strategy factory for the given adapter.
|
Modifier and Type | Method and Description |
---|---|
IlpExpansionStrategy |
create(IlpObject ilpObject)
Creates an expansion strategy that will be used by the representation
object that corresponds to the given business object.
|
IlpAbstractTreeAdapter |
getAdapter()
Returns the adapter that is associated with this expansion strategy
factory.
|
protected IlpExpansionStrategy inPlaceMinimalLoadingExpansionStrategy
protected IlpExpansionStrategy inPlaceExpansionStrategy
public IlpDefaultTreeExpansionStrategyFactory(IlpAbstractTreeAdapter adapter)
adapter
- Tree adapter.public IlpAbstractTreeAdapter getAdapter()
public IlpExpansionStrategy create(IlpObject ilpObject)
An expansion strategy defines how the representation object behaves in the component when it is collapsed or expanded.
This method returns a predefined expansion strategy according to the object expansion type:
IN_PLACE
: Loads the children objects on demand, as the
user expands the parent tree node. In this expansion strategy, tree
nodes are considered as parent nodes, only when they have containment
relationships. These relationships are defined in the attached
data source, through its IlpContainer
interface.
The children objects should already be loaded in the data source, and
should be visible according to the data source filter, if there is
one defined.
IN_PLACE_MINIMAL_LOADING
: Loads the children objects on
demand, as the user expands the parent tree node. All tree nodes with
this expansion strategy are considered as possible parent nodes, and
are represented with an expansion icon. If the tree node does not
contain children objects, the expansion icon will disappear when the
expansion is executed for the first time.
NO_EXPANSION
: Expansion is not supported by the tree
node.
The business object expansion type is customized in the tree adapter using cascading style sheets (CSS). The following example illustrates this customization:
object { expansion: NO_EXPANSION; }Expansion strategies are shared among business objects that share the same expansion type.
create
in interface IlpExpansionStrategyFactory
ilpObject
- Business objectIlpAbstractTreeAdapter.getExpansionType(ilog.cpl.model.IlpObject)
,
IlpAbstractTreeAdapter.setStyleSheets(java.lang.String[])
,
IlpExpansionType
,
IlpExpansionStrategy
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.