Class JXTreeTable.TreeTableHackerExt3

  • Enclosing class:
    JXTreeTable

    public class JXTreeTable.TreeTableHackerExt3
    extends JXTreeTable.TreeTableHackerExt2
    A more (or less, depending in pov :-) aggressiv hacker. Compared to super, it dispatches less events to address open issues.

    Issue #474-swingx: double click should start edit (not expand/collapse) changed mightBeExpansionTrigger to filter out clickCounts > 1

    Issue #875-swingx: cell selection mode changed the dispatch to do so only if mouse event outside content box and leading

    Issue #1169-swingx: remove 1.5 dnd hack removed the additional dispatch here and changed in the implementation of hackAroundDragEnabled to no longer look for the system property (it's useless even if set)

    Author:
    tiberiu@dev.java.net
    • Constructor Detail

      • TreeTableHackerExt3

        public TreeTableHackerExt3()
    • Method Detail

      • expandOrCollapseNode

        protected boolean expandOrCollapseNode​(int column,
                                               EventObject e)
        Description copied from class: JXTreeTable.TreeTableHacker
        Tricksery to make the tree expand/collapse.

        This might be - indirectly - called from one of two places:

        1. editCellAt: original, stable but buggy (#332, #222) the table's own selection had been changed due to the click before even entering into editCellAt so all tree selection state is lost.
        2. processMouseEvent: the idea is to catch the mouseEvent, check if it triggered an expanded/collapsed, consume and return if so or pass to super if not.

        widened access for testing ...

        Overrides:
        expandOrCollapseNode in class JXTreeTable.TreeTableHackerExt2
        Parameters:
        column - the column index under the event, if any.
        e - the event which might trigger a expand/collapse.
        Returns:
        this methods evaluation as to whether the event triggered a expand/collaps