org.eclnt.jsfserver.elements.impl

## 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:
    java.io.Serializable, IFIXGRIDBinding<ItemClass>, IDynamicContentBindingObject

      public class FIXGRIDTreeBinding<ItemClass extends FIXGRIDTreeItem>
      extends FIXGRIDBinding<ItemClass>
      implements java.io.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:
    Serialized Form

- - ### 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected FIXGRIDTreeItem` | `m_rootNode`
    `static boolean` | `s_supportAutoScrollOnToggle` 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

      `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

    Constructors
    Constructor and Description
    `FIXGRIDTreeBinding()`
    `FIXGRIDTreeBinding(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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `collapseAll()` Collapses all nodes which are currently loaded.
    `void` | `collapseAll(ActionEvent event)` Same method as collapseAll() without parameters - but directly usable as action listener.
    `void` | `collapseTopNodes()` Collapses top nodes.
    `void` | `collapseTopNodes(ActionEvent event)` Same method as collapseTopNodes() without parameter - but directly usable as action listener.
    `void` | `ensureItemToBeDisplayed(ItemClass item)` Ensures that the passed item is displayed within the tree.
    `void` | `expandAll()` Expands the whole tree, so that all items are shown.
    `void` | `expandAll(ActionEvent event)` Same method as expandAll without parameters - but directly usable as action listener.
    `void` | `expandTopNodes()` Expands top nodes.
    `void` | `expandTopNodes(ActionEvent event)` Same method as expandTopNodes() without parameter - but directly usable as action listener.
    `protected void` | `fillShiftSelection()` Default implementation: no shift selection, but just normal selection
    `boolean` | `getFoldersAlwaysSortedToTop()`
    `ItemClass` | `getItemByText(java.util.List<java.lang.String> itemTexts)` Passes back a node that is represented by the passed text list.
    `protected java.util.List<ItemClass>` | `getListOfItems()` Returns all items of the current grid in the sequence of their visual appearance.
    `java.util.List<java.lang.String>` | `getNodeTextsFromTop(FIXGRIDTreeItem item)` Passes back a list of texts representing the texts from the top node down to the node that is passed as parameter.
    `FIXGRIDTreeItem` | `getRootNode()` Gets the root node.
    `java.util.List` | `getRows()` Passes back the currently visible nodes to the client.
    `int` | `getSbmaximum()` Size of nodes that determine the scroll bar size.
    `java.util.Collection<ItemClass>` | `getSelectedItemsAsSequence()` 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` | `renderingBegins()` 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` | `sortGrid(java.lang.String sortReference, java.lang.String objectBindingString, boolean ascending)` Actual sorting of grid.
    `protected void` | `sortNodes(FIXGRIDTreeItem node, java.lang.String sortReference, java.lang.String objectBindingString, boolean ascending)`
    `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().

    - ### Methods inherited from class org.eclnt.jsfserver.elements.impl.FIXGRIDBinding

      `applyPersistentData, checkIfCellsAreHighlighted, checkIfChangeIndexIsSupported, 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, getListOfExportItems, getModcolumnwidths, getModcolumnwidthsAsArray, getMouseButtonOfLastSelection, getNewClientHorizontalScrollPosition, getObjecttobevisibleOfItems, getOriginalcolumnwidths, getOriginalcolumnwidthsAsArray, getRowDataUI, getSbvalue, getSbvisibleamount, getScrollHelper, getSelectedItem, getSelectedItems, getShiftPressedOfLastSelection, getSortInfo, getSortInfoForReference, getTextSearcher, getToBeAccessedNode, getToBeAccessedNodeExpression, getToBeAccessedNodeFormatmaskValue, getToBeAccessedNodeFormattedValue, getToBeAccessedNodeFormatValue, getToBeAccessedNodeStringValue, getToBeAccessedNodeTimezoneValue, getToBeAccessedNodeValue, getVisibleColumns, getVisibleColumns, init_CONTENTTYPE_EXPORT_CSV, init_CONTENTTYPE_EXPORT_PDF, init_CONTENTTYPE_EXPORT_XLSX, init_CONTENTTYPE_EXPORT_XML, initialize, initPopupEditColumnDetailsUndecorated, initPopupGridFunctionsUndecorated, initTextSearcherShowSearchInfoPopup, isCurrentlyProcessingGridAction, isInitialized, isItemSelected, moveUpDown, onClearCellHighlight, onColumnSequenceUpdated, onColumnWidthsUpdated, onDrop, onEditColumnDetails, onFirstLineUp, onGridAction, onGridActionExecute, onLastLineDown, onOpenGridExportFunctions, onOpenGridFunctions, onPopupMenuItem, onPopupMenuLoad, onSelectionUpdateByClientActivity, onSelectorTitleIconInvoked, openEditColumnDetailsPopup, openGridExportFunctionsPopup, openGridFunctionsPopup, passComponentData, processMultipleSort, processMultipleSort, processSearch, processSort, resort, scrollHorizontallyToLastClientPosition, scrollHorizontallyToPosition, selectAndFocusItem, selectItem, selectItem, setClientvisibleamount, setColumnIndexOfLastSelection, setColumnIndexOfLastSelection, setColumnsequence, setCurrentHorizontalScrollPosition, setCurrentlyProcessingGridAction, setDefaultColumnsequence, setIndextobevisibleOfItems, setModcolumnwidth, setModcolumnwidths, setModcolumnwidthsArray, setModcolumnwidthsList, setObjecttobevisibleOfItems, setSbvalue, setSbvalue, setToBeAccessedNode, sort, 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.impl.IFIXGRIDBinding

      `checkIfChangeIndexIsSupported, getClientvisibleamount, getColumnsequence, getConnectedBinding, getExportableColumns, getExportableColumns, getIndextobevisibleOfItems, getModcolumnwidths, getNewClientHorizontalScrollPosition, getObjecttobevisibleOfItems, getSbvalue, getSbvisibleamount, getSortInfo, getSortInfoForReference, getVisibleColumns, getVisibleColumns, passComponentData, setClientvisibleamount, setColumnIndexOfLastSelection, setColumnIndexOfLastSelection, setColumnsequence, setCurrentHorizontalScrollPosition, setIndextobevisibleOfItems, setModcolumnwidths, setObjecttobevisibleOfItems, setSbvalue`

- - ### Field Detail

    - #### s_supportAutoScrollOnToggle

          public static boolean s_supportAutoScrollOnToggle

      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.

    - #### m_rootNode

          protected FIXGRIDTreeItem m_rootNode

  - ### Constructor Detail

    - #### FIXGRIDTreeBinding

          public FIXGRIDTreeBinding()

    - #### FIXGRIDTreeBinding

          public FIXGRIDTreeBinding(boolean changeIndexIsSupported)

      Constructor which allows to switch on performance optimized data management. See `FIXGRIDBinding.FIXGRIDBinding(boolean)`.

    - #### FIXGRIDTreeBinding

          public FIXGRIDTreeBinding(FIXGRIDTreeItem rootNode)

      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

          public FIXGRIDTreeBinding(FIXGRIDTreeItem rootNode,
                                    boolean changeIndexIsSupported)

  - ### Method Detail

    - #### removeNode

          public void removeNode(FIXGRIDTreeItem node)

      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 class `FIXGRIDBinding<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

          public java.util.List getRows()

      Passes back the currently visible nodes to the client.
      Specified by:
        `getRows` in interface `IFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### getSbmaximum

          public int getSbmaximum()

      Size of nodes that determine the scroll bar size.
      Specified by:
        `getSbmaximum` in interface `IFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### setRootNode

          public 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. Normally the root node is created or passed at construction point of time - and not changed during the life cycle of the object.

    - #### getRootNode

          public FIXGRIDTreeItem 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

          public void ensureItemToBeDisplayed(ItemClass item)

      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 class `FIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### sortGrid

          protected void sortGrid(java.lang.String sortReference,
                                  java.lang.String objectBindingString,
                                  boolean ascending)

      Description copied from class: `FIXGRIDBinding`
      Actual sorting of grid. This method needs to be overridden by grid implementations.
      Specified by:
        `sortGrid` in class `FIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### sortNodes

          protected void sortNodes(FIXGRIDTreeItem node,
                                   java.lang.String sortReference,
                                   java.lang.String objectBindingString,
                                   boolean ascending)

    - #### setSbvisibleamount

          public void setSbvisibleamount(int value)

      Description copied from class: `FIXGRIDBinding`
      Internal use only.
      Specified by:
        `setSbvisibleamount` in interface `IFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`
      Overrides:
        `setSbvisibleamount` in class `FIXGRIDBinding<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 interface `IFIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`
      Overrides:
        `renderingBegins` in class `FIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### expandAll

          public void expandAll(ActionEvent event)

      Same method as expandAll without parameters - but directly usable as action listener. This method directly calls expandAll().

    - #### collapseAll

          public void collapseAll(ActionEvent event)

      Same method as collapseAll() without parameters - but directly usable as action listener. This method directly calls collapseAll().

    - #### expandTopNodes

          public void expandTopNodes(ActionEvent event)

      Same method as expandTopNodes() without parameter - but directly usable as action listener.

    - #### collapseTopNodes

          public void collapseTopNodes(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

          public java.util.List<java.lang.String> getNodeTextsFromTop(FIXGRIDTreeItem item)

      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

          public ItemClass getItemByText(java.util.List<java.lang.String> itemTexts)

      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

          public java.util.Collection<ItemClass> 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 class `FIXGRIDBinding<ItemClass extends FIXGRIDTreeItem>`

    - #### getListOfItems

          protected java.util.List<ItemClass> 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 class `FIXGRIDBinding<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().

Copyright © CaptainCasa Gmbh. All Rights Reserved.