|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public LayoutModel
This tree model exposes containers and controls. The following applies to the topology:
LayoutContainer
,
LayoutControl
Method Summary | |
---|---|
LayoutControl |
create(Object context)
Creates a layout control. |
Deferred |
getRoot()
Returns the root node of the layout model; never null . |
Boolean |
hasChildren(LayoutNode node)
Returns whether or not the given node has children. |
DeferredIterator |
getChildren(LayoutNode node)
Returns an iterator of the child nodes for the given node. |
Deferred |
getParent(LayoutNode node)
Returns the parent of a given node. |
Boolean |
isModifiable(LayoutNode node)
Indicates if the specified resource is modifiable. |
Boolean |
isDeletable(LayoutNode node)
Indicates if the specified layout node is deletable. |
Deferred |
find(Identifiable id)
Returns an element of a model (searches throughout the whole tree) with the given ID. |
Methods inherited from interface com.ibm.mashups.enabler.TreeModelController |
---|
create, confirmCreate, insert, confirmInsert, remove, confirmRemove |
Methods inherited from interface com.ibm.mashups.enabler.TreeModel |
---|
getRoot, hasChildren, getChildren, getParent |
Methods inherited from interface com.ibm.mashups.enabler.model.Model |
---|
setStrategy, getStrategies, getStrategy, addStrategy, removeStrategy |
Methods inherited from interface com.ibm.mashups.enabler.Locator |
---|
find |
Methods inherited from interface com.ibm.mashups.enabler.wire.WireModelProvider |
---|
getWireModel |
Method Detail |
---|
LayoutControl create(Object context)
insert
method.var context =
{
};
context["type"] = com.ibm.mashups.enabler.layout.Constants.LAYOUT_CONTROL;
context[com.ibm.mashups.enabler.layout.Constants.WIDGET_DEFINITION_URL] = "http://my/widget/definition.xml";
layoutModel.create(context);
context
-
context with predefined information used for the creation of the layout control. Must not be null
. You must specify the following:type
- type of layout entity to create as defined in Constants
; must be one of the following:Constants
WIDGET_DEFINITION_ID
- Identifiable
of widget definition to instantiate for this control, orWIDGET_DEFINITION_URL
- URL (string) pointing to a widget definition to instantiate for this control; note that the widget definition will be managed by the backend after this layout control is inserted into a layout container and the layout model is committed.
null
if it can not be created.WidgetDefinition
,
Constants
Deferred getRoot()
null
.
LayoutNode
of the layout modelBoolean hasChildren(LayoutNode node)
node
-
the layout node for which to check if it has children; must not be null
.
DeferredIterator getChildren(LayoutNode node)
node
-
the node object for which to return its children; must not be null
.
null
Deferred getParent(LayoutNode node)
node
-
node object for which to return its parent node; must not be null
LayoutNode
of the given node, or null
, if the node has no parentBoolean isModifiable(LayoutNode node)
node
-
the layout node to check; must not be null
true
if the node is modifiable, false
otherwiseBoolean isDeletable(LayoutNode node)
node
-
The layout node to check; must not be null
true
if the node is deletable, false
otherwiseDeferred find(Identifiable id)
LayoutControl
or aLayoutContainer
id
-
identifiable or string id of the object to find; must not be null
.
null
if the element cannot be found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |