public abstract class ExpanderBasedStructureBean extends AbstractStructureBean implements ExpanderChain.Default
StructureBeans
that uses
Expanders
to expand and collapse nodes. You can add multiple
expanders to create a chain
of expanders. The
default expander is however always provided by the StructureBean
implementation class. For example, this implementation retrieves the default
Expander
from the current View
. Subclasses are allowed to
change what the default expander will be by overriding the
getDefaultExpander()
method.
ExpanderBasedStructureBean s = ... assert s.getExpander() == s.getDefaultExpander(); Expander a = ... s.getExpanderChain().add(a); assert a == s.getExpander(); assert s.getDefaultExpander() == s.getExpanderChain().getNext(a); Expander b = ... s.getExpanderChain().add(b); assert b == s.getExpander(); assert a == s.getExpanderChain().getNext(b); assert s.getDefaultExpander() == s.getExpanderChain().getNext(a); Expander[] x = s.getExpanderChain().getExpanders(); assert x.length == 2; assert x[0] == b; assert x[1] == a;
Modifier and Type | Class and Description |
---|---|
protected static class |
ExpanderBasedStructureBean.ExpandCtxBase |
AbstractStructureBean.ConsistentNodeIterator, AbstractStructureBean.StructureBeanNodeIterator
AbstractSortableTableBean.ForcedColumnsParams, AbstractSortableTableBean.SortInfo
AbstractEditableTableBean.CellUpdaterTableClient, AbstractEditableTableBean.CommitResultImpl, AbstractEditableTableBean.ConnectResultImpl, AbstractEditableTableBean.DeleteResultImpl, AbstractEditableTableBean.DisconnectResultImpl, AbstractEditableTableBean.ObjectResultImpl, AbstractEditableTableBean.RemoveResultImpl, AbstractEditableTableBean.ReplaceResultImpl, AbstractEditableTableBean.UpdateResultImpl
AbstractPaginatedTableBean.CurrentPageEvaluationParams, AbstractPaginatedTableBean.TablePage
AbstractTableBean.DefaultNavigationHandler, AbstractTableBean.TableClientImpl, AbstractTableBean.TableDataIterator, AbstractTableBean.ViewListenerProxy
TableDataProvider.Displayed<T extends TableData>, TableDataProvider.Empty<T extends TableData>, TableDataProvider.Specific<T extends TableData>, TableDataProvider.Visible<T extends TableData>
StructureModifiableTableBean.CallBack, StructureModifiableTableBean.CommitResult, StructureModifiableTableBean.CommitResults, StructureModifiableTableBean.ConnectResult, StructureModifiableTableBean.ConnectSpec, StructureModifiableTableBean.DeleteResult, StructureModifiableTableBean.DisconnectResult, StructureModifiableTableBean.ReplaceResult, StructureModifiableTableBean.ReplaceSpec, StructureModifiableTableBean.UpdateResult
STRUCTURE_INVALID_TABLE_DATA_FILTER
editable, editSupported, structureModificationSupported
DEFAULT_VISIBLE_TABLE_DATA_FILTER, EVALUATION_REQUIRED_TABLE_DATA_FILTER, SELECTED_TABLE_DATA_FILTER
EMPTY
MODE_ASCENDING, MODE_DESCENDING, MODE_NOT_SORTED
Constructor and Description |
---|
ExpanderBasedStructureBean()
Default constructor...
|
Modifier and Type | Method and Description |
---|---|
protected Expander.ExpandCtx |
createExpandCtx()
Subclasses can return a different
context object, or
use the default returned by this method. |
protected StructureBeanNode |
createRootNode(java.lang.String rootObjectId)
Creates a root node with the specified object ID.
|
protected StructureBeanNode |
createStructureNode(java.lang.String relationshipId,
java.lang.String objectId,
boolean from)
Creates a node with the specified relationship ID, object ID and
direction.
|
protected void |
doCollapseNode(StructureBeanNode node)
Delegates the collapse to the
Expander . |
protected void |
doExpandNode(StructureBeanNode node,
int levels)
Delegates the expand to the
expander . |
Expander |
getDefaultExpander()
This method returns the default expander.
|
Expander |
getExpander()
Returns the
Expander currently used by this StructureBean |
ExpanderChain |
getExpanderChain()
Returns the chain of expanders.
|
protected long |
getNextNodeId()
Returns the ID for the next node.
|
boolean |
isFiltersCombinable()
This method delegates to the
expander to get whether or
not the filters are combinable. |
boolean |
isFullExpandSupported()
Delegates to the expander.
|
boolean |
isMultiLevelExpandSupported()
Delegates to the expander.
|
boolean |
isVisualsChangeable()
Overloaded in order to allow the expander to decide this.
|
protected void |
onClone(TableBean<StructureBeanNode> c)
Create a deep copy of this object.
|
protected void |
onNavigate(TableBean<? extends TableData> table,
java.lang.String objectId)
Initializes the new table/structure.
|
protected Expander |
verifyExpander()
Returns the current expander.
|
accept, addNode, addRoot, addRoot, addStructureListener, changeRootNode, changeRootNode, clearRootNodes, collapse, collapseNode, countVisibleChildNodes, createTableDataComparator, expand, expand, expandFully, expandNode, expandNode, expandNodeFully, fireStructureCollapseEvent, fireStructureExpandEvent, getAllowInconsistentVisibleStructure, getCollapseOnFilterChange, getConsistentVisibleTableData, getFilteredRootNodes, getInitialExpandDepth, getInitialExpandMode, getMultiLevelExpandDepth, getNodeAt, getNodeCount, getNodes, getNodes, getNodes, getObjectIdForHeaders, getRootCount, getRootInquirySupport, getRootJPOSupport, getRootNode, getRootNodeAt, getRootNodes, getStructureListeners, getTableData, getTableDataAt, getTableDataCount, getVisibleChildAt, getVisibleChildCount, getVisibleChildIndex, getVisibleChildNodes, getVisibleRootNodes, getVisibleTableData, hasNodes, hasTableData, hasVisibleChildren, invalidateRootNodes, isAllowHideSingleRootNode, isDefaultCollapseOnFilterChange, isFirstVisibleChild, isInquirySupported, isLastVisibleChild, isRootInquirySupported, isRootNode, isRootNodesNavigable, isToFlatTableSupported, isValid, isVisibleChild, loadFromInquiry, loadFromJPO, loadIntoNode, loadRootsFromInquiry, loadRootsFromInquiry, loadRootsFromJPO, loadRootsFromJPO, onViewChanged, onVisualsChanged, removeNode, removeNodes, removeNodes, removeRoot, removeRootNode, removeStructureListener, removeTableData, setAllowHideSingleRootNode, setAllowInconsistentVisibleStructure, setCollapseOnFilterChange, setExpanded, setInitialExpandDepth, setInitialExpandMode, setMultiLevelExpandDepth, setRoot, setRoot, sort, sortImpl, toFlatTable, validate
addSortMode, addSortMode, clearSortModes, createEvaluationChain, fireColumnsUpdatedEvent, getModeForString, getSortMode, getSortMode, getSortOrder, getSortOrderByName, hasSortModes, initDefault, invalidateSort, isAnySorted, isEvaluationForcedFor, isSorted, isSorted, isSorted, isSortSupported, isValidSort, onColumnsUpdated, onTableChanged, onTableSorted, setSortMode, setSortMode, setSortSupported, sortIfRequired, validateSort
addTableEditListenerListener, afterConnect, afterDisconnect, afterEdit, afterEdit, connect, createConnectResult, createDisconnectResult, createReplaceResult, disconnect, editCell, editCells, fireWasEditedEvent, fireWasEditedEvent, getReuseCellsForEditEvaluation, getTableEditListeners, isEditable, isEditSupported, isStructureModificationSupported, performConnect, performDisconnect, performReplace, removeTableEditListener, replace, setEditable, setEditSupported, setStructureModificationSupported, validate, validateSpec
addSelectionListener, createDefaultSelectionModel, getSelectionModel, removeSelectionListener, selectableChanged, selectionChanged, setSelectionModel
addPaginationChangeListener, asNonPaginatedTable, evaluateColumns, firePaginationChanged, getCurrentPage, getDisplayedTableData, getPageCount, getPageTableData, getPageTableDataRange, getPaginationThreshold, getUnpaginatedTableData, getUnpaginatedTableDataCount, isOnlyEvaluateCurrentPage, isPaginated, isPaginationForced, isPaginationSupported, isProxyInvokation, removePaginationChangeListener, setCurrentPage, setOnlyEvaluateCurrentPage, setPageTableDataRange, setPaginated, setPaginationSupported, setPaginationThreshold
accept, addEntryProcessor, addTableClonedListener, addTableContentListener, addTableGroupedListener, addTableListener, addTableNavigateListener, addVisibleTableDataFilter, clearEntryProcessor, clearRows, clearRowsBeforeEvaluation, clearVisibleTableDataFilter, clone, createNavigationHandler, createNavigationHandler, createTableClient, createTableHeaders, ensureTable, ensureView, evaluate, evaluateColumns, fireDidNavigateEvent, fireTableChangedEvent, fireTableContentAdded, fireTableContentCleared, fireTableContentRemoved, fireTableEvaluatedEvent, fireTableInvalidatedEvent, fireTableSortedEvent, fireViewChangedEvent, fireVisualsChangedEvent, fireWasClonedEvent, fireWasGroupedEvent, getCalculations, getCellAt, getChoosableViews, getColumnAt, getColumnByName, getColumnCount, getColumnIndex, getColumnList, getColumns, getContextMenu, getDisplayedTableDataCount, getEntryProcessor, getEntryProcessors, getEnv, getEnv, getEvaluationChain, getEvaluationRequiredTableData, getEvaluationRequiredTableDataCount, getFilteredTableData, getFilteredTableDataCount, getHasParent, getHeader, getLocaleForHeaders, getMenuBar, getMode, getNavigationHandler, getNavigationHandler, getPageConfig, getParent, getSelectedTableData, getSelectedTableDataCount, getSubHeader, getTableClonedListeners, getTableContentListeners, getTableData, getTableData, getTableDataWithId, getTableGroupedListeners, getTableListeners, getTableNavigateListeners, getView, getViewFactory, getVisibleColumnAt, getVisibleColumnByName, getVisibleColumnCount, getVisibleColumns, getVisibleTableDataCount, getVisibleTableDataFilters, getVisibleTableDataFilters, group, hasCellAt, hasEvaluationForcedColumns, hasVisibleTableDataFilter, invalidate, invalidateTableData, isColumnsLoaded, isEvaluateReadOnly, isEvaluationRequired, isHeaderHTML, isNavigateSupported, isOnlyEvaluateVisibleColumns, isSubHeaderHTML, isTableChangeable, isViewChangeable, isVisible, isVisibleColumn, isVisibleColumnImpl, loadFromInquiry, loadFromJPO, navigate, navigate, onGroup, onTableEvaluated, onTableInvalidated, paramString, reload, removeEntryProcessor, removeParent, removeTableClonedListener, removeTableContentListener, removeTableData, removeTableData, removeTableGroupedListener, removeTableListener, removeTableNavigateListener, removeVisibleTableDataFilter, removeVisibleTableDataFilters, setChoosableViews, setContextMenu, setEntryProcessor, setEntryProcessors, setEnv, setEvaluateReadOnly, setHeader, setHeader, setMenuBar, setNavigateSupported, setOnlyEvaluateVisibleColumns, setPageConfig, setParent, setSubHeader, setSubHeader, setTableChangeable, setView, setView, setViewChangeable, setViewFactory, setVisualsChangeable, toString
getAttribute, getAttributeMap, getAttributeNames, removeAttribute, setAttribute
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, addTableClonedListener, addTableContentListener, addTableGroupedListener, addTableListener, addTableNavigateListener, addVisibleTableDataFilter, clearVisibleTableDataFilter, clone, getCalculations, getCellAt, getColumnAt, getColumnByName, getColumnCount, getColumnIndex, getColumnList, getColumns, getDisplayedTableData, getDisplayedTableDataCount, getEvaluationRequiredTableData, getEvaluationRequiredTableDataCount, getFilteredTableData, getFilteredTableDataCount, getHasParent, getHeader, getNavigationHandler, getNavigationHandler, getParent, getSelectedTableData, getSelectedTableDataCount, getSubHeader, getTableClonedListeners, getTableData, getTableData, getTableDataWithId, getTableGroupedListeners, getTableListeners, getTableNavigateListeners, getVisibleColumnAt, getVisibleColumnByName, getVisibleColumnCount, getVisibleColumns, getVisibleTableDataCount, getVisibleTableDataFilters, getVisibleTableDataFilters, hasCellAt, hasVisibleTableDataFilter, invalidate, isHeaderHTML, isNavigateSupported, isOnlyEvaluateVisibleColumns, isSubHeaderHTML, isVisible, isVisibleColumn, navigate, navigate, reload, removeParent, removeTableClonedListener, removeTableContentListener, removeTableData, removeTableData, removeTableGroupedListener, removeTableListener, removeTableNavigateListener, removeVisibleTableDataFilter, removeVisibleTableDataFilters, setHeader, setHeader, setOnlyEvaluateVisibleColumns, setParent, setSubHeader, setSubHeader
getChoosableViews, getView, getViewFactory, isTableChangeable, isViewChangeable, setChoosableViews, setView, setView, setViewFactory
getMenuBar, setMenuBar
getContextMenu, setContextMenu
getEnv, getEnv, setEnv
getAttribute, getAttributeNames, removeAttribute, setAttribute
getPageConfig, setPageConfig
public ExpanderBasedStructureBean()
protected void onClone(TableBean<StructureBeanNode> c)
onClone
in class AbstractStructureBean
protected void onNavigate(TableBean<? extends TableData> table, java.lang.String objectId) throws TVCException
onNavigate
in class AbstractStructureBean
TVCException
public boolean isVisualsChangeable()
isVisualsChangeable
in interface ViewSupport
isVisualsChangeable
in class AbstractTableBean<StructureBeanNode>
public boolean isFiltersCombinable()
expander
to get whether or
not the filters are combinable.isFiltersCombinable
in interface StructureBean
isFiltersCombinable
in class AbstractStructureBean
protected void doExpandNode(StructureBeanNode node, int levels) throws TVCException
expander
.doExpandNode
in class AbstractStructureBean
node
- The current nodelevels
- The number of leves to expandTVCException
- If unable to expand the node for some reason.protected void doCollapseNode(StructureBeanNode node) throws TVCException
Expander
.doCollapseNode
in class AbstractStructureBean
node
- The node to collapse.TVCException
- If unable to collapse the node.protected Expander.ExpandCtx createExpandCtx()
context
object, or
use the default returned by this method.expand-context
used during expansions to
provide the expander
with an interface to the
structre.public final Expander getExpander()
Expander
currently used by this StructureBean
expander
.public final ExpanderChain getExpanderChain()
protected Expander verifyExpander() throws TVCException
getExpander()
returns null, this method throws a
TVCException
.TVCException
- If no current expander.public Expander getDefaultExpander()
expander
that is default for a
particular StructureBean
implementation. This implementation will
obtain the default expander from the view.getDefaultExpander
in interface ExpanderChain.Default
public boolean isMultiLevelExpandSupported()
isMultiLevelExpandSupported
in interface StructureBean
StructureBean.setMultiLevelExpandDepth(int)
,
StructureBean.getMultiLevelExpandDepth()
public boolean isFullExpandSupported()
isFullExpandSupported
in interface StructureBean
StructureBean.expandFully()
,
StructureBean.expandNodeFully(StructureBeanNode)
protected long getNextNodeId()
protected StructureBeanNode createRootNode(java.lang.String rootObjectId) throws TVCException
createRootNode
in class AbstractStructureBean
TVCException
protected StructureBeanNode createStructureNode(java.lang.String relationshipId, java.lang.String objectId, boolean from) throws TVCException
createStructureNode
in class AbstractStructureBean
TVCException
Copyright © Technia AB. All Rights Reserved.