|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.markup.html.WebMarkupContainer
org.apache.wicket.markup.html.panel.Panel
com.inmethod.grid.common.AbstractGrid<T,I>
com.inmethod.grid.treegrid.TreeGrid<T,I>
T - tree model object typeI - node model object typepublic class TreeGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>
Advanced grid with a tree. Supports resizable and reorderable columns.
| Field Summary |
|---|
| Fields inherited from class com.inmethod.grid.common.AbstractGrid |
|---|
INTERNAL_TOOLBAR_ITEM_ID, THEME_VISTA |
| Fields inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
PANEL |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
| Constructor Summary | |
|---|---|
TreeGrid(String id,
IModel<T> model,
List<IGridColumn<T,I>> columns)
Creates a new TreeGrid instance. |
|
TreeGrid(String id,
T model,
List<IGridColumn<T,I>> columns)
Creates a new TreeGrid instance. |
|
| Method Summary | |
|---|---|
WebMarkupContainer |
findParentRow(Component child)
Returns the row in DataTable that contains the child component |
protected WebMarkupContainer |
findRowComponent(IModel<I> rowModel)
Returns the row component for specified item. |
Collection<IModel<I>> |
getSelectedItems()
Returns the collection of models of all currently selected items. |
AbstractTree |
getTree()
Returns the inner tree of the TreeGrid. |
ITreeState |
getTreeState()
Returns the tree state |
boolean |
isAllowSelectMultiple()
Returns whether user will be able to select more than one item at a time. |
boolean |
isAutoSelectChildren()
Returns whether children of selected nodes should be automatically treated as selected node. |
boolean |
isItemSelected(IModel<I> itemModel)
Queries whether the item specified by itemModel is currently selected. |
void |
markItemDirty(IModel<I> model)
Marks the item from the given model as dirty. |
protected void |
onJunctionLinkClicked(AjaxRequestTarget target,
Object node)
Callback function called after user clicked on an junction link. |
void |
resetSelectedItems()
Deselects all items. |
void |
selectAllVisibleItems()
Marks all currently displayed items as selected. |
void |
selectItem(IModel<I> itemModel,
boolean selected)
Alters the selection state of item specified by the item model. |
void |
setAllowSelectMultiple(boolean value)
Sets whether user will be able to select more than one item. |
void |
setAutoSelectChildren(boolean autoSelectChildren)
Sets whether children of selected node should automatically be treated as selected nodes (default true). |
void |
update()
During Ajax request updates the changed parts of tree. |
| Methods inherited from class org.apache.wicket.markup.html.panel.Panel |
|---|
newMarkupSourcingStrategy |
| Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer |
|---|
getWebPage, getWebRequest |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, hasAssociatedMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onMarkupAttached, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TreeGrid(String id,
IModel<T> model,
List<IGridColumn<T,I>> columns)
TreeGrid instance.
id - component idmodel - model used to access the TreeModelcolumns - list of IGridColumns.
public TreeGrid(String id,
T model,
List<IGridColumn<T,I>> columns)
TreeGrid instance.
id - component idmodel - tree modelcolumns - list of IGridColumns.| Method Detail |
|---|
public AbstractTree getTree()
TreeGrid.
public ITreeState getTreeState()
public final void update()
update in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>
protected void onJunctionLinkClicked(AjaxRequestTarget target,
Object node)
target - Request target - may be null on non-ajax callnode - Node for which this callback is relevantpublic Collection<IModel<I>> getSelectedItems()
getSelectedItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>public boolean isAllowSelectMultiple()
isAllowSelectMultiple in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>true if multiple items can be selected at a time, false
otherwise.public void setAllowSelectMultiple(boolean value)
setAllowSelectMultiple in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>value - true if the user will be able to select more than one item at a time,
false otherwise (single selection mode).public boolean isItemSelected(IModel<I> itemModel)
isItemSelected in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>itemModel - item model
true if the item is selected, false otherwisepublic void resetSelectedItems()
resetSelectedItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>public void selectAllVisibleItems()
DataGrid this selects all items
on current page, for TreeGrid this selects all currently visible nodes.
selectAllVisibleItems in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>protected WebMarkupContainer findRowComponent(IModel<I> rowModel)
AbstractGrid
findRowComponent in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>public void markItemDirty(IModel<I> model)
AbstractGridAbstractGrid.update() method is called.
markItemDirty in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>model - model used to access the item
public void selectItem(IModel<I> itemModel,
boolean selected)
selectItem in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>itemModel - item modelselected - true if the item should be selected, false otherwise.public WebMarkupContainer findParentRow(Component child)
AbstractGrid
findParentRow in class AbstractGrid<T extends TreeModel & Serializable,I extends TreeNode & Serializable>public void setAutoSelectChildren(boolean autoSelectChildren)
true). Such children can not be deselected individually. Also
ITreeState.isNodeSelected(Object) returns true if any of node parent is
selected. On the contrary, ITreeState.getSelectedNodes() only returns "top level"
selected nodes.
autoSelectChildren - public boolean isAutoSelectChildren()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||