THIS
- Self-referential generic THISITEM
- the item object type in the listingpublic interface FluentTree<THIS extends FluentTree<THIS,ITEM>,ITEM> extends FluentComposite<THIS>, FluentHasHierarchicalDataProvider<THIS,ITEM>
Tree
Tree
FluentHasComponents.FluentComponentAttachDetachNotifier<THIS extends FluentHasComponents<THIS>>
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
FluentComponent.FluentFocusable<C extends FluentComponent.FluentFocusable<C>>
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
Modifier and Type | Method and Description |
---|---|
default THIS |
withAutoRecalculateWidth(boolean autoRecalculateWidth)
Sets the automatic width recalculation on or off.
|
default THIS |
withCollapseListener(com.vaadin.event.CollapseEvent.CollapseListener<ITEM> listener)
Adds a CollapseListener to this Tree.
|
default THIS |
withContentMode(com.vaadin.shared.ui.ContentMode contentMode)
Sets the content mode of the item caption.
|
default THIS |
withDataProvider(com.vaadin.data.provider.DataProvider<ITEM,?> dataProvider)
Sets the data provider for this listing.
|
default THIS |
withExpandListener(com.vaadin.event.ExpandEvent.ExpandListener<ITEM> listener)
Adds an ExpandListener to this Tree.
|
default THIS |
withItemCaptionGenerator(com.vaadin.ui.ItemCaptionGenerator<ITEM> captionGenerator)
Sets the item caption generator that is used to produce the strings shown
as the text for each item.
|
default THIS |
withItemClickListener(com.vaadin.ui.Tree.ItemClickListener<ITEM> listener)
Adds an item click listener.
|
default THIS |
withItemCollapseAllowedProvider(com.vaadin.ui.ItemCollapseAllowedProvider<ITEM> provider)
Sets the item collapse allowed provider for this Tree.
|
default THIS |
withItemIconGenerator(com.vaadin.ui.IconGenerator<ITEM> iconGenerator)
Sets the item icon generator that is used to produce custom icons for
items.
|
default THIS |
withRowHeight(double rowHeight)
Sets the height of a row.
|
default THIS |
withSelectionListener(com.vaadin.event.selection.SelectionListener<ITEM> listener)
Adds a selection listener to the current selection model.
|
default THIS |
withSelectionMode(com.vaadin.ui.Grid.SelectionMode selectionMode)
Sets the tree's selection mode.
|
default THIS |
withStyleGenerator(com.vaadin.ui.StyleGenerator<ITEM> styleGenerator)
Sets the style generator that is used for generating class names for
items in this tree.
|
withCaption, withCaption, withCaptionAsHtml, withComponentError, withDescription, withDescription, withFullHeight, withFullSize, withFullWidth, withHeight, withHeight, withIcon, withId, withPrimaryStyleName, withSize, withStyleName, withStyleName, withUndefinedHeight, withUndefinedSize, withUndefinedWidth, withWidth, withWidth
withData, withLocale, withResponsive, withShortcutListener
withAttachListener, withDetachListener
withContextClickListener
addContextClickListener, removeContextClickListener
forEach, spliterator
withItems, withItems, withItems, withItems, withItems, withTreeData
getTreeData, setItems, setItems, setItems, setItems, setItems, setTreeData
withEnabled, withParent, withStyleName, withVisible
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, readDesign, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisible, writeDesign
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
default THIS withCollapseListener(com.vaadin.event.CollapseEvent.CollapseListener<ITEM> listener)
listener
- the listener to addCollapseEvent
,
Tree.addCollapseListener(CollapseEvent.CollapseListener)
default THIS withExpandListener(com.vaadin.event.ExpandEvent.ExpandListener<ITEM> listener)
listener
- the listener to addExpandEvent
,
Tree.addExpandListener(ExpandEvent.ExpandListener)
default THIS withItemClickListener(com.vaadin.ui.Tree.ItemClickListener<ITEM> listener)
Tree
is clicked.listener
- the item click listener, not nullTree.addItemClickListener(ItemClickListener)
default THIS withSelectionListener(com.vaadin.event.selection.SelectionListener<ITEM> listener) throws UnsupportedOperationException
NOTE: If selection mode is switched with
Tree.setSelectionMode(Grid.SelectionMode)
, then this listener is not
triggered anymore when selection changes!
listener
- the listener to addUnsupportedOperationException
- if selection has been disabled with
Grid.SelectionMode.NONE
Tree.addSelectionListener(SelectionListener)
default THIS withAutoRecalculateWidth(boolean autoRecalculateWidth)
autoRecalculateWidth
- true
to enable recalculation; false
to turn it
offTree.setAutoRecalculateWidth(boolean)
default THIS withContentMode(com.vaadin.shared.ui.ContentMode contentMode)
contentMode
- the content modeTree.setContentMode(ContentMode)
default THIS withDataProvider(com.vaadin.data.provider.DataProvider<ITEM,?> dataProvider)
FluentHasDataProvider
withDataProvider
in interface FluentHasDataProvider<THIS extends FluentTree<THIS,ITEM>,ITEM>
dataProvider
- the data provider, not nullHasDataProvider.setDataProvider(DataProvider)
default THIS withItemCaptionGenerator(com.vaadin.ui.ItemCaptionGenerator<ITEM> captionGenerator)
String.valueOf(Object)
is
used.captionGenerator
- the item caption provider to use, not null
Tree.setItemCaptionGenerator(ItemCaptionGenerator)
default THIS withItemCollapseAllowedProvider(com.vaadin.ui.ItemCollapseAllowedProvider<ITEM> provider)
true
for any item that the user can collapse.
Note: This callback will be accessed often when sending data to the client. The callback should not do any costly operations.
provider
- the item collapse allowed provider, not null
Tree.setItemCollapseAllowedProvider(ItemCollapseAllowedProvider)
default THIS withItemIconGenerator(com.vaadin.ui.IconGenerator<ITEM> iconGenerator)
null
for items with no icon.iconGenerator
- the item icon generator to set, not null
NullPointerException
- if itemIconGenerator
is null
IconGenerator
,
Tree.setItemIconGenerator(IconGenerator)
default THIS withRowHeight(double rowHeight)
rowHeight
- The height of a row in pixels or -1 for automatic calculationTree.setRowHeight(double)
default THIS withSelectionMode(com.vaadin.ui.Grid.SelectionMode selectionMode)
The built-in selection modes are:
Grid.SelectionMode.SINGLE
the default modelGrid.SelectionMode.MULTI
Grid.SelectionMode.NONE
preventing selectionselectionMode
- the selection mode to switch to, not null
Tree.setSelectionMode(Grid.SelectionMode)
,
Grid.SelectionMode
default THIS withStyleGenerator(com.vaadin.ui.StyleGenerator<ITEM> styleGenerator)
styleGenerator
- the item style generator to set, not null
NullPointerException
- if styleGenerator
is null
StyleGenerator
,
Tree.setStyleGenerator(StyleGenerator)
Copyright © 2017 Jean-Christophe Fortier. All rights reserved.