TreeGrid.@Deprecated public class TreeTable extends Table implements Container.Hierarchical
Table component so that it can also visualize a
hierarchy of its Items in a similar manner that Tree does. The tree
hierarchy is always displayed in the first actual column of the TreeTable.
The TreeTable supports the usual Table features like lazy loading, so
it should be no problem to display lots of items at once. Only required rows
and some cache rows are sent to the client.
TreeTable supports standard Container.Hierarchical container interfaces, but
also a more fine tuned version - Collapsible. A container
implementing the Collapsible interface stores the collapsed/expanded
state internally and can this way scale better on the server side than with
standard Hierarchical implementations. Developer must however note that
Collapsible containers can not be shared among several users as they
share UI state in the container.
Table.Align, Table.CacheUpdateException, Table.CellStyleGenerator, Table.ColumnCollapseEvent, Table.ColumnCollapseListener, Table.ColumnGenerator, Table.ColumnHeaderMode, Table.ColumnReorderEvent, Table.ColumnReorderListener, Table.ColumnResizeEvent, Table.ColumnResizeListener, Table.FooterClickEvent, Table.FooterClickListener, Table.GeneratedRow, Table.HeaderClickEvent, Table.HeaderClickListener, Table.RowGenerator, Table.RowHeaderMode, Table.TableContextClickEvent, Table.TableDragMode, Table.TableDropCriterion, Table.TableTransferableAbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemCaptionMode, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIsAbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEventContainer.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.ViewerHasChildMeasurementHint.ChildMeasurementHintHasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListenerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitField.ValueChangeEventBuffered.SourceExceptionProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alwaysRecalculateColumnWidths, CELL_FIRSTCOL, CELL_GENERATED_ROW, CELL_HEADER, CELL_ICON, CELL_ITEMID, CELL_KEY, COLUMN_HEADER_MODE_EXPLICIT, COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID, COLUMN_HEADER_MODE_HIDDEN, COLUMN_HEADER_MODE_ID, ROW_HEADER_MODE_EXPLICIT, ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID, ROW_HEADER_MODE_HIDDEN, ROW_HEADER_MODE_ICON_ONLY, ROW_HEADER_MODE_ID, ROW_HEADER_MODE_INDEX, ROW_HEADER_MODE_ITEM, ROW_HEADER_MODE_PROPERTYITEM_CAPTION_MODE_EXPLICIT, ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID, ITEM_CAPTION_MODE_ICON_ONLY, ITEM_CAPTION_MODE_ID, ITEM_CAPTION_MODE_INDEX, ITEM_CAPTION_MODE_ITEM, ITEM_CAPTION_MODE_PROPERTY, itemIdMapper, itemsDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
TreeTable()
Deprecated.
Creates an empty TreeTable with a default container.
|
TreeTable(String caption)
Deprecated.
Creates an empty TreeTable with a default container.
|
TreeTable(String caption,
Container dataSource)
Deprecated.
Creates a TreeTable instance with given captions and data source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCollapseListener(Tree.CollapseListener listener)
Deprecated.
Adds a collapse listener.
|
void |
addExpandListener(Tree.ExpandListener listener)
Deprecated.
Adds an expand listener.
|
void |
addListener(Tree.CollapseListener listener)
Deprecated.
As of 7.0, replaced by
#addCollapseListener(CollapseListener) |
void |
addListener(Tree.ExpandListener listener)
Deprecated.
As of 7.0, replaced by
#addExpandListener(ExpandListener) |
boolean |
areChildrenAllowed(Object itemId)
Deprecated.
Tests if the Item with given ID can have children.
|
void |
changeVariables(Object source,
Map<String,Object> variables)
Deprecated.
Invoked when the value of a variable has changed.
|
void |
containerItemSetChange(Container.ItemSetChangeEvent event)
Deprecated.
Container datasource item set change.
|
protected void |
fireCollapseEvent(Object itemId)
Deprecated.
Emits a collapse event.
|
protected void |
fireExpandEvent(Object itemId)
Deprecated.
Emits an expand event.
|
protected int |
getAddedRowCount()
Deprecated.
Subclass and override this to enable partial row additions, bypassing the
normal caching mechanism.
|
Collection<?> |
getChildren(Object itemId)
Deprecated.
Gets the IDs of all Items that are children of the specified Item.
|
Container.Hierarchical |
getContainerDataSource()
Deprecated.
Gets the viewing data-source container.
|
protected int |
getFirstAddedItemIndex()
Deprecated.
Subclass and override this to enable partial row additions, bypassing the
normal caching mechanism.
|
protected int |
getFirstUpdatedItemIndex()
Deprecated.
Subclass and override this to enable partial row updates, bypassing the
normal caching and lazy loading mechanism.
|
Object |
getHierarchyColumnId()
Deprecated.
|
protected Object |
getIdByIndex(int index)
Deprecated.
Returns the item ID for the item represented by the index given.
|
Collection<?> |
getItemIds()
Deprecated.
Gets the item Id collection from the container.
|
protected List<Object> |
getItemIds(int firstIndex,
int rows)
Deprecated.
|
Object |
getParent(Object itemId)
Deprecated.
Gets the ID of the parent Item of the specified Item.
|
protected TreeTableState |
getState()
Deprecated.
|
protected int |
getUpdatedRowCount()
Deprecated.
Subclass and override this to enable partial row updates, bypassing the
normal caching and lazy loading mechanism.
|
boolean |
hasChildren(Object itemId)
Deprecated.
Tests if the Item specified with
itemId has child Items
or if it is a leaf. |
protected int |
indexOfId(Object itemId)
Deprecated.
|
boolean |
isAnimationsEnabled()
Deprecated.
|
boolean |
isCollapsed(Object itemId)
Deprecated.
Checks if Item with given identifier is collapsed in the UI.
|
boolean |
isLastId(Object itemId)
Deprecated.
Tests if the Item corresponding to the given Item ID is the last Item in
the Container.
|
protected boolean |
isPartialRowUpdate()
Deprecated.
Subclass and override this to enable partial row updates and additions,
which bypass the normal caching mechanism.
|
boolean |
isRoot(Object itemId)
Deprecated.
Tests if the Item specified with
itemId is a root Item. |
Object |
lastItemId()
Deprecated.
Gets the ID of the last Item in the Container.
|
Object |
nextItemId(Object itemId)
Deprecated.
Gets the ID of the Item following the Item that corresponds to itemId.
|
void |
paintContent(PaintTarget target)
Deprecated.
Paints the content of this component.
|
protected void |
paintRowAttributes(PaintTarget target,
Object itemId)
Deprecated.
A method where extended Table implementations may add their custom
attributes for rows.
|
protected void |
paintRowIcon(PaintTarget target,
Object[][] cells,
int indexInRowbuffer)
Deprecated.
|
Object |
prevItemId(Object itemId)
Deprecated.
Gets the ID of the Item preceding the Item that corresponds to the
itemId.
|
protected void |
readBody(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
|
protected Object |
readItem(org.jsoup.nodes.Element tr,
Set<String> selected,
DesignContext context)
Deprecated.
Reads an Item from a design and inserts it into the data source.
|
void |
removeCollapseListener(Tree.CollapseListener listener)
Deprecated.
Removes a collapse listener.
|
void |
removeExpandListener(Tree.ExpandListener listener)
Deprecated.
Removes an expand listener.
|
void |
removeListener(Tree.CollapseListener listener)
Deprecated.
As of 7.0, replaced by
#removeCollapseListener(CollapseListener) |
void |
removeListener(Tree.ExpandListener listener)
Deprecated.
As of 7.0, replaced by
#removeExpandListener(ExpandListener) |
Collection<?> |
rootItemIds()
Deprecated.
Gets the IDs of all Items in the container that don't have a parent.
|
protected boolean |
rowHeadersAreEnabled()
Deprecated.
Checks whether row headers are visible.
|
void |
setAnimationsEnabled(boolean animationsEnabled)
Deprecated.
Animations can be enabled by passing true to this method.
|
boolean |
setChildrenAllowed(Object itemId,
boolean areChildrenAllowed)
Deprecated.
Sets the given Item's capability to have children.
|
void |
setCollapsed(Object itemId,
boolean collapsed)
Deprecated.
Sets the Item specified by given identifier as collapsed or expanded.
|
void |
setContainerDataSource(Container newDataSource)
Deprecated.
Sets the Container that serves as the data source of the viewer.
|
void |
setHierarchyColumn(Object hierarchyColumnId)
Deprecated.
Explicitly sets the column in which the TreeTable visualizes the
hierarchy.
|
boolean |
setParent(Object itemId,
Object newParentId)
Deprecated.
Sets the parent of an Item.
|
protected boolean |
shouldHideAddedRows()
Deprecated.
Subclass and override this to enable removing of rows, bypassing the
normal caching and lazy loading mechanism.
|
int |
size()
Deprecated.
Gets the number of items in the container.
|
protected org.jsoup.nodes.Element |
writeItem(org.jsoup.nodes.Element tbody,
Object itemId,
DesignContext context)
Deprecated.
Writes a data source Item to a design.
|
protected void |
writeItems(org.jsoup.nodes.Element tbody,
Collection<?> itemIds,
int depth,
DesignContext context)
Deprecated.
|
protected void |
writeItems(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
Writes the data source items to a design.
|
addActionHandler, addColumnCollapseListener, addColumnReorderListener, addColumnResizeListener, addContainerProperty, addContainerProperty, addFooterClickListener, addGeneratedColumn, addHeaderClickListener, addItem, addItemAfter, addItemAfter, addItemClickListener, addListener, addListener, addListener, addListener, addListener, attach, beforeClientResponse, bindPropertyToField, containerPropertySetChange, detach, disableContentRefreshing, enableContentRefreshing, firstItemId, formatPropertyValue, getCacheRate, getCellStyleGenerator, getChildMeasurementHint, getCollapseMenuContent, getColumnAlignment, getColumnAlignments, getColumnExpandRatio, getColumnFooter, getColumnGenerator, getColumnHeader, getColumnHeaderMode, getColumnHeaders, getColumnIcon, getColumnIcons, getColumnWidth, getComponentIterator, getConverter, getCurrentPageFirstItemId, getCurrentPageFirstItemIndex, getCustomAttributes, getDragMode, getDropHandler, getItemDescriptionGenerator, getMultiSelectMode, getPageLength, getPropertyValue, getRowGenerator, getRowHeaderMode, getSortableContainerPropertyIds, getSortContainerPropertyId, getState, getTableFieldFactory, getTransferable, getVisibleColumns, getVisibleItemIds, hasConverter, isColumnCollapsed, isColumnCollapsible, isColumnCollapsingAllowed, isColumnReorderingAllowed, isEditable, isFirstId, isFooterVisible, isRowCacheInvalidated, isSelectable, isSortAscending, isSortDisabled, isSortEnabled, iterator, markAsDirty, markAsDirtyRecursive, paintRowHeader, readDesign, readItems, refreshRenderedCells, refreshRowCache, registerComponent, removeActionHandler, removeAllActionHandlers, removeAllItems, removeColumnCollapseListener, removeColumnReorderListener, removeColumnResizeListener, removeContainerProperty, removeFooterClickListener, removeGeneratedColumn, removeHeaderClickListener, removeItem, removeItemClickListener, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, resetPageBuffer, setCacheRate, setCellStyleGenerator, setChildMeasurementHint, setCollapseMenuContent, setColumnAlignment, setColumnAlignments, setColumnCollapsed, setColumnCollapsible, setColumnCollapsingAllowed, setColumnExpandRatio, setColumnFooter, setColumnHeader, setColumnHeaderMode, setColumnHeaders, setColumnIcon, setColumnIcons, setColumnReorderingAllowed, setColumnWidth, setContainerDataSource, setConverter, setCurrentPageFirstItemId, setCurrentPageFirstItemIndex, setDragMode, setDropHandler, setEditable, setEnabled, setFooterVisible, setItemDescriptionGenerator, setMultiSelectMode, setNewItemsAllowed, setPageLength, setRowGenerator, setRowHeaderMode, setSelectable, setSortAscending, setSortContainerPropertyId, setSortDisabled, setSortEnabled, setTableFieldFactory, setVisible, setVisibleColumns, sort, sort, translateDropTargetDetails, unregisterComponent, valueChange, writeDesignaddItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, containsId, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getListeners, getNewItemHandler, getNullSelectionItemId, getType, getType, getValue, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, unselectaddListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, validate, validategetExplicitImmediateValue, isImmediate, setImmediateaddContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitremoveItemaddContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getType, removeAllItems, removeContainerPropertyaddListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleNameaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, removeAttachListener, removeDetachListener, removeExtension, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratorisEnabledaddShortcutListener, removeShortcutListenerpublic TreeTable()
public TreeTable(String caption)
caption - the caption for the TreeTableprotected void paintRowAttributes(PaintTarget target, Object itemId) throws PaintException
TablepaintRowAttributes in class TablePaintExceptionprotected void paintRowIcon(PaintTarget target, Object[][] cells, int indexInRowbuffer) throws PaintException
paintRowIcon in class TablePaintExceptionprotected boolean rowHeadersAreEnabled()
TablerowHeadersAreEnabled in class Tablefalse if row headers are hidden, true otherwisepublic void changeVariables(Object source, Map<String,Object> variables)
TablechangeVariables in interface VariableOwnerchangeVariables in class TableComboBox.changeVariables(java.lang.Object, java.util.Map)public void paintContent(PaintTarget target) throws PaintException
AbstractSelectpaintContent in interface LegacyComponentpaintContent in class Tabletarget - the Paint Event.PaintException - if the paint operation failed.protected boolean isPartialRowUpdate()
TableisPartialRowUpdate in class Tableprotected int getFirstAddedItemIndex()
TablegetFirstAddedItemIndex in class Tableprotected int getAddedRowCount()
TablegetAddedRowCount in class TableTable.getFirstAddedItemIndex(). For plain Table it is always
0.protected int getFirstUpdatedItemIndex()
TablegetFirstUpdatedItemIndex in class Tableprotected int getUpdatedRowCount()
TablegetUpdatedRowCount in class TableTable.getFirstUpdatedItemIndex(). For plain table it is always
0.protected boolean shouldHideAddedRows()
TableTable.getFirstAddedItemIndex() and Table.getAddedRowCount() should
be hidden instead of added.shouldHideAddedRows in class TableTable.getFirstAddedItemIndex()
and Table.getAddedRowCount()) should be added or hidden. For
plain Table it is always false.public int size()
AbstractSelectsize in interface Containersize in class AbstractSelectContainer.size()public Container.Hierarchical getContainerDataSource()
AbstractSelectgetContainerDataSource in interface Container.ViewergetContainerDataSource in class AbstractSelectContainer.Viewer#getContainerDataSource()public void setContainerDataSource(Container newDataSource)
TableTable.setContainerDataSource(Container, Collection)
instead, especially if the table is editable.
Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.
setContainerDataSource in interface Container.ViewersetContainerDataSource in class TablenewDataSource - the new data source.Container.Viewer#setContainerDataSource(Container)public void containerItemSetChange(Container.ItemSetChangeEvent event)
TablecontainerItemSetChange in interface Container.ItemSetChangeListenercontainerItemSetChange in class Tableevent - change event textContainer.ItemSetChangeListener#containerItemSetChange(Container.ItemSetChangeEvent)protected Object getIdByIndex(int index)
TableContainer.Indexed.
See Container.Indexed#getIdByIndex(int) for more information
about the exceptions that can be thrown.getIdByIndex in class Tableindex - the index for which the item ID should be fetchedpublic Object nextItemId(Object itemId)
TablenextItemId in interface Container.OrderednextItemId in class TableitemId - ID of a visible Item in the ContainernullContainer.Ordered#nextItemId(java.lang.Object)public Object lastItemId()
TablelastItemId in interface Container.OrderedlastItemId in class TableContainer.Ordered#lastItemId()public Object prevItemId(Object itemId)
TableprevItemId in interface Container.OrderedprevItemId in class TableitemId - ID of a visible Item in the ContainernullContainer.Ordered#prevItemId(java.lang.Object)public boolean isLastId(Object itemId)
TableisLastId in interface Container.OrderedisLastId in class Tabletrue if the Item is last visible item in the
Container, false if notContainer.Ordered#isLastId(java.lang.Object)public Collection<?> getItemIds()
AbstractSelectgetItemIds in interface ContainergetItemIds in class AbstractSelectpublic boolean areChildrenAllowed(Object itemId)
Container.HierarchicalareChildrenAllowed in interface Container.HierarchicalitemId - ID of the Item in the container whose child capability is
to be testedtrue if the specified Item exists in the
Container and it can have children, false if
it's not found from the container or it can't have children.public Collection<?> getChildren(Object itemId)
Container.HierarchicalgetChildren in interface Container.HierarchicalitemId - ID of the Item whose children the caller is interested incollection
containing the IDs of all other Items that are children in
the container hierarchy; null if item does not have
any children.public Object getParent(Object itemId)
Container.HierarchicalgetParent in interface Container.HierarchicalitemId - ID of the Item whose parent the caller wishes to find out.null if the
specified Item is a root element.public boolean hasChildren(Object itemId)
Container.Hierarchical
Tests if the Item specified with itemId has child Items
or if it is a leaf. The Container.Hierarchical.getChildren(Object itemId) method
always returns null for leaf Items.
Note that being a leaf does not imply whether or not an Item is allowed to have children.
hasChildren in interface Container.HierarchicalitemId - ID of the Item to be testedtrue if the specified Item has children,
false if not (is a leaf)public boolean isRoot(Object itemId)
Container.HierarchicalitemId is a root Item.
The hierarchical container can have more than one root and must have
at least one unless it is empty. The
Container.Hierarchical.getParent(Object itemId) method always returns
null for root Items.isRoot in interface Container.HierarchicalitemId - ID of the Item whose root status is to be testedtrue if the specified Item is a root,
false if notpublic Collection<?> rootItemIds()
Container.Hierarchicalroot Items. The returned
collection is unmodifiable.rootItemIds in interface Container.Hierarchicalcollection
containing IDs of all root elements of the containerpublic boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException
Container.Hierarchical
Sets the given Item's capability to have children. If the Item
identified with itemId already has children and
is false this method
fails and Container.Hierarchical.areChildrenAllowed(Object)false is returned.
The children must be first explicitly removed with
Container.Hierarchical.setParent(Object itemId, Object newParentId)or
Container.removeItem(Object itemId).
This operation is optional. If it is not implemented, the method
always returns false.
setChildrenAllowed in interface Container.HierarchicalitemId - ID of the Item in the container whose child capability is
to be setareChildrenAllowed - boolean value specifying if the Item can have children or
nottrue if the operation succeeded,
false if notUnsupportedOperationExceptionpublic boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException
Container.Hierarchical
Sets the parent of an Item. The new parent item must exist and be
able to have children. (
). It is
also possible to detach a node from the hierarchy (and thus make it
root) by setting the parent Container.Hierarchical.areChildrenAllowed(Object) == truenull.
This operation is optional.
setParent in interface Container.HierarchicalitemId - ID of the item to be set as the child of the Item
identified with newParentIdnewParentId - ID of the Item that's to be the new parent of the Item
identified with itemIdtrue if the operation succeeded,
false if notUnsupportedOperationExceptionpublic void setCollapsed(Object itemId, boolean collapsed)
itemId - the identifier of the Itemcollapsed - true if the Item should be collapsed, false if expandedpublic boolean isCollapsed(Object itemId)
itemId - the identifier of the checked ItemCollapsible.isCollapsed(Object)public void setHierarchyColumn(Object hierarchyColumnId)
hierarchyColumnId - public Object getHierarchyColumnId()
public void addExpandListener(Tree.ExpandListener listener)
listener - the Listener to be added.@Deprecated public void addListener(Tree.ExpandListener listener)
#addExpandListener(ExpandListener)public void removeExpandListener(Tree.ExpandListener listener)
listener - the Listener to be removed.@Deprecated public void removeListener(Tree.ExpandListener listener)
#removeExpandListener(ExpandListener)protected void fireExpandEvent(Object itemId)
itemId - the item id.public void addCollapseListener(Tree.CollapseListener listener)
listener - the Listener to be added.@Deprecated public void addListener(Tree.CollapseListener listener)
#addCollapseListener(CollapseListener)public void removeCollapseListener(Tree.CollapseListener listener)
listener - the Listener to be removed.@Deprecated public void removeListener(Tree.CollapseListener listener)
#removeCollapseListener(CollapseListener)protected void fireCollapseEvent(Object itemId)
itemId - the item id.public boolean isAnimationsEnabled()
public void setAnimationsEnabled(boolean animationsEnabled)
animationsEnabled - true or false whether to enable animations or not.protected List<Object> getItemIds(int firstIndex, int rows)
getItemIds in class Tableprotected void readBody(org.jsoup.nodes.Element design,
DesignContext context)
protected Object readItem(org.jsoup.nodes.Element tr, Set<String> selected, DesignContext context)
AbstractSelectreadItem in class Tabletr - a child element representing the itemselected - A set accumulating selected items. If the item that is read is
marked as selected, its item id should be added to this set.context - the DesignContext instance used in parsingprotected void writeItems(org.jsoup.nodes.Element design,
DesignContext context)
AbstractSelectwriteItems in class Tabledesign - the element into which to insert the itemscontext - the DesignContext instance used in writingprotected void writeItems(org.jsoup.nodes.Element tbody,
Collection<?> itemIds,
int depth,
DesignContext context)
protected org.jsoup.nodes.Element writeItem(org.jsoup.nodes.Element tbody,
Object itemId,
DesignContext context)
AbstractSelectprotected TreeTableState getState()
Copyright © 2019 Vaadin Ltd. All rights reserved.