Package javax.swing

Examples of javax.swing.JTable.changeSelection()


          final JTable source = (JTable) e.getSource();
          final int row = source.rowAtPoint(e.getPoint());
          final int column = source.columnAtPoint(e.getPoint());

          if (!source.isRowSelected(row)) {
            source.changeSelection(row, column, false, false);
          }

          popup.show(e.getComponent(), e.getX(), e.getY());
        }
      }
View Full Code Here


          final JTable source = (JTable) e.getSource();
          final int row = source.rowAtPoint(e.getPoint());
          final int column = source.columnAtPoint(e.getPoint());

          if (!source.isRowSelected(row)) {
            source.changeSelection(row, column, false, false);
          }

          popup.show(e.getComponent(), e.getX(), e.getY());
        }
      }
View Full Code Here

    public void performAction() {
        JTable table = (JTable)this._component;
        if (table!=null && table.getRowCount() >= this.value && this.value > 0)
          // CraigM:20/08/2008 - Actually change the selection so the focus will move
            // table.addRowSelectionInterval(this.value-1, this.value-1);
          table.changeSelection(this.value-1, 0, false, false);
    }
    /**
     * Set the current row for the passed table. The passed index is one-based and should
     * be in the range 1 <= value <= comp.getRowCount otherwise this method will have no
     * effect.
 
View Full Code Here

    public void performAction() {
        JTable table = (JTable)this._component;
        if (table!=null && table.getRowCount() >= this.value && this.value > 0)
          // CraigM:20/08/2008 - Actually change the selection so the focus will move
            // table.addRowSelectionInterval(this.value-1, this.value-1);
          table.changeSelection(this.value-1, 0, false, false);
    }
    /**
     * Set the current row for the passed table. The passed index is one-based and should
     * be in the range 1 <= value <= comp.getRowCount otherwise this method will have no
     * effect.
 
View Full Code Here

                int row = ((ParameterHolder)ev.getParameter("row")).getInt()-1
                int col = ((ParameterHolder)ev.getParameter("column")).getInt()-1
                table.requestFocusInWindow();
                if (table.getCellEditor()!= null)
                    table.getCellEditor().cancelCellEditing();
                table.changeSelection(row, col,  false, false);
                //FormattedCellEditor ed = (FormattedCellEditor)table.getCellEditor(row, col);
                table.editCellAt(row, col);

            }
        } else {
View Full Code Here

            if (rowIndex > -1) {
                // ((ArrayFieldModel)tableModel).table.setRowSelectionInterval(rowIndex, rowIndex);
              // DK:24/02/2009:select the row and scroll to ensure the row is currently visible in ScrollPane
              final JTable table = ((ArrayFieldModel)tableModel).table;
        table.setAutoscrolls(true);
                table.changeSelection(rowIndex, table.getSelectedColumn(), false, false);
                table.setAutoscrolls(false);
            }
        }
    }
View Full Code Here

            if (rowIndex > -1) {
                // ((ArrayFieldModel)tableModel).table.setRowSelectionInterval(rowIndex, rowIndex);
              // DK:24/02/2009:select the row and scroll to ensure the row is currently visible in ScrollPane
              final JTable table = ((ArrayFieldModel)tableModel).table;
        table.setAutoscrolls(true);
                table.changeSelection(rowIndex, table.getSelectedColumn(), false, false);
                table.setAutoscrolls(false);
            }
        }
    }
View Full Code Here

    public void performAction() {
        JTable table = (JTable)this._component;
        if (table!=null && table.getRowCount() >= this.value && this.value > 0)
          // CraigM:20/08/2008 - Actually change the selection so the focus will move
            // table.addRowSelectionInterval(this.value-1, this.value-1);
          table.changeSelection(this.value-1, 0, false, false);
    }
    /**
     * Set the current row for the passed table. The passed index is one-based and should
     * be in the range 1 <= value <= comp.getRowCount otherwise this method will have no
     * effect.
 
View Full Code Here

                int row = ((ParameterHolder)ev.getParameter("row")).getInt()-1
                int col = ((ParameterHolder)ev.getParameter("column")).getInt()-1
                table.requestFocusInWindow();
                if (table.getCellEditor()!= null)
                    table.getCellEditor().cancelCellEditing();
                table.changeSelection(row, col,  false, false);
                //FormattedCellEditor ed = (FormattedCellEditor)table.getCellEditor(row, col);
                table.editCellAt(row, col);

            }
        } else {
View Full Code Here

            if (rowIndex > -1) {
                // ((ArrayFieldModel)tableModel).table.setRowSelectionInterval(rowIndex, rowIndex);
              // DK:24/02/2009:select the row and scroll to ensure the row is currently visible in ScrollPane
              final JTable table = ((ArrayFieldModel)tableModel).table;
        table.setAutoscrolls(true);
                table.changeSelection(rowIndex, table.getSelectedColumn(), false, false);
                table.setAutoscrolls(false);
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.