Lines Matching defs:row

80  *          public Object getValueAt(int row, int col) { return new Integer(row*col); }
97 * You can set up a row sorter in either of two ways:
133 * the column and row indexes returned by various <code>JTable</code> methods
154 * conversions will be necessary when using the row based methods of
156 * All of <code>JTable</code>s row based methods are in terms of the
174 * selection and variable row heights in terms of the model on
175 * sorting. For example if row 0, in terms of the underlying model,
176 * is currently selected, after the sort row 0, in terms of the
180 * visible or was removed. For example, if row 0 in terms of model
286 /** The <code>ListSelectionModel</code> of the table, used to keep track of row selections. */
292 /** The height in pixels of each row in the table. */
295 /** The height in pixels of the margin between the cells in each row. */
323 /** True if row selection is allowed in this table. */
334 * If true, both a row selection and a column selection
336 * the cells whose row and column are both selected.
353 /** Identifies the row of the cell being edited. */
393 * The last value of getValueIsAdjusting from the row selection models
458 private final int row;
463 private DropLocation(Point p, int row, int col,
467 this.row = row;
474 * Returns the row index where a dropped item should be placed in the
478 * row should be inserted. Otherwise, it represents the value
479 * of an existing row on which the data was dropped. This index is
483 * and no row could be calculated.
485 * @return the drop row
488 return row;
503 * @return the drop row
511 * of a row.
513 * @return whether or not this is an insert row
540 + "row=" + row + ","
603 * @param sm the row selection model for the table
658 * should contain the values for that row. In other words,
659 * the value of the cell at row 1, column 5 can be obtained
674 * <code>rowData</code> is an array of rows, so the value of the cell at row 1,
689 public Object getValueAt(int row, int col) { return rowData[row][col]; }
690 public boolean isCellEditable(int row, int column) { return true; }
691 public void setValueAt(Object value, int row, int col) {
692 rowData[row][col] = value;
693 fireTableCellUpdated(row, col);
917 * The height of the cells will be equal to the row height minus
918 * the row margin.
920 * @param rowHeight new row height
926 * description: The height of the specified row.
930 throw new IllegalArgumentException("New row height less than 1");
944 * Returns the height of a table row, in pixels.
946 * @return the height in pixels of a table row
961 * Sets the height for <code>row</code> to <code>rowHeight</code>,
962 * revalidates, and repaints. The height of the cells in this row
963 * will be equal to the row height minus the row margin.
965 * @param row the row whose height is being
967 * @param rowHeight new row height, in pixels
972 * description: The height in pixels of the cells in <code>row</code>
975 public void setRowHeight(int row, int rowHeight) {
977 throw new IllegalArgumentException("New row height less than 1");
979 getRowModel().setSize(row, rowHeight);
981 sortManager.setViewRowHeight(row, rowHeight);
987 * Returns the height, in pixels, of the cells in <code>row</code>.
988 * @param row the row whose height is to be returned
989 * @return the height, in pixels, of the cells in the row
992 public int getRowHeight(int row) {
993 return (rowModel == null) ? getRowHeight() : rowModel.getSize(row);
999 * @param rowMargin the number of pixels between cells in a row
1015 * @return the number of pixels between cells in a row
1524 int row = rowAtPoint(p);
1527 && SwingUtilities2.pointOutsidePrefSize(this, row, col, p);
1529 Rectangle rect = getCellRect(row, col, true);
1537 if (row == -1 || col == -1 || outside) {
1540 location = new DropLocation(p, row, col, false, false);
1544 if (row == -1 && col == -1) {
1551 if (row == -1) {
1564 row++;
1568 location = new DropLocation(p, row,
1573 row++;
1576 location = new DropLocation(p, row, col, true, false);
1581 if (row == -1 && col == -1) {
1586 if (row == -1) {
1592 row++;
1595 location = new DropLocation(p, row, col, true, false);
1598 if (row == -1 && col == -1) {
1603 if (row == -1) {
1612 row++;
1616 location = new DropLocation(p, row, col, between, false);
1619 if (row == -1) {
1633 location = new DropLocation(p, row, col, false, true);
1636 if (row == -1) {
1642 location = new DropLocation(p, row, getColumnCount(), false, true);
1654 location = new DropLocation(p, row, col, false, between);
1657 if (row == -1 && col == -1) {
1664 if (row == -1) {
1680 row++;
1684 location = new DropLocation(p, row,
1746 for (int row : rows) {
1747 addRowSelectionInterval(row, row);
1826 * TableRowSorter} is created and set as the table's row sorter.
1894 * This method clears the selection and resets any variable row heights.
1948 * column and row selection. When setting states,
1950 * updates the mode for the row selection model but also sets similar
1952 * If you want to have the row and column selection models operating
1955 * Both the row and column selection models for <code>JTable</code>
1963 * description: The selection mode used by the row and column selection models.
1977 * @param rowSelectionAllowed true if this model will allow row selection
1982 * description: If true, an entire row is selected for each selected cell.
2034 * row selection to exist simultaneously. When set,
2035 * the table treats the intersection of the row and column selection
2042 * @param cellSelectionEnabled true if simultaneous row and column
2061 * Returns true if both row and column selection models are enabled.
2065 * @return true if both row and column selection models are enabled
2135 private int getAdjustedIndex(int index, boolean row) {
2136 int compare = row ? getRowCount() : getColumnCount();
2140 private int boundRow(int row) throws IllegalArgumentException {
2141 if (row < 0 || row >= getRowCount()) {
2144 return row;
2236 * Returns the index of the first selected row, -1 if no row is selected.
2237 * @return the index of the first selected row
2256 * or an empty array if no row is selected
2319 * and the row at that index is selected.
2321 * @return true if <code>row</code> is a valid index and the row at
2322 * that index is selected (where 0 is the first row)
2324 public boolean isRowSelected(int row) {
2325 return selectionModel.isSelectedIndex(row);
2343 * @param row the row being queried
2346 * @return true if <code>row</code> and <code>column</code> are valid indices
2347 * and the cell at index <code>(row, column)</code> is selected,
2348 * where the first row and first column are at index 0
2350 public boolean isCellSelected(int row, int column) {
2354 return (!getRowSelectionAllowed() || isRowSelected(row)) &&
2415 * @param rowIndex affects the selection at <code>row</code>
2450 // might leave a cell in selection state if the row was
2604 * Maps the index of the row in terms of the
2608 * @param modelRowIndex the index of the row in terms of the model
2609 * @return the index of the corresponding row in the view, or -1 if
2610 * the row isn't visible
2625 * Maps the index of the row in terms of the view to the
2629 * @param viewRowIndex the index of the row in the view
2630 * @return the index of the corresponding row in the model
2701 * Returns the cell value at <code>row</code> and <code>column</code>.
2711 * @param row the row whose value is to be queried
2715 public Object getValueAt(int row, int column) {
2716 return getModel().getValueAt(convertRowIndexToModel(row),
2721 * Sets the value for the cell in the table model at <code>row</code>
2735 * @param row the row of the cell to be changed
2739 public void setValueAt(Object aValue, int row, int column) {
2740 getModel().setValueAt(aValue, convertRowIndexToModel(row),
2745 * Returns true if the cell at <code>row</code> and <code>column</code>
2758 * @param row the row whose value is to be queried
2763 public boolean isCellEditable(int row, int column) {
2764 return getModel().isCellEditable(convertRowIndexToModel(row),
2856 * Returns the index of the row that <code>point</code> lies in,
2861 * @return the index of the row that <code>point</code> lies in,
2882 * <code>row</code> and <code>column</code>.
2884 * has the full height and width of the row and column
2889 * If the column index is valid but the row index is less
2893 * to zero. In general, when either the row or column indices indicate a
2896 * the table's range. When both row and column indices are out
2905 * @param row the row index where the desired cell
2918 * the column and row models
2921 * <code>row</code>,<code>column</code>
2924 public Rectangle getCellRect(int row, int column, boolean includeSpacing) {
2927 if (row < 0) {
2931 else if (row >= getRowCount()) {
2936 r.height = getRowHeight(row);
2937 r.y = (rowModel == null) ? row * r.height : rowModel.getPosition(row);
3457 * Programmatically starts editing the cell at <code>row</code> and
3463 * @param row the row to be edited
3468 public boolean editCellAt(int row, int column) {
3469 return editCellAt(row, column, null);
3473 * Programmatically starts editing the cell at <code>row</code> and
3481 * @param row the row to be edited
3489 public boolean editCellAt(int row, int column, EventObject e){
3494 if (row < 0 || row >= getRowCount() ||
3499 if (!isCellEditable(row, column))
3509 TableCellEditor editor = getCellEditor(row, column);
3511 editorComp = prepareEditor(editor, row, column);
3516 editorComp.setBounds(getCellRect(row, column, false));
3522 setEditingRow(row);
3565 * Returns the index of the row that contains the cell currently
3568 * @return the index of the row that contains the cell currently
3754 * Sets the row selection model for this table to <code>newModel</code>
3785 * Returns the <code>ListSelectionModel</code> that is used to maintain row
3788 * @return the object that provides row selection state, <code>null</code>
3789 * if row selection is not allowed
3826 * row heights when sorting is enabled. This information is encapsulated
3862 * Sets the height for a row at a specified index.
3972 * reapply the selection and variable row heights.
4001 * Resets the variable row heights in terms of the view from
4002 * that of the variable row heights in terms of the model.
4131 // Update the editing row
4201 // Check for the common case of no change in selection for 1 row
4222 * Restores the editing row after a model event/sort order change.
4228 // Editing row no longer being shown, cancel editing
4472 // If we have variable height rows, adjust the row model.
4510 // If we have variable height rows, adjust the row model.
4627 // The getCellRect() call will fail unless there is at least one row.
4650 // the min and max selected index. The lead row, which could
4669 * Invoked when the row selection changes -- repaints to show the new
4771 * row or column (depending on the orientation).
4797 // Couldn't find leading row - return some default value
4877 * a row boundary.
4898 // Shortcut for vertical scrolling of a table w/ uniform row height
4900 int row = rowAtPoint(visibleRect.getLocation());
4901 assert row != -1;
4903 Rectangle cellRect = getCellRect(row, col, true);
4922 * variable row heights.
4930 int row;
4956 row = rowAtPoint(newCellLoc);
4961 if (orientation == SwingConstants.VERTICAL & row < 0) {
4974 Rectangle newCellRect = getCellRect(row, col, true);
5012 * variable row heights.
5073 * Return the row at the top of the visibleRect
5109 * Return the row at the bottom of the visibleRect.
5399 boolean isSelected, boolean hasFocus, int row, int column) {
5482 int row, int column) {
5499 return super.getTableCellEditorComponent(table, value, isSelected, row, column);
5648 * @param aRow the row of the cell to be edited
5657 * Returns an appropriate renderer for the cell specified by this row and
5668 * @param row the row of the cell to render, where 0 is the first row
5678 public TableCellRenderer getCellRenderer(int row, int column) {
5690 * of the cell at <code>row</code>, <code>column</code>.
5708 * @param row the row of the cell to render, where 0 is the first row
5713 public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
5714 Object value = getValueAt(row, column);
5721 isSelected = isCellSelected(row, column);
5724 (selectionModel.getLeadSelectionIndex() == row);
5733 row, column);
5738 * <code>row</code> and <code>column</code>. If the
5749 * @param row the row of the cell to edit, where 0 is the first row
5757 public TableCellEditor getCellEditor(int row, int column) {
5769 * selection state of the cell at <code>row</code>, <code>column</code>.
5777 * @param row the row of the cell to edit,
5778 * where 0 is the first row
5783 public Component prepareEditor(TableCellEditor editor, int row, int column) {
5784 Object value = getValueAt(row, column);
5785 boolean isSelected = isCellSelected(row, column);
5787 row, column);
6389 * <li>In any mode, when a row is too tall to fit in the
6390 * printable area -- print the upper-most portion of the row
6632 if (source == JTable.this) { // row selection model
6759 * Track changes to the table contents (row insertions)
6784 * Track changes to the table contents (row deletions)
6984 int row = rowAtPoint(p);
6986 if ((column != -1) && (row != -1)) {
6995 row, column);
6996 return new AccessibleJTableCell(JTable.this, row, column,
6997 getAccessibleIndexAt(row, column));
7026 int row = getAccessibleRowAtIndex(i);
7036 row, column);
7037 return new AccessibleJTableCell(JTable.this, row, column,
7038 getAccessibleIndexAt(row, column));
7059 // a column swath and a row swath, with a shared block
7113 // a column swath and a row swath, with a shared block
7119 // wherein three colums and one row selected
7128 // selected rows in two states: in a selected row,
7129 // and not in one; continuing until we are in a row
7132 // always do rows above the "current" selected row first,
7133 // then the cells in the selected row. If we're done
7136 // selected row at the end.
7147 case IN_ROW: // on individual row full of selections
7155 // is the next row in table selected or not?
7161 j++; // we didn't return earlier, so go to next row
7221 int row = getAccessibleRowAtIndex(i);
7222 return JTable.this.isCellSelected(row, column);
7242 int row = getAccessibleRowAtIndex(i);
7243 JTable.this.changeSelection(row, column, true, false);
7260 int row = getAccessibleRowAtIndex(i);
7261 JTable.this.removeRowSelectionInterval(row, row);
7288 * Returns the row number of an index in the table.
7291 * @return the zero-based row of the table if one exists;
7312 * Returns the index at a row and column in the table.
7314 * @param r zero-based row of the table
7412 * Returns the <code>Accessible</code> at a specified row
7415 * @param r zero-based row of the table
7417 * @return the <code>Accessible</code> at the specified row and column
7426 * at a specified row and column in the table.
7429 * at a specified row and column in the table
7438 * <code>Accessible</code> at a given (row, column).
7441 * at a specified row and column in the table
7449 * Returns the row headers as an <code>AccessibleTable</code>.
7451 * @return an <code>AccessibleTable</code> representing the row
7456 // row headers are not supported
7461 * Sets the row headers as an <code>AccessibleTable</code>.
7463 * @param a an <code>AccessibleTable</code> representing the row
7468 // row headers are not supported
7542 * Returns the Accessible at a specified row and column
7545 * @param row zero-based row of the table
7547 * @return the Accessible at the specified row and column
7549 public Accessible getAccessibleAt(int row, int column) {
7563 return new AccessibleJTableHeaderCell(row, column,
7570 * a specified row and column in the table.
7573 * given specified (row, column)
7579 * a specified row and column in the table.
7582 * given specified row and column
7587 * Returns the row headers as an AccessibleTable.
7589 * @return an AccessibleTable representing the row
7595 * Sets the row headers.
7598 * row headers
7620 * Returns the description of the specified row in the table.
7622 * @param r zero-based row of the table
7623 * @return the description of the row
7629 * Sets the description text of the specified row of the table.
7631 * @param r zero-based row of the table
7632 * @param a the description of the row
7657 * a specified row and column is selected.
7659 * @param r zero-based row of the table
7662 * row and column is selected. Otherwise, the boolean value
7669 * Returns a boolean value indicating whether the specified row
7672 * @param r zero-based row of the table
7673 * @return the boolean value true if the specified row is selected.
7694 * zero-based row of the table
7722 * Returns the description of the specified row in the table.
7724 * @param r zero-based row of the table
7725 * @return the description of the row
7740 * Sets the description text of the specified row of the table.
7742 * @param r zero-based row of the table
7743 * @param a the description of the row
7795 * given (row, column) is selected.
7797 * @param r zero-based row of the table
7799 * @return the boolean value true if the accessible at (row, column)
7808 * Returns a boolean value indicating whether the specified row
7811 * @param r zero-based row of the table
7812 * @return the boolean value true if the specified row is selected;
7837 * zero-based row of the table
7856 * Returns the row at a given index into the table.
7859 * @return the row at a given index
7888 * Returns the index at a given (row, column) in the table.
7890 * @param r zero-based row of the table
7909 private int row;
7919 row = r;
7953 JTable.this, getValueAt(row, column),
7954 false, false, row, column);
7978 row, column);
8087 Rectangle rcell = JTable.this.getCellRect(row, column, false);
8095 if (parent.isCellSelected(row, column)) {
8100 if ((row == getSelectedRow()) && (column == getSelectedColumn())) {
8609 Rectangle r = parent.getCellRect(row, column, false);
8628 return parent.getCellRect(row, column, false);
8648 Rectangle r = parent.getCellRect(row, column, false);
8737 private int row;
8745 * @param row header cell row index
8750 public AccessibleJTableHeaderCell(int row, int column,
8753 this.row = row;
8888 Rectangle rcell = JTable.this.getCellRect(row, column, false);
8896 if (JTable.this.isCellSelected(row, column)) {
8901 if ((row == getSelectedRow()) && (column == getSelectedColumn())) {