Package com.vaadin.v7.ui
Class Tree
-
- All Implemented Interfaces:
Action.Container,Action.ShortcutNotifier,ConnectorEventListener,ContextClickEvent.ContextClickNotifier,DragSource,DropTarget,MethodEventSource,SerializableEventListener,ClientConnector,Sizeable,VariableOwner,com.vaadin.shared.Connector,Component,Component.Focusable,LegacyComponent,Buffered,BufferedValidatable,Container,Container.Hierarchical,Container.ItemSetChangeListener,Container.ItemSetChangeNotifier,Container.PropertySetChangeListener,Container.PropertySetChangeNotifier,Container.Viewer,Property<Object>,Property.Editor,Property.ReadOnlyStatusChangeListener,Property.ReadOnlyStatusChangeNotifier,Property.ValueChangeListener,Property.ValueChangeNotifier,Property.Viewer,Validatable,ItemClickEvent.ItemClickNotifier,Field<Object>,Serializable,EventListener
@Deprecated public class Tree extends AbstractSelect implements Container.Hierarchical, Action.Container, ItemClickEvent.ItemClickNotifier, DragSource, DropTarget
Deprecated.Seecom.vaadin.ui.Tree.Tree component. A Tree can be used to select an item (or multiple items) from a hierarchical set of items.- Since:
- 3.0
- Author:
- Vaadin Ltd.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTree.CollapseEventDeprecated.static interfaceTree.CollapseListenerDeprecated.static classTree.ExpandEventDeprecated.static interfaceTree.ExpandListenerDeprecated.static interfaceTree.ItemStyleGeneratorDeprecated.classTree.TargetInSubtreeDeprecated.static classTree.TargetItemAllowsChildrenDeprecated.static classTree.TreeContextClickEventDeprecated.static classTree.TreeDragModeDeprecated.static classTree.TreeDropCriterionDeprecated.classTree.TreeTargetDetailsDeprecated.protected classTree.TreeTransferableDeprecated.-
Nested classes/interfaces inherited from class com.vaadin.v7.ui.AbstractSelect
AbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemCaptionMode, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIs
-
Nested classes/interfaces inherited from class com.vaadin.v7.ui.AbstractField
AbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Buffered
Buffered.SourceException
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Container
Container.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.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.v7.ui.Field
Field.ValueChangeEvent
-
Nested classes/interfaces inherited from interface com.vaadin.v7.data.Property
Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer
-
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
Sizeable.Unit
-
-
Field Summary
-
Fields inherited from class com.vaadin.v7.ui.AbstractSelect
ITEM_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, items
-
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
-
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddActionHandler(Action.Handler actionHandler)Deprecated.Adds an action handler.voidaddCollapseListener(Tree.CollapseListener listener)Deprecated.Adds the collapse listener.voidaddExpandListener(Tree.ExpandListener listener)Deprecated.Adds the expand listener.voidaddItemClickListener(ItemClickEvent.ItemClickListener listener)Deprecated.Register a listener to handleItemClickEvents.voidaddListener(ItemClickEvent.ItemClickListener listener)Deprecated.As of 7.0, replaced byaddItemClickListener(ItemClickListener)voidaddListener(Tree.CollapseListener listener)Deprecated.As of 7.0, replaced byaddCollapseListener(CollapseListener)voidaddListener(Tree.ExpandListener listener)Deprecated.As of 7.0, replaced byaddExpandListener(ExpandListener)booleanareChildrenAllowed(Object itemId)Deprecated.Tests if the Item with given ID can have any children.voidchangeVariables(Object source, Map<String,Object> variables)Deprecated.booleancollapseItem(Object itemId)Deprecated.Collapses an item.booleancollapseItemsRecursively(Object startItemId)Deprecated.Collapses the items recursively.voidcontainerItemSetChange(Container.ItemSetChangeEvent event)Deprecated.Lets the listener know a Containers Item set has changed.booleanexpandItem(Object itemId)Deprecated.Expands an item.booleanexpandItemsRecursively(Object startItemId)Deprecated.Expands the items recursively Expands all the children recursively starting from an item.protected voidfireCollapseEvent(Object itemId)Deprecated.Emits collapse event.protected voidfireExpandEvent(Object itemId)Deprecated.Emits the expand event.Collection<?>getChildren(Object itemId)Deprecated.Gets the IDs of all Items that are children of the specified Item.Tree.TreeDragModegetDragMode()Deprecated.DropHandlergetDropHandler()Deprecated.AbstractSelect.ItemDescriptionGeneratorgetItemDescriptionGenerator()Deprecated.Get the item description generator which generates tooltips for tree items.StringgetItemIconAlternateText(Object itemId)Deprecated.Return the alternate text of an icon in a tree item.Tree.ItemStyleGeneratorgetItemStyleGenerator()Deprecated.com.vaadin.shared.ui.MultiSelectModegetMultiselectMode()Deprecated.Returns the mode the multiselect is in.ObjectgetParent(Object itemId)Deprecated.Gets the ID of the parent Item of the specified Item.protected TreeStategetState()Deprecated.TransferablegetTransferable(Map<String,Object> payload)Deprecated.Collection<?>getVisibleItemIds()Deprecated.Gets the visible item ids.booleanhasChildren(Object itemId)Deprecated.Tests if the Item specified withitemIdhas child Items.booleanisExpanded(Object itemId)Deprecated.Check is an item is expanded.booleanisHtmlContentAllowed()Deprecated.Checks whether captions are interpreted as html or plain text.booleanisRoot(Object itemId)Deprecated.Tests if the Item specified withitemIdis a root Item.booleanisSelectable()Deprecated.Returns the current selectable state.voidmarkAsDirty()Deprecated.voidpaintContent(PaintTarget target)Deprecated.Paints any needed component-specific things to the given UIDL stream.protected StringreadItem(org.jsoup.nodes.Element node, Set<String> selected, DesignContext context)Deprecated.Reads an Item from a design and inserts it into the data source.voidremoveActionHandler(Action.Handler actionHandler)Deprecated.Removes an action handler.voidremoveAllActionHandlers()Deprecated.Removes all action handlers.voidremoveCollapseListener(Tree.CollapseListener listener)Deprecated.Removes the collapse listener.voidremoveExpandListener(Tree.ExpandListener listener)Deprecated.Removes the expand listener.booleanremoveItem(Object itemId)Deprecated.Removes the Item identified byItemIdfrom the Container.voidremoveItemClickListener(ItemClickEvent.ItemClickListener listener)Deprecated.Removes an ItemClickListener.voidremoveListener(ItemClickEvent.ItemClickListener listener)Deprecated.As of 7.0, replaced byremoveItemClickListener(ItemClickListener)voidremoveListener(Tree.CollapseListener listener)Deprecated.As of 7.0, replaced byremoveCollapseListener(CollapseListener)voidremoveListener(Tree.ExpandListener listener)Deprecated.As of 7.0, replaced byremoveExpandListener(ExpandListener)Collection<?>rootItemIds()Deprecated.Gets the IDs of all Items in the container that don't have a parent.booleansetChildrenAllowed(Object itemId, boolean areChildrenAllowed)Deprecated.Sets the given Item's capability to have children.voidsetContainerDataSource(Container newDataSource)Deprecated.Sets the Container that serves as the data source of the viewer.voidsetDragMode(Tree.TreeDragMode dragMode)Deprecated.Sets the drag mode that controls how Tree behaves as aDragSource.voidsetDropHandler(DropHandler dropHandler)Deprecated.voidsetHtmlContentAllowed(boolean htmlContentAllowed)Deprecated.Sets whether html is allowed in the item captions.voidsetItemDescriptionGenerator(AbstractSelect.ItemDescriptionGenerator generator)Deprecated.Set the item description generator which generates tooltips for the tree items.voidsetItemIcon(Object itemId, Resource icon)Deprecated.Sets the icon for an item.voidsetItemIcon(Object itemId, Resource icon, String altText)Deprecated.Sets the icon for an item.voidsetItemIconAlternateText(Object itemId, String altText)Deprecated.Set the alternate text for an item.voidsetItemStyleGenerator(Tree.ItemStyleGenerator itemStyleGenerator)Deprecated.Sets theTree.ItemStyleGeneratorto be used with this tree.voidsetMultiselectMode(com.vaadin.shared.ui.MultiSelectMode mode)Deprecated.Sets the behavior of the multiselect mode.voidsetNewItemsAllowed(boolean allowNewOptions)Deprecated.Adding new items is not supported.voidsetNullSelectionItemId(Object nullSelectionItemId)Deprecated.Tree does not supportsetNullSelectionItemId.booleansetParent(Object itemId, Object newParentId)Deprecated.Sets the parent of an Item.voidsetSelectable(boolean selectable)Deprecated.Sets the selectable state.Tree.TreeTargetDetailstranslateDropTargetDetails(Map<String,Object> clientVariables)Deprecated.protected org.jsoup.nodes.ElementwriteItem(org.jsoup.nodes.Element design, Object itemId, DesignContext context)Deprecated.Recursively writes a data source Item and its children to a design.protected voidwriteItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.Recursively writes the root items and their children to a design.-
Methods inherited from class com.vaadin.v7.ui.AbstractSelect
addContainerProperty, addItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, attach, containerPropertySetChange, containsId, detach, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getState, getType, getType, getValue, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, readDesign, readItems, removeAllItems, removeContainerProperty, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNullSelectionAllowed, setValue, setValue, size, unselect, writeDesign
-
Methods inherited from class com.vaadin.v7.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, 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, validate, valueChange
-
Methods inherited from class com.vaadin.v7.ui.AbstractLegacyComponent
getExplicitImmediateValue, isImmediate, setImmediate
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, 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, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
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, setStyleName, setVisible, writeDesign
-
Methods inherited from interface com.vaadin.v7.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, removeAllItems, removeContainerProperty, size
-
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled
-
-
-
-
Constructor Detail
-
Tree
public Tree()
Deprecated.Creates a new empty tree.
-
Tree
public Tree(String caption)
Deprecated.Creates a new empty tree with caption.- Parameters:
caption- the caption of the component
-
-
Method Detail
-
setItemIcon
public void setItemIcon(Object itemId, Resource icon)
Deprecated.Description copied from class:AbstractSelectSets the icon for an item.- Overrides:
setItemIconin classAbstractSelect- Parameters:
itemId- the id of the item to be assigned an icon.icon- the icon to use or null.
-
setItemIcon
public void setItemIcon(Object itemId, Resource icon, String altText)
Deprecated.Sets the icon for an item.- Parameters:
itemId- the id of the item to be assigned an icon.icon- the icon to use or null.altText- the alternative text for the icon
-
setItemIconAlternateText
public void setItemIconAlternateText(Object itemId, String altText)
Deprecated.Set the alternate text for an item. Used when the item has an icon.- Parameters:
itemId- the id of the item to be assigned an icon.altText- the alternative text for the icon
-
getItemIconAlternateText
public String getItemIconAlternateText(Object itemId)
Deprecated.Return the alternate text of an icon in a tree item.- Parameters:
itemId- Object with the ID of the item- Returns:
- String with the alternate text of the icon, or null when no icon was set
-
isExpanded
public boolean isExpanded(Object itemId)
Deprecated.Check is an item is expanded.- Parameters:
itemId- the item id.- Returns:
- true if the item is expanded.
-
expandItem
public boolean expandItem(Object itemId)
Deprecated.Expands an item.- Parameters:
itemId- the item id.- Returns:
- True if the expand operation succeeded
-
markAsDirty
public void markAsDirty()
Deprecated.- Specified by:
markAsDirtyin interfaceClientConnector- Specified by:
markAsDirtyin interfaceLegacyComponent- Overrides:
markAsDirtyin classAbstractClientConnector
-
expandItemsRecursively
public boolean expandItemsRecursively(Object startItemId)
Deprecated.Expands the items recursively Expands all the children recursively starting from an item. Operation succeeds only if all expandable items are expanded.- Parameters:
startItemId- ID of the initial item- Returns:
- True if the expand operation succeeded
-
collapseItem
public boolean collapseItem(Object itemId)
Deprecated.Collapses an item.- Parameters:
itemId- the item id.- Returns:
- True if the collapse operation succeeded
-
collapseItemsRecursively
public boolean collapseItemsRecursively(Object startItemId)
Deprecated.Collapses the items recursively. Collapse all the children recursively starting from an item. Operation succeeds only if all expandable items are collapsed.- Parameters:
startItemId- ID of the initial item- Returns:
- True if the collapse operation succeeded
-
isSelectable
public boolean isSelectable()
Deprecated.Returns the current selectable state. Selectable determines if the a node can be selected on the client side. Selectable does not affectAbstractSelect.setValue(Object)orAbstractSelect.select(Object).The tree is selectable by default.
- Returns:
- the current selectable state.
-
setSelectable
public void setSelectable(boolean selectable)
Deprecated.Sets the selectable state. Selectable determines if the a node can be selected on the client side. Selectable does not affectAbstractSelect.setValue(Object)orAbstractSelect.select(Object).The tree is selectable by default.
- Parameters:
selectable- The new selectable state.
-
setMultiselectMode
public void setMultiselectMode(com.vaadin.shared.ui.MultiSelectMode mode)
Deprecated.Sets the behavior of the multiselect mode.- Parameters:
mode- The mode to set
-
getMultiselectMode
public com.vaadin.shared.ui.MultiSelectMode getMultiselectMode()
Deprecated.Returns the mode the multiselect is in. The mode controls how multiselection can be done.- Returns:
- The mode
-
changeVariables
public void changeVariables(Object source, Map<String,Object> variables)
Deprecated.- Specified by:
changeVariablesin interfaceVariableOwner- Overrides:
changeVariablesin classAbstractSelect
-
paintContent
public void paintContent(PaintTarget target) throws PaintException
Deprecated.Paints any needed component-specific things to the given UIDL stream.- Specified by:
paintContentin interfaceLegacyComponent- Overrides:
paintContentin classAbstractSelect- Parameters:
target- the Paint Event.- Throws:
PaintException- if the paint operation failed.- See Also:
LegacyComponent.paintContent(PaintTarget)
-
areChildrenAllowed
public boolean areChildrenAllowed(Object itemId)
Deprecated.Tests if the Item with given ID can have any children.- Specified by:
areChildrenAllowedin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item in the container whose child capability is to be tested- Returns:
trueif the specified Item exists in the Container and it can have children,falseif it's not found from the container or it can't have children.- See Also:
Container.Hierarchical.areChildrenAllowed(Object)
-
getChildren
public Collection<?> getChildren(Object itemId)
Deprecated.Gets the IDs of all Items that are children of the specified Item.- Specified by:
getChildrenin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item whose children the caller is interested in- Returns:
- An unmodifiable
collectioncontaining the IDs of all other Items that are children in the container hierarchy;nullif item does not have any children. - See Also:
Container.Hierarchical.getChildren(Object)
-
getParent
public Object getParent(Object itemId)
Deprecated.Gets the ID of the parent Item of the specified Item.- Specified by:
getParentin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item whose parent the caller wishes to find out.- Returns:
- the ID of the parent Item. Will be
nullif the specified Item is a root element. - See Also:
Container.Hierarchical.getParent(Object)
-
hasChildren
public boolean hasChildren(Object itemId)
Deprecated.Tests if the Item specified withitemIdhas child Items.- Specified by:
hasChildrenin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item to be tested- Returns:
trueif the specified Item has children,falseif not (is a leaf)- See Also:
Container.Hierarchical.hasChildren(Object)
-
isRoot
public boolean isRoot(Object itemId)
Deprecated.Tests if the Item specified withitemIdis a root Item.- Specified by:
isRootin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item whose root status is to be tested- Returns:
trueif the specified Item is a root,falseif not- See Also:
Container.Hierarchical.isRoot(Object)
-
rootItemIds
public Collection<?> rootItemIds()
Deprecated.Gets the IDs of all Items in the container that don't have a parent.- Specified by:
rootItemIdsin interfaceContainer.Hierarchical- Returns:
- An unmodifiable
collectioncontaining IDs of all root elements of the container - See Also:
Container.Hierarchical.rootItemIds()
-
setChildrenAllowed
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed)
Deprecated.Sets the given Item's capability to have children.- Specified by:
setChildrenAllowedin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the Item in the container whose child capability is to be setareChildrenAllowed- boolean value specifying if the Item can have children or not- Returns:
trueif the operation succeeded,falseif not- See Also:
Container.Hierarchical.setChildrenAllowed(Object, boolean)
-
setParent
public boolean setParent(Object itemId, Object newParentId)
Deprecated.Description copied from interface:Container.HierarchicalSets 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 parentContainer.Hierarchical.areChildrenAllowed(Object)== truenull.This operation is optional.
- Specified by:
setParentin interfaceContainer.Hierarchical- Parameters:
itemId- ID of the item to be set as the child of the Item identified withnewParentIdnewParentId- ID of the Item that's to be the new parent of the Item identified withitemId- Returns:
trueif the operation succeeded,falseif not
-
setContainerDataSource
public void setContainerDataSource(Container newDataSource)
Deprecated.Sets the Container that serves as the data source of the viewer.- Specified by:
setContainerDataSourcein interfaceContainer.Viewer- Overrides:
setContainerDataSourcein classAbstractSelect- Parameters:
newDataSource- the new data source.- See Also:
Container.Viewer.setContainerDataSource(Container)
-
containerItemSetChange
public void containerItemSetChange(Container.ItemSetChangeEvent event)
Deprecated.Description copied from class:AbstractSelectLets the listener know a Containers Item set has changed.- Specified by:
containerItemSetChangein interfaceContainer.ItemSetChangeListener- Overrides:
containerItemSetChangein classAbstractSelect- Parameters:
event- change event text- See Also:
Container.ItemSetChangeListener.containerItemSetChange(Container.ItemSetChangeEvent)
-
addExpandListener
public void addExpandListener(Tree.ExpandListener listener)
Deprecated.Adds the expand listener.- Parameters:
listener- the Listener to be added.
-
addListener
@Deprecated public void addListener(Tree.ExpandListener listener)
Deprecated.As of 7.0, replaced byaddExpandListener(ExpandListener)- Parameters:
listener- the Listener to be added.
-
removeExpandListener
public void removeExpandListener(Tree.ExpandListener listener)
Deprecated.Removes the expand listener.- Parameters:
listener- the Listener to be removed.
-
removeListener
@Deprecated public void removeListener(Tree.ExpandListener listener)
Deprecated.As of 7.0, replaced byremoveExpandListener(ExpandListener)- Parameters:
listener- the Listener to be removed.
-
fireExpandEvent
protected void fireExpandEvent(Object itemId)
Deprecated.Emits the expand event.- Parameters:
itemId- the item id.
-
addCollapseListener
public void addCollapseListener(Tree.CollapseListener listener)
Deprecated.Adds the collapse listener.- Parameters:
listener- the Listener to be added.
-
addListener
@Deprecated public void addListener(Tree.CollapseListener listener)
Deprecated.As of 7.0, replaced byaddCollapseListener(CollapseListener)- Parameters:
listener- the Listener to be added.
-
removeCollapseListener
public void removeCollapseListener(Tree.CollapseListener listener)
Deprecated.Removes the collapse listener.- Parameters:
listener- the Listener to be removed.
-
removeListener
@Deprecated public void removeListener(Tree.CollapseListener listener)
Deprecated.As of 7.0, replaced byremoveCollapseListener(CollapseListener)- Parameters:
listener- the Listener to be removed.
-
fireCollapseEvent
protected void fireCollapseEvent(Object itemId)
Deprecated.Emits collapse event.- Parameters:
itemId- the item id.
-
addActionHandler
public void addActionHandler(Action.Handler actionHandler)
Deprecated.Adds an action handler.- Specified by:
addActionHandlerin interfaceAction.Container- See Also:
Action.Container.addActionHandler(Action.Handler)
-
removeActionHandler
public void removeActionHandler(Action.Handler actionHandler)
Deprecated.Removes an action handler.- Specified by:
removeActionHandlerin interfaceAction.Container- See Also:
Action.Container.removeActionHandler(Action.Handler)
-
removeAllActionHandlers
public void removeAllActionHandlers()
Deprecated.Removes all action handlers.
-
getVisibleItemIds
public Collection<?> getVisibleItemIds()
Deprecated.Gets the visible item ids.- Overrides:
getVisibleItemIdsin classAbstractSelect- See Also:
AbstractSelect.getVisibleItemIds()
-
setNullSelectionItemId
public void setNullSelectionItemId(Object nullSelectionItemId) throws UnsupportedOperationException
Deprecated.Tree does not supportsetNullSelectionItemId.- Overrides:
setNullSelectionItemIdin classAbstractSelect- Parameters:
nullSelectionItemId- the nullSelectionItemId to set.- Throws:
UnsupportedOperationException- See Also:
AbstractSelect.setNullSelectionItemId(java.lang.Object)
-
setNewItemsAllowed
public void setNewItemsAllowed(boolean allowNewOptions) throws UnsupportedOperationExceptionDeprecated.Adding new items is not supported.- Overrides:
setNewItemsAllowedin classAbstractSelect- Parameters:
allowNewOptions- the New value of property allowNewOptions.- Throws:
UnsupportedOperationException- if set to true.- See Also:
AbstractSelect.setNewItemsAllowed(boolean)
-
addItemClickListener
public void addItemClickListener(ItemClickEvent.ItemClickListener listener)
Deprecated.Description copied from interface:ItemClickEvent.ItemClickNotifierRegister a listener to handleItemClickEvents.- Specified by:
addItemClickListenerin interfaceItemClickEvent.ItemClickNotifier- Parameters:
listener- ItemClickListener to be registered
-
addListener
@Deprecated public void addListener(ItemClickEvent.ItemClickListener listener)
Deprecated.As of 7.0, replaced byaddItemClickListener(ItemClickListener)- Specified by:
addListenerin interfaceItemClickEvent.ItemClickNotifier
-
removeItemClickListener
public void removeItemClickListener(ItemClickEvent.ItemClickListener listener)
Deprecated.Description copied from interface:ItemClickEvent.ItemClickNotifierRemoves an ItemClickListener.- Specified by:
removeItemClickListenerin interfaceItemClickEvent.ItemClickNotifier- Parameters:
listener- ItemClickListener to be removed
-
removeListener
@Deprecated public void removeListener(ItemClickEvent.ItemClickListener listener)
Deprecated.As of 7.0, replaced byremoveItemClickListener(ItemClickListener)- Specified by:
removeListenerin interfaceItemClickEvent.ItemClickNotifier
-
setItemStyleGenerator
public void setItemStyleGenerator(Tree.ItemStyleGenerator itemStyleGenerator)
Deprecated.Sets theTree.ItemStyleGeneratorto be used with this tree.- Parameters:
itemStyleGenerator- item style generator or null to remove generator
-
getItemStyleGenerator
public Tree.ItemStyleGenerator getItemStyleGenerator()
Deprecated.- Returns:
- the current
Tree.ItemStyleGeneratorfor this tree. Null ifTree.ItemStyleGeneratoris not set.
-
removeItem
public boolean removeItem(Object itemId) throws UnsupportedOperationException
Deprecated.Description copied from interface:ContainerRemoves the Item identified byItemIdfrom the Container.Containers that support filtering should also allow removing an item that is currently filtered out.
This functionality is optional.
- Specified by:
removeItemin interfaceContainer- Specified by:
removeItemin interfaceContainer.Hierarchical- Overrides:
removeItemin classAbstractSelect- Parameters:
itemId- ID of the Item to remove- Returns:
trueif the operation succeeded,falseif not- Throws:
UnsupportedOperationException- if the container does not support removing individual items
-
getDropHandler
public DropHandler getDropHandler()
Deprecated.- Specified by:
getDropHandlerin interfaceDropTarget
-
setDropHandler
public void setDropHandler(DropHandler dropHandler)
Deprecated.
-
translateDropTargetDetails
public Tree.TreeTargetDetails translateDropTargetDetails(Map<String,Object> clientVariables)
Deprecated.- Specified by:
translateDropTargetDetailsin interfaceDropTarget
-
setDragMode
public void setDragMode(Tree.TreeDragMode dragMode)
Deprecated.Sets the drag mode that controls how Tree behaves as aDragSource.- Parameters:
dragMode- the drag mode to set
-
getDragMode
public Tree.TreeDragMode getDragMode()
Deprecated.- Returns:
- the drag mode that controls how Tree behaves as a
DragSource. - See Also:
Tree.TreeDragMode
-
getTransferable
public Transferable getTransferable(Map<String,Object> payload)
Deprecated.- Specified by:
getTransferablein interfaceDragSource
-
setItemDescriptionGenerator
public void setItemDescriptionGenerator(AbstractSelect.ItemDescriptionGenerator generator)
Deprecated.Set the item description generator which generates tooltips for the tree items.- Parameters:
generator- The generator to use or null to disable
-
getItemDescriptionGenerator
public AbstractSelect.ItemDescriptionGenerator getItemDescriptionGenerator()
Deprecated.Get the item description generator which generates tooltips for tree items.- Returns:
- the item description generator
-
readItem
protected String readItem(org.jsoup.nodes.Element node, Set<String> selected, DesignContext context)
Deprecated.Reads an Item from a design and inserts it into the data source. Recursively handles any children of the item as well.- Overrides:
readItemin classAbstractSelect- Parameters:
node- an element representing the item (tree node).selected- 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 parsing- Returns:
- the item id of the new item
- Throws:
DesignException- if the tag name of thenodeelement is notnode.- Since:
- 7.5.0
-
writeItems
protected void writeItems(org.jsoup.nodes.Element design, DesignContext context)Deprecated.Recursively writes the root items and their children to a design.- Overrides:
writeItemsin classAbstractSelect- Parameters:
design- the element into which to insert the itemscontext- the DesignContext instance used in writing- Since:
- 7.5.0
-
writeItem
protected org.jsoup.nodes.Element writeItem(org.jsoup.nodes.Element design, Object itemId, DesignContext context)Deprecated.Recursively writes a data source Item and its children to a design.- Overrides:
writeItemin classAbstractSelect- Parameters:
design- the element into which to insert the itemitemId- the id of the item to writecontext- the DesignContext instance used in writing- Returns:
- Since:
- 7.5.0
-
setHtmlContentAllowed
public void setHtmlContentAllowed(boolean htmlContentAllowed)
Deprecated.Sets whether html is allowed in the item captions. If set totrue, the captions are passed to the browser as html and the developer is responsible for ensuring no harmful html is used. If set tofalse, the content is passed to the browser as plain text. The default setting isfalse- Parameters:
htmlContentAllowed-trueif the captions are used as html,falseif used as plain text- Since:
- 7.6
-
isHtmlContentAllowed
public boolean isHtmlContentAllowed()
Deprecated.Checks whether captions are interpreted as html or plain text.- Returns:
trueif the captions are displayed as html,falseif displayed as plain text- Since:
- 7.6
- See Also:
setHtmlContentAllowed(boolean)
-
getState
protected TreeState getState()
Deprecated.- Overrides:
getStatein classAbstractSelect
-
-