info.magnolia.ui.workbench.tree
Class InplaceEditingTreeTable

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractField<Object>
              extended by com.vaadin.ui.AbstractSelect
                  extended by com.vaadin.ui.Table
                      extended by com.vaadin.ui.TreeTable
                          extended by info.magnolia.ui.vaadin.grid.MagnoliaTreeTable
                              extended by info.magnolia.ui.workbench.tree.InplaceEditingTreeTable
All Implemented Interfaces:
com.vaadin.data.Buffered, com.vaadin.data.BufferedValidatable, com.vaadin.data.Container, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer, com.vaadin.data.Property<Object>, com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer, com.vaadin.data.Validatable, com.vaadin.event.Action.Container, com.vaadin.event.Action.ShortcutNotifier, com.vaadin.event.ConnectorEventListener, com.vaadin.event.dd.DragSource, com.vaadin.event.dd.DropTarget, com.vaadin.event.ItemClickEvent.ItemClickListener, com.vaadin.event.ItemClickEvent.ItemClickNotifier, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.server.VariableOwner, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Field<Object>, com.vaadin.ui.HasComponents, com.vaadin.ui.LegacyComponent, ItemEditedEvent.Notifier, Serializable, Iterable<com.vaadin.ui.Component>, EventListener

public class InplaceEditingTreeTable
extends MagnoliaTreeTable
implements com.vaadin.event.ItemClickEvent.ItemClickListener, ItemEditedEvent.Notifier

The Inplace-editing TreeTable, for editing item properties inplace, on double click or via keyboard shortcuts. Additionally, editable columns are configurable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.vaadin.ui.Table
com.vaadin.ui.Table.Align, com.vaadin.ui.Table.CacheUpdateException, com.vaadin.ui.Table.CellStyleGenerator, com.vaadin.ui.Table.ColumnGenerator, com.vaadin.ui.Table.ColumnHeaderMode, com.vaadin.ui.Table.ColumnReorderEvent, com.vaadin.ui.Table.ColumnReorderListener, com.vaadin.ui.Table.ColumnResizeEvent, com.vaadin.ui.Table.ColumnResizeListener, com.vaadin.ui.Table.FooterClickEvent, com.vaadin.ui.Table.FooterClickListener, com.vaadin.ui.Table.GeneratedRow, com.vaadin.ui.Table.HeaderClickEvent, com.vaadin.ui.Table.HeaderClickListener, com.vaadin.ui.Table.RowGenerator, com.vaadin.ui.Table.RowHeaderMode, com.vaadin.ui.Table.TableDragMode, com.vaadin.ui.Table.TableDropCriterion, com.vaadin.ui.Table.TableTransferable
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractSelect
com.vaadin.ui.AbstractSelect.AbstractSelectTargetDetails, com.vaadin.ui.AbstractSelect.AcceptItem, com.vaadin.ui.AbstractSelect.CaptionChangeListener, com.vaadin.ui.AbstractSelect.DefaultNewItemHandler, com.vaadin.ui.AbstractSelect.Filtering, com.vaadin.ui.AbstractSelect.ItemCaptionMode, com.vaadin.ui.AbstractSelect.ItemDescriptionGenerator, com.vaadin.ui.AbstractSelect.NewItemHandler, com.vaadin.ui.AbstractSelect.TargetItemIs, com.vaadin.ui.AbstractSelect.VerticalLocationIs
 
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField
com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Container
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer
 
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
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
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
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
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Field
com.vaadin.ui.Field.ValueChangeEvent
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
 
Nested classes/interfaces inherited from interface com.vaadin.data.Property
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
 
Field Summary
 
Fields inherited from class com.vaadin.ui.Table
ALIGN_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_PROPERTY
 
Fields inherited from class com.vaadin.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 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
 
Constructor Summary
InplaceEditingTreeTable()
           
 
Method Summary
 void addItemEditedListener(ItemEditedEvent.Handler listener)
           
 void editFirstCellofFirstSelectedRow()
           
 void editNextCell(com.vaadin.ui.Field<?> field)
           
 void editPreviousCell(com.vaadin.ui.Field<?> field)
           
 void fireItemEditedEvent(com.vaadin.data.Property property)
          Fires an ItemEditedEvent to all listeners.
protected  int getAddedRowCount()
           
protected  int getFirstAddedItemIndex()
           
protected  int getFirstUpdatedItemIndex()
           
protected  int getUpdatedRowCount()
           
protected  boolean isPartialRowUpdate()
           
 void itemClick(com.vaadin.event.ItemClickEvent event)
           
 void removeItemEditedListener(ItemEditedEvent.Handler listener)
           
 void setEditableColumns(Object... editablePropertyIds)
           
 void setEditing(Object itemId, Object propertyId)
          Sets the item and property for inplace editing.
protected  boolean shouldHideAddedRows()
           
 
Methods inherited from class info.magnolia.ui.vaadin.grid.MagnoliaTreeTable
changeVariables, formatPropertyValue, getState, getValidators, setContainerDataSource
 
