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.SortInfoHashMap, FIXGRIDBinding.TextSearcherNested classes/interfaces inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
IFIXGRIDBinding.FIXGRIDSortInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FIXGRIDTreeItemstatic booleanWhen 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_ODS, CONTENTTYPE_EXPORT_PDF, CONTENTTYPE_EXPORT_TAB, CONTENTTYPE_EXPORT_XLSX, CONTENTTYPE_EXPORT_XML, DUMMY_FIXGRIDSORTINFO, 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_thisFields inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
SORT_ASCENDING, SORT_DESCENDING, SORT_UNSORTED -
Constructor Summary
ConstructorsConstructorDescriptionFIXGRIDTreeBinding(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 TypeMethodDescriptionvoidWhen using triple state sorting then the original index of the items needs to be stored in the items.protected voidvoidCollapses all nodes which are currently loaded.voidcollapseAll(ActionEvent event) Same method as collapseAll() without parameters - but directly usable as action listener.voidCollapses top nodes.voidcollapseTopNodes(ActionEvent event) Same method as collapseTopNodes() without parameter - but directly usable as action listener.voidEnsures that the passed item is displayed within the tree.voidExpands the whole tree, so that all items are shown.voidexpandAll(ActionEvent event) Same method as expandAll without parameters - but directly usable as action listener.voidExpands top nodes.voidexpandTopNodes(ActionEvent event) Same method as expandTopNodes() without parameter - but directly usable as action listener.protected voidDefault implementation: no shift selection, but just normal selectionbooleangetItemByText(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.intSize of nodes that determine the scroll bar size.Returns all selected items in the sequence they occur within the grid.voidremoveNode(FIXGRIDTreeItem node) Removes node from tree - together with all of its subnodes.voidThis method is called with each request processing - at the beginning of the processing.voidsetFoldersAlwaysSortedToTop(boolean foldersAlwaysSortedToTop) If property is set to true then during sorting folder nodes are always arranged on top of leave nodes.voidsetRootNode(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.voidsetSbvalue(int value) Sets the top index of the grid.voidsetSbvisibleamount(int value) Internal use only.protected voidActual sorting of grid by one column.protected voidIn case the grid is supporting "triplesort": this is the method to sort the grid by its original indexprotected voidsortNodes(FIXGRIDTreeItem node, String sortReference, String objectBindingString, boolean ascending) protected voidprotected voidThis 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().protected voidMakes sure that all childrens' level is set to "node's own level plus 1".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, findCurrentSortInfo, findHighestSortSequence, findSortComparatorForColumnValue, findSortInfoForSortSequence, 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, getToBeAccessedNodeUnitValue, 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, sort, storePersistentData, storePersistentData, storePersistentDataImplicitly, unhighlightAllCells, updateHighlightMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclnt.jsfserver.elements.IConfiguredByLayout
addConfiguredByLayoutListener, removeConfiguredByLayoutListenerMethods inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
checkIfChangeIndexIsSupported, getClientvisibleamount, getColumnsequence, getConnectedBinding, getExportableColumns, getExportableColumns, getFixgridComponent, 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:FIXGRIDBindingSets 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:
setSbvaluein 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:
getRowsin interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
getSbmaximum
public int getSbmaximum()Size of nodes that determine the scroll bar size.- Specified by:
getSbmaximumin 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:
ensureItemToBeDisplayedin classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
sortGrid
Description copied from class:FIXGRIDBindingActual sorting of grid by one column. This method needs to be overridden by grid implementations.- Specified by:
sortGridin classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
sortGridByOriginalIndex
protected void sortGridByOriginalIndex()Description copied from class:FIXGRIDBindingIn case the grid is supporting "triplesort": this is the method to sort the grid by its original index- Specified by:
sortGridByOriginalIndexin 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:IFIXGRIDBindingWhen 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:
applyOriginalIndexToCurrentContentin interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
applyOriginalIndexToCurrentNode
-
setSbvisibleamount
public void setSbvisibleamount(int value) Description copied from class:FIXGRIDBindingInternal use only.- Specified by:
setSbvisibleamountin interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>- Overrides:
setSbvisibleamountin classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
renderingBegins
public void renderingBegins()Description copied from class:FIXGRIDBindingThis method is called with each request processing - at the beginning of the processing.- Specified by:
renderingBeginsin interfaceIFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>- Overrides:
renderingBeginsin classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
expandAll
Same method as expandAll without parameters - but directly usable as action listener. This method directly calls expandAll(). -
collapseAll
Same method as collapseAll() without parameters - but directly usable as action listener. This method directly calls collapseAll(). -
expandTopNodes
Same method as expandTopNodes() without parameter - but directly usable as action listener. -
collapseTopNodes
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:FIXGRIDBindingDefault implementation: no shift selection, but just normal selection- Overrides:
fillShiftSelectionin classFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>
-
getListOfItems
Description copied from class:FIXGRIDBindingReturns 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:
getListOfItemsin 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(). -
updateLevelOfChildrenIfRequired
Makes sure that all childrens' level is set to "node's own level plus 1". With drill down.
-