Class FIXGRIDTreeBinding<ItemClass extends FIXGRIDTreeItem>
java.lang.Object
org.eclnt.jsfserver.elements.impl.FIXGRIDBinding<ItemClass>
org.eclnt.jsfserver.elements.impl.FIXGRIDTreeBinding<ItemClass>
- All Implemented Interfaces:
Serializable
,IConfiguredByLayout
,IFIXGRIDBinding<ItemClass>
,IDynamicContentBindingObject
public class FIXGRIDTreeBinding<ItemClass extends FIXGRIDTreeItem>
extends FIXGRIDBinding<ItemClass>
implements Serializable, IFIXGRIDBinding<ItemClass>
Binding class for FIXGRID component when being used as tree. The FIXGRIDTreeBinding
has a root node which is by default created internally, but which can also be passed
explicitly. All tree operations (e.g. adding items) are then done on
node level.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDBinding
FIXGRIDBinding.Exporter, FIXGRIDBinding.FormattedValue, FIXGRIDBinding.ScrollHelper, FIXGRIDBinding.SortHelper, FIXGRIDBinding.TextSearcher
Nested classes/interfaces inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
IFIXGRIDBinding.FIXGRIDSortInfo
-
Field Summary
Modifier and TypeFieldDescriptionprotected FIXGRIDTreeItem
static boolean
When set to true (default) then toggling activities an tree node level are couple with a corresponding scrolling: if e.g. the user opens up a tree node item on the bottom of a grid, then the grid automatically is scrolled so that the child items become visible.Fields inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDBinding
CONTENTTYPE_EXPORT_CSV, CONTENTTYPE_EXPORT_HTML, CONTENTTYPE_EXPORT_PDF, CONTENTTYPE_EXPORT_TAB, CONTENTTYPE_EXPORT_XLSX, CONTENTTYPE_EXPORT_XML, EXPORT_COLUMNHEADER_PLACEHOLDER, m_columnsequence, m_currentlyFocussedItem, m_defaultColumnsequence, m_firstItemForShiftSelection, m_initialized, m_modcolumnwidths, m_numberoffooterrows, m_numberofheaderrows, m_objectBinding, m_previouslyFocussedItem, m_sbvalue, m_sbvisibleamount, m_selectedItems, m_sortInfo, m_this
Fields inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
SORT_ASCENDING, SORT_DESCENDING, SORT_UNSORTED
-
Constructor Summary
ConstructorDescriptionFIXGRIDTreeBinding
(boolean changeIndexIsSupported) Constructor which allows to switch on performance optimized data management.FIXGRIDTreeBinding
(FIXGRIDTreeItem rootNode) Constructor with explicit passing of root node.FIXGRIDTreeBinding
(FIXGRIDTreeItem rootNode, boolean changeIndexIsSupported) -
Method Summary
Modifier and TypeMethodDescriptionvoid
When using triple state sorting then the original index of the items needs to be stored in the items.protected void
void
Collapses all nodes which are currently loaded.void
collapseAll
(javax.faces.event.ActionEvent event) Same method as collapseAll() without parameters - but directly usable as action listener.void
Collapses top nodes.void
collapseTopNodes
(javax.faces.event.ActionEvent event) Same method as collapseTopNodes() without parameter - but directly usable as action listener.void
Ensures that the passed item is displayed within the tree.void
Expands the whole tree, so that all items are shown.void
expandAll
(javax.faces.event.ActionEvent event) Same method as expandAll without parameters - but directly usable as action listener.void
Expands top nodes.void
expandTopNodes
(javax.faces.event.ActionEvent event) Same method as expandTopNodes() without parameter - but directly usable as action listener.protected void
Default implementation: no shift selection, but just normal selectionboolean
getItemByText
(List<String> itemTexts) Passes back a node that is represented by the passed text list.Returns all items of the current grid in the sequence of their visual appearance.Passes back a list of texts representing the texts from the top node down to the node that is passed as parameter.Gets the root node.getRows()
Passes back the currently visible nodes to the client.int
Size of nodes that determine the scroll bar size.Returns all selected items in the sequence they occur within the grid.void
removeNode
(FIXGRIDTreeItem node) Removes node from tree - together with all of its subnodes.void
This method is called with each request processing - at the beginning of the processing.void
setFoldersAlwaysSortedToTop
(boolean foldersAlwaysSortedToTop) If property is set to true then during sorting folder nodes are always arranged on top of leave nodes.void
setRootNode
(FIXGRIDTreeItem value) Sets the root node - this method needs to be called with great care: setting a new root node will remove the current tree and replace it by another.void
setSbvalue
(int value) Sets the top index of the grid.void
setSbvisibleamount
(int value) Internal use only.protected void
Actual sorting of grid.protected void
In case the grid is supporting "triplesort": this is the method to sort the grid by its original indexprotected void
sortNodes
(FIXGRIDTreeItem node, String sortReference, String objectBindingString, boolean ascending) protected void
protected void
This method is called every time something happens in the tree that requires a rebuild of buffers that are required within the building up of visible items in the method getRows().Methods inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDBinding
addConfiguredByLayoutListener, applyPersistentData, avoidLoadingOfPersistentGridData, checkIfCellsAreHighlighted, checkIfChangeIndexIsSupported, checkIfFreeColumnSequenceUpdateIsSupported, checkIfSorted, checkIfToCatchGridActionError, checkSpecialTouchMultiSelection, clearSortInfo, connectWithBinding, createDefaultStringComparator, createExporter, createScrollHelper, createTextSearcher, deselectCurrentSelection, deselectItem, deselectItem, deselectItemWCB, executeOnInitializedGrid, findSortComparatorForColumnValue, getAltPressedOfLastSelection, getClientvisibleamount, getColumnIndexOfLastSelection, getColumnInfos, getColumnsequence, getColumnTexts, getConnectedBinding, getCtrlPressedOfLastSelection, getCurrentColumWdithSequenceInfo, getCurrentHorizontalScrollPosition, getDefaultColumnsequence, getExportableColumns, getExportableColumns, getExporter, getFixgridComponent, getIndextobevisibleOfItems, getItemColumnClientStringValue, getItemColumnFormattedValue, getListOfExportItems, getModcolumnwidths, getModcolumnwidthsAsArray, getMouseButtonOfLastSelection, getNewClientHorizontalScrollPosition, getNumberOfFixColumns, getObjecttobevisibleOfItems, getOriginalcolumnwidths, getOriginalcolumnwidthsAsArray, getRowDataUI, getSbvalue, getSbvisibleamount, getScrollHelper, getSelectedItem, getSelectedItems, getShiftPressedOfLastSelection, getSortInfo, getSortInfoForReference, getTextSearcher, getToBeAccessedNode, getToBeAccessedNodeExpression, getToBeAccessedNodeFormatmaskValue, getToBeAccessedNodeFormattedValue, getToBeAccessedNodeFormattedValue, getToBeAccessedNodeFormattedValueForExport, getToBeAccessedNodeFormatValue, getToBeAccessedNodeStringValue, getToBeAccessedNodeTimezoneValue, getToBeAccessedNodeValue, getVisibleColumns, getVisibleColumns, getWithFixColumnsByUserConfiguration, init_CONTENTTYPE_EXPORT_CSV, init_CONTENTTYPE_EXPORT_HTML, init_CONTENTTYPE_EXPORT_PDF, init_CONTENTTYPE_EXPORT_XLSX, init_CONTENTTYPE_EXPORT_XML, initialize, initPopupEditColumnDetailsUndecorated, initPopupGridFunctionsUndecorated, initTextSearcherShowSearchInfoPopup, isCurrentlyProcessingGridAction, isInitialized, isItemSelected, loadPersistentData, moveUpDown, notifyDownloadWasTriggered, onClearCellHighlight, onColumnSequenceUpdated, onColumnWidthsUpdated, onDrop, onEditColumnDetails, onFirstLineUp, onGridAction, onGridActionExecute, onLastLineDown, onOpenGridExportFunctions, onOpenGridFunctions, onPopupMenuItem, onPopupMenuLoad, onSelectionUpdateByClientActivity, onSelectorTitleIconInvoked, openEditColumnDetailsPopup, openGridExportFunctionsPopup, openGridFunctionsPopup, passComponentData, processMenuItemExecutedOnOutdatedItem, processMultipleSort, processMultipleSort, processSearch, processSort, removeConfiguredByLayoutListener, resetPersistentData, resort, scrollHorizontallyToLastClientPosition, scrollHorizontallyToPosition, selectAndFocusItem, selectItem, selectItem, setChangeIndexIsSupported, setClientvisibleamount, setColumnIndexOfLastSelection, setColumnIndexOfLastSelection, setColumnsequence, setCurrentHorizontalScrollPosition, setCurrentlyProcessingGridAction, setDefaultColumnsequence, setIndextobevisibleOfItems, setModcolumnwidth, setModcolumnwidths, setModcolumnwidthsArray, setModcolumnwidthsList, setNumberOfFixColumns, setObjecttobevisibleOfItems, setSbvalue, setSbvalue, setToBeAccessedNode, setWithFixColumnsByUserConfiguration, sort, storePersistentData, storePersistentData, storePersistentDataImplicitly, unhighlightAllCells, updateHighlight
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclnt.jsfserver.elements.IConfiguredByLayout
addConfiguredByLayoutListener, removeConfiguredByLayoutListener
Methods inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
checkIfChangeIndexIsSupported, getClientvisibleamount, getColumnsequence, getConnectedBinding, getExportableColumns, getExportableColumns, getIndextobevisibleOfItems, getModcolumnwidths, getNewClientHorizontalScrollPosition, getNumberOfFixColumns, getObjecttobevisibleOfItems, getSbvalue, getSbvisibleamount, getSortInfo, getSortInfoForReference, getVisibleColumns, getVisibleColumns, passComponentData, setClientvisibleamount, setColumnIndexOfLastSelection, setColumnIndexOfLastSelection, setColumnsequence, setCurrentHorizontalScrollPosition, setIndextobevisibleOfItems, setModcolumnwidths, setObjecttobevisibleOfItems, setSbvalue, setWithFixColumnsByUserConfiguration
-
Field Details
-
s_supportAutoScrollOnToggle
public static boolean s_supportAutoScrollOnToggleWhen set to true (default) then toggling activities an tree node level are couple with a corresponding scrolling: if e.g. the user opens up a tree node item on the bottom of a grid, then the grid automatically is scrolled so that the child items become visible. -
m_rootNode
-
-
Constructor Details
-
FIXGRIDTreeBinding
public FIXGRIDTreeBinding() -
FIXGRIDTreeBinding
public FIXGRIDTreeBinding(boolean changeIndexIsSupported) Constructor which allows to switch on performance optimized data management. SeeFIXGRIDBinding(boolean)
. -
FIXGRIDTreeBinding
Constructor with explicit passing of root node. The root node is an invisible node, i.e. the first level of visible tree nodes are the nodes below the root node. -
FIXGRIDTreeBinding
-
-
Method Details
-
removeNode
Removes node from tree - together with all of its subnodes. If the node or one of its contained subnodes is currently selected then the selection is removed automatically. -
setSbvalue
public void setSbvalue(int value) Description copied from class:FIXGRIDBinding
Sets the top index of the grid. Using this method you can scroll the grid to any top position. Please make sure that the value passed is a correct index into your grid.- Overrides:
setSbvalue
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
getFoldersAlwaysSortedToTop
public boolean getFoldersAlwaysSortedToTop() -
setFoldersAlwaysSortedToTop
public void setFoldersAlwaysSortedToTop(boolean foldersAlwaysSortedToTop) If property is set to true then during sorting folder nodes are always arranged on top of leave nodes.
Default is "false". -
getRows
Passes back the currently visible nodes to the client.- Specified by:
getRows
in interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
getSbmaximum
public int getSbmaximum()Size of nodes that determine the scroll bar size.- Specified by:
getSbmaximum
in interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
setRootNode
Sets the root node - this method needs to be called with great care: setting a new root node will remove the current tree and replace it by another. Normally the root node is created or passed at construction point of time - and not changed during the life cycle of the object. -
getRootNode
Gets the root node. The root node is not visible to the user (the first visible hierarchy layer is the one below the root node. -
ensureItemToBeDisplayed
Ensures that the passed item is displayed within the tree. Two consequences: the tree will get opened correspondingly, and the tree may be scrolled.- Specified by:
ensureItemToBeDisplayed
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
sortGrid
Description copied from class:FIXGRIDBinding
Actual sorting of grid. This method needs to be overridden by grid implementations.- Specified by:
sortGrid
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
sortGridByOriginalIndex
protected void sortGridByOriginalIndex()Description copied from class:FIXGRIDBinding
In case the grid is supporting "triplesort": this is the method to sort the grid by its original index- Specified by:
sortGridByOriginalIndex
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
sortNodes
protected void sortNodes(FIXGRIDTreeItem node, String sortReference, String objectBindingString, boolean ascending) -
sortNodesByOriginalIndex
-
applyOriginalIndexToCurrentContent
public void applyOriginalIndexToCurrentContent()Description copied from interface:IFIXGRIDBinding
When using triple state sorting then the original index of the items needs to be stored in the items. This method assigns this original index.- Specified by:
applyOriginalIndexToCurrentContent
in interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
applyOriginalIndexToCurrentNode
-
setSbvisibleamount
public void setSbvisibleamount(int value) Description copied from class:FIXGRIDBinding
Internal use only.- Specified by:
setSbvisibleamount
in interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
- Overrides:
setSbvisibleamount
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
renderingBegins
public void renderingBegins()Description copied from class:FIXGRIDBinding
This method is called with each request processing - at the beginning of the processing.- Specified by:
renderingBegins
in interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
- Overrides:
renderingBegins
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
expandAll
public void expandAll(javax.faces.event.ActionEvent event) Same method as expandAll without parameters - but directly usable as action listener. This method directly calls expandAll(). -
collapseAll
public void collapseAll(javax.faces.event.ActionEvent event) Same method as collapseAll() without parameters - but directly usable as action listener. This method directly calls collapseAll(). -
expandTopNodes
public void expandTopNodes(javax.faces.event.ActionEvent event) Same method as expandTopNodes() without parameter - but directly usable as action listener. -
collapseTopNodes
public void collapseTopNodes(javax.faces.event.ActionEvent event) Same method as collapseTopNodes() without parameter - but directly usable as action listener. -
expandAll
public void expandAll()Expands the whole tree, so that all items are shown. In case the tree is not fully loaded then the corresponding toggle events are passed to the tree processing. The method simulates the normal toggle-processing that is normally executed by the user. -
collapseAll
public void collapseAll()Collapses all nodes which are currently loaded. -
expandTopNodes
public void expandTopNodes()Expands top nodes. -
collapseTopNodes
public void collapseTopNodes()Collapses top nodes. -
getNodeTextsFromTop
Passes back a list of texts representing the texts from the top node down to the node that is passed as parameter. The list can be used afterwards to select an item by text. -
getItemByText
Passes back a node that is represented by the passed text list. The text list contains all texts of the node: from the top node down to the node that you want to retrieve. -
getSelectedItemsAsSequence
Returns all selected items in the sequence they occur within the grid. Use getSelectedItems() returning a Set for normal operations - it is much faster. Only use this method when really requiring the order of items. -
fillShiftSelection
protected void fillShiftSelection()Description copied from class:FIXGRIDBinding
Default implementation: no shift selection, but just normal selection- Overrides:
fillShiftSelection
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
getListOfItems
Description copied from class:FIXGRIDBinding
Returns all items of the current grid in the sequence of their visual appearance. This is the central method that is accessed by generic grid functions, e.g. export functions.
You may override this function when you load your grid data step by step - the caller of this function expects all items to be available.- Specified by:
getListOfItems
in classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
triggerRowsUpdate
protected void triggerRowsUpdate()This method is called every time something happens in the tree that requires a rebuild of buffers that are required within the building up of visible items in the method getRows().
-