Methods inherited from class com.vaadin.ui.TreeTable
addCollapseListener, addExpandListener, addListener, addListener, areChildrenAllowed, containerItemSetChange, fireCollapseEvent, fireExpandEvent, getChildren, getContainerDataSource, getHierarchyColumnId, getIdByIndex, getItemIds, getItemIds, getParent, hasChildren, indexOfId, isAnimationsEnabled, isCollapsed, isLastId, isRoot, lastItemId, nextItemId, paintContent, paintRowAttributes, paintRowIcon, prevItemId, removeCollapseListener, removeExpandListener, removeListener, removeListener, rootItemIds, setAnimationsEnabled, setChildrenAllowed, setCollapsed, setHierarchyColumn, setParent, size
 
Methods inherited from class com.vaadin.ui.Table
addActionHandler, addColumnReorderListener, addColumnResizeListener, addContainerProperty, addContainerProperty, addFooterClickListener, addGeneratedColumn, addHeaderClickListener, addItem, addItemAfter, addItemAfter, addItemClickListener, addListener, addListener, addListener, addListener, addListener, attach, beforeClientResponse, bindPropertyToField, containerPropertySetChange, detach, disableContentRefreshing, enableContentRefreshing, firstItemId, getCacheRate, getCellStyleGenerator, getColumnAlignment, getColumnAlignments, getColumnExpandRatio, getColumnFooter, getColumnGenerator, getColumnHeader, getColumnHeaderMode, getColumnHeaders, getColumnIcon, getColumnIcons, getColumnWidth, getComponentIterator, getConverter, getCurrentPageFirstItemId, getCurrentPageFirstItemIndex, getDragMode, getDropHandler, getItemDescriptionGenerator, getMultiSelectMode, getPageLength, getPropertyValue, getRowGenerator, getRowHeaderMode, getSortableContainerPropertyIds, getSortContainerPropertyId, getTableFieldFactory, getTransferable, getVisibleColumns, getVisibleItemIds, hasConverter, isColumnCollapsed, isColumnCollapsible, isColumnCollapsingAllowed, isColumnReorderingAllowed, isEditable, isFirstId, isFooterVisible, isRowCacheInvalidated, isSelectable, isSortAscending, isSortDisabled, isSortEnabled, iterator, markAsDirty, markAsDirtyRecursive, paintRowHeader, refreshRenderedCells, refreshRowCache, registerComponent, removeActionHandler, removeAllActionHandlers, removeAllItems, removeColumnReorderListener, removeColumnResizeListener, removeContainerProperty, removeFooterClickListener, removeGeneratedColumn, removeHeaderClickListener, removeItem, removeItemClickListener, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, resetPageBuffer, setCacheRate, setCellStyleGenerator, 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
 
Methods inherited from class com.vaadin.ui.AbstractSelect
addItem, addItem, 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, unselect
 
Methods inherited from class com.vaadin.ui.AbstractField
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getTabIndex, 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, shouldHideErrors, toString, validate, validate
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setHeight, setHeight, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setWidth, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.data.Container.Hierarchical
removeItem
 
Methods inherited from interface com.vaadin.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getType, removeAllItems, removeContainerProperty
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, removeAttachListener, removeDetachListener, removeExtension, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
 
Methods inherited from interface com.vaadin.server.VariableOwner
isEnabled, isImmediate
 
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier
addShortcutListener, removeShortcutListener
 

Constructor Detail

InplaceEditingTreeTable

public InplaceEditingTreeTable()
Method Detail

setEditableColumns

public void setEditableColumns(Object... editablePropertyIds)

setEditing

public void setEditing(Object itemId,
                       Object propertyId)
Sets the item and property for inplace editing.

Parameters:
itemId - the item id
propertyId - the property id

getFirstUpdatedItemIndex

protected int getFirstUpdatedItemIndex()
Overrides:
getFirstUpdatedItemIndex in class com.vaadin.ui.TreeTable

getUpdatedRowCount

protected int getUpdatedRowCount()
Overrides:
getUpdatedRowCount in class com.vaadin.ui.TreeTable

getFirstAddedItemIndex

protected int getFirstAddedItemIndex()
Overrides:
getFirstAddedItemIndex in class com.vaadin.ui.TreeTable

getAddedRowCount

protected int getAddedRowCount()
Overrides:
getAddedRowCount in class com.vaadin.ui.TreeTable

shouldHideAddedRows

protected boolean shouldHideAddedRows()
Overrides:
shouldHideAddedRows in class com.vaadin.ui.TreeTable

isPartialRowUpdate

protected boolean isPartialRowUpdate()
Overrides:
isPartialRowUpdate in class com.vaadin.ui.TreeTable

addItemEditedListener

public void addItemEditedListener(ItemEditedEvent.Handler listener)
Specified by:
addItemEditedListener in interface ItemEditedEvent.Notifier

removeItemEditedListener

public void removeItemEditedListener(ItemEditedEvent.Handler listener)
Specified by:
removeItemEditedListener in interface ItemEditedEvent.Notifier

fireItemEditedEvent

public void fireItemEditedEvent(com.vaadin.data.Property property)
Fires an ItemEditedEvent to all listeners. Since the property does not contain a reference to the item it came from we need to fetch the item from the container and change the property before we send the item in the event.


itemClick

public void itemClick(com.vaadin.event.ItemClickEvent event)
Specified by:
itemClick in interface com.vaadin.event.ItemClickEvent.ItemClickListener

editNextCell

public void editNextCell(com.vaadin.ui.Field<?> field)

editPreviousCell

public void editPreviousCell(com.vaadin.ui.Field<?> field)

editFirstCellofFirstSelectedRow

public void editFirstCellofFirstSelectedRow()


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.