@Override protected void setExpandedState(TreePath path, boolean state) { treeTable.getTreeTableHacker().completeEditing(); super.setExpandedState(path, state); treeTable.getTreeTableHacker().expansionChanged(); }
@Override protected void setExpandedState(TreePath path, boolean state) { // JW: fix for #1126 - CellEditors are removed immediately after starting an // edit if they involve a change of selection and the // expandsOnSelection property is true // back out if the selection change does not cause a change in // expansion state if (isExpanded(path) == state) return; // on change of expansion state, the editor's row might be changed // for simplicity, it's stopped always (even if the row is not changed) treeTable.getTreeTableHacker().completeEditing(); super.setExpandedState(path, state); treeTable.getTreeTableHacker().expansionChanged(); }
@Override protected void setExpandedState(TreePath path, boolean state) { // JW: fix for #1126 - CellEditors are removed immediately after starting an // edit if they involve a change of selection and the // expandsOnSelection property is true // back out if the selection change does not cause a change in // expansion state if (isExpanded(path) == state) return; // on change of expansion state, the editor's row might be changed // for simplicity, it's stopped always (even if the row is not changed) treeTable.getTreeTableHacker().completeEditing(); super.setExpandedState(path, state); treeTable.getTreeTableHacker().expansionChanged(); }
@Override protected void setExpandedState(TreePath path, boolean state) { // JW: fix for #1126 - CellEditors are removed immediately after starting an // edit if they involve a change of selection and the // expandsOnSelection property is true // back out if the selection change does not cause a change in // expansion state if (isExpanded(path) == state) return; // on change of expansion state, the editor's row might be changed // for simplicity, it's stopped always (even if the row is not changed) treeTable.getTreeTableHacker().completeEditing(); super.setExpandedState(path, state); treeTable.getTreeTableHacker().expansionChanged(); }
@Override protected void setExpandedState(TreePath path, boolean state) { // JW: fix for #1126 - CellEditors are removed immediately after starting an // edit if they involve a change of selection and the // expandsOnSelection property is true // back out if the selection change does not cause a change in // expansion state if (isExpanded(path) == state) return; // on change of expansion state, the editor's row might be changed // for simplicity, it's stopped always (even if the row is not changed) treeTable.getTreeTableHacker().completeEditing(); super.setExpandedState(path, state); treeTable.getTreeTableHacker().expansionChanged(); }
/** * Overridden to enable hit handle detection a mouseEvent which triggered * a expand/collapse. */ @Override protected void processMouseEvent(MouseEvent e) { // BasicTableUI selects on released if the pressed had been // consumed. So we try to fish for the accompanying released // here and consume it as wll. if ((e.getID() == MouseEvent.MOUSE_RELEASED) && consumedOnPress) { consumedOnPress = false; e.consume(); return; } if (getTreeTableHacker().hitHandleDetectionFromProcessMouse(e)) { // Issue #332-swing: hacking around selection loss. // prevent the // _table_ selection by consuming the mouseEvent // if it resulted in a expand/collapse consumedOnPress = true; e.consume(); return; } consumedOnPress = false; super.processMouseEvent(e); }
/** * Overridden to enable hit handle detection a mouseEvent which triggered * a expand/collapse. */ @Override protected void processMouseEvent(MouseEvent e) { // BasicTableUI selects on released if the pressed had been // consumed. So we try to fish for the accompanying released // here and consume it as wll. if ((e.getID() == MouseEvent.MOUSE_RELEASED) && consumedOnPress) { consumedOnPress = false; e.consume(); return; } if (getTreeTableHacker().hitHandleDetectionFromProcessMouse(e)) { // Issue #332-swing: hacking around selection loss. // prevent the // _table_ selection by consuming the mouseEvent // if it resulted in a expand/collapse consumedOnPress = true; e.consume(); return; } consumedOnPress = false; super.processMouseEvent(e); }
/** * Overridden to enable hit handle detection a mouseEvent which triggered * a expand/collapse. */ @Override protected void processMouseEvent(MouseEvent e) { // BasicTableUI selects on released if the pressed had been // consumed. So we try to fish for the accompanying released // here and consume it as wll. if ((e.getID() == MouseEvent.MOUSE_RELEASED) && consumedOnPress) { consumedOnPress = false; e.consume(); return; } if (getTreeTableHacker().hitHandleDetectionFromProcessMouse(e)) { // Issue #332-swing: hacking around selection loss. // prevent the // _table_ selection by consuming the mouseEvent // if it resulted in a expand/collapse consumedOnPress = true; e.consume(); return; } consumedOnPress = false; super.processMouseEvent(e); }
/** * Overridden to enable hit handle detection a mouseEvent which triggered * a expand/collapse. */ @Override protected void processMouseEvent(MouseEvent e) { // BasicTableUI selects on released if the pressed had been // consumed. So we try to fish for the accompanying released // here and consume it as wll. if ((e.getID() == MouseEvent.MOUSE_RELEASED) && consumedOnPress) { consumedOnPress = false; e.consume(); return; } if (getTreeTableHacker().hitHandleDetectionFromProcessMouse(e)) { // Issue #332-swing: hacking around selection loss. // prevent the // _table_ selection by consuming the mouseEvent // if it resulted in a expand/collapse consumedOnPress = true; e.consume(); return; } consumedOnPress = false; super.processMouseEvent(e); }
/** * Overridden to enable hit handle detection a mouseEvent which triggered * a expand/collapse. */ @Override protected void processMouseEvent(MouseEvent e) { // BasicTableUI selects on released if the pressed had been // consumed. So we try to fish for the accompanying released // here and consume it as wll. if ((e.getID() == MouseEvent.MOUSE_RELEASED) && consumedOnPress) { consumedOnPress = false; e.consume(); return; } if (getTreeTableHacker().hitHandleDetectionFromProcessMouse(e)) { // Issue #332-swing: hacking around selection loss. // prevent the // _table_ selection by consuming the mouseEvent // if it resulted in a expand/collapse consumedOnPress = true; e.consume(); return; } consumedOnPress = false; super.processMouseEvent(e); }
/** * Overriden to invoke repaint for the particular location if * the column contains the tree. This is done as the tree editor does * not fill the bounds of the cell, we need the renderer to paint * the tree in the background, and then draw the editor over it. * You should not need to call this method directly. <p> * * Additionally, there is tricksery involved to expand/collapse * the nodes. * * {@inheritDoc} */ @Override public boolean editCellAt(int row, int column, EventObject e) { getTreeTableHacker().hitHandleDetectionFromEditCell(column, e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; }
/** * Overriden to invoke repaint for the particular location if * the column contains the tree. This is done as the tree editor does * not fill the bounds of the cell, we need the renderer to paint * the tree in the background, and then draw the editor over it. * You should not need to call this method directly. <p> * * Additionally, there is tricksery involved to expand/collapse * the nodes. * * {@inheritDoc} */ @Override public boolean editCellAt(int row, int column, EventObject e) { getTreeTableHacker().hitHandleDetectionFromEditCell(column, e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; }
/** * Overriden to invoke repaint for the particular location if * the column contains the tree. This is done as the tree editor does * not fill the bounds of the cell, we need the renderer to paint * the tree in the background, and then draw the editor over it. * You should not need to call this method directly. <p> * * Additionally, there is tricksery involved to expand/collapse * the nodes. * * {@inheritDoc} */ @Override public boolean editCellAt(int row, int column, EventObject e) { getTreeTableHacker().hitHandleDetectionFromEditCell(column, e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; }
/** * Overriden to invoke repaint for the particular location if * the column contains the tree. This is done as the tree editor does * not fill the bounds of the cell, we need the renderer to paint * the tree in the background, and then draw the editor over it. * You should not need to call this method directly. <p> * * Additionally, there is tricksery involved to expand/collapse * the nodes. * * {@inheritDoc} */ @Override public boolean editCellAt(int row, int column, EventObject e) { getTreeTableHacker().hitHandleDetectionFromEditCell(column, e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; }
/** * Overriden to invoke repaint for the particular location if * the column contains the tree. This is done as the tree editor does * not fill the bounds of the cell, we need the renderer to paint * the tree in the background, and then draw the editor over it. * You should not need to call this method directly. <p> * * Additionally, there is tricksery involved to expand/collapse * the nodes. * * {@inheritDoc} */ @Override public boolean editCellAt(int row, int column, EventObject e) { getTreeTableHacker().hitHandleDetectionFromEditCell(column, e); // RG: Fix Issue 49! boolean canEdit = super.editCellAt(row, column, e); if (canEdit && isHierarchical(column)) { repaint(getCellRect(row, column, false)); } return canEdit; }