Lines Matching refs:column

133  * the column and row indexes returned by various <code>JTable</code> methods
141 * internally and converts its column indices before querying the model.
143 * So, when writing a <code>TableModel</code>, it is not necessary to listen for column
234 /** Do not adjust column widths automatically; use a horizontal scrollbar instead. */
237 /** When a column is adjusted in the UI, adjust the next column the opposite way. */
244 /** During all resize operations, apply adjustments to the last column only. */
334 * If true, both a row selection and a column selection
336 * the cells whose row and column are both selected.
350 /** Identifies the column of the cell being edited. */
387 * The last value of getValueIsAdjusting from the column selection models
492 * Returns the column index where a dropped item should be placed in the
496 * column should be inserted. Otherwise, it represents the value
497 * of an existing column on which the data was dropped. This index is
501 * and no column could be calculated.
521 * of a column.
523 * @return whether or not this is an insert column
541 + "column=" + col + ","
553 * data model, a default column model, and a default selection
566 * <code>dm</code> as the data model, a default column model,
580 * as the column model, and a default selection model.
583 * @param cm the column model for the table
593 * column model, and <code>sm</code> as the selection model.
598 * and the column model is populated with suitable
602 * @param cm the column model for the table
656 * with column names, <code>columnNames</code>. The
659 * the value of the cell at row 1, column 5 can be obtained
665 * @param columnNames names of each column
673 * <code>rowData</code>, with column names, <code>columnNames</code>.
675 * column 5 can be obtained with the following code:
682 * @param columnNames names of each column
686 public String getColumnName(int column) { return columnNames[column].toString(); }
690 public boolean isCellEditable(int row, int column) { return true; }
887 * description: The JTableHeader instance which renders the column headers.
1296 * removes the default renderer for this column class.
1316 * a <code>Hashtable</code> of entries according to the class of the cells in the column. If
1350 * particular column in a table, uses the <code>isCellEditable</code>
1354 * column class.
1374 * a <code>Hashtable</code> of entries according to the class of the cells in the column. If
1948 * column and row selection. When setting states,
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.
2006 * @param columnSelectionAllowed true if this model will allow column selection
2011 * description: If true, an entire column is selected for each selected cell.
2033 * Sets whether this table allows both a column selection and a
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
2244 * Returns the index of the first selected column,
2245 * -1 if no column is selected.
2246 * @return the index of the first selected column
2283 * or an empty array if no column is selected
2330 * and the column at that index is selected.
2332 * @param column the column in the column model
2333 * @return true if <code>column</code> is a valid index and the column at
2334 * that index is selected (where 0 is the first column)
2336 public boolean isColumnSelected(int column) {
2337 return columnModel.getSelectionModel().isSelectedIndex(column);
2344 * @param column the column 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) {
2355 (!getColumnSelectionAllowed() || isColumnSelected(column));
2416 * @param columnIndex affects the selection at <code>column</code>
2451 // selected but the column was not - as it would toggle them both.
2549 * Returns the <code>TableColumn</code> object for the column in the table
2569 * Maps the index of the column in the view at
2570 * <code>viewColumnIndex</code> to the index of the column
2572 * column in the model. If <code>viewColumnIndex</code>
2575 * @param viewColumnIndex the index of the column in the view
2576 * @return the index of the corresponding column in the model
2586 * Maps the index of the column in the table model at
2587 * <code>modelColumnIndex</code> to the index of the column
2589 * corresponding column in the view; returns -1 if this column is not
2593 * @param modelColumnIndex the index of the column in the model
2594 * @return the index of the corresponding column in the view
2665 * Returns the number of columns in the column model. Note that this may
2677 * Returns the name of the column appearing in the view at
2678 * column position <code>column</code>.
2680 * @param column the column in the view being queried
2681 * @return the name of the column at position <code>column</code>
2682 in the view where the first column is column 0
2684 public String getColumnName(int column) {
2685 return getModel().getColumnName(convertColumnIndexToModel(column));
2689 * Returns the type of the column appearing in the view at
2690 * column position <code>column</code>.
2692 * @param column the column in the view being queried
2693 * @return the type of the column at position <code>column</code>
2694 * in the view where the first column is column 0
2696 public Class<?> getColumnClass(int column) {
2697 return getModel().getColumnClass(convertColumnIndexToModel(column));
2701 * Returns the cell value at <code>row</code> and <code>column</code>.
2703 * <b>Note</b>: The column is specified in the table view's display
2704 * order, and not in the <code>TableModel</code>'s column
2707 * the column at a given index in the view will change.
2709 * column ordering.
2712 * @param column the column whose value is to be queried
2715 public Object getValueAt(int row, int column) {
2717 convertColumnIndexToModel(column));
2722 * and <code>column</code>.
2724 * <b>Note</b>: The column is specified in the table view's display
2725 * order, and not in the <code>TableModel</code>'s column
2728 * the column at a given index in the view will change.
2730 * column ordering.
2736 * @param column the column of the cell to be changed
2739 public void setValueAt(Object aValue, int row, int column) {
2741 convertColumnIndexToModel(column));
2745 * Returns true if the cell at <code>row</code> and <code>column</code>
2749 * <b>Note</b>: The column is specified in the table view's display
2750 * order, and not in the <code>TableModel</code>'s column
2753 * the column at a given index in the view will change.
2755 * column ordering.
2759 * @param column the column whose value is to be queried
2763 public boolean isCellEditable(int row, int column) {
2765 convertColumnIndexToModel(column));
2773 * this <code>JTable</code>'s column model.
2774 * If the column name of <code>aColumn</code> is <code>null</code>,
2775 * sets the column name of <code>aColumn</code> to the name
2778 * To add a column to this <code>JTable</code> to display the
2779 * <code>modelColumn</code>'th column of data in the model with a
2789 * The model column number is stored inside the <code>TableColumn</code>
2791 * data values in the model. The model column number does not change
2808 * array of columns. Note: this method does not remove the column
2820 * Moves the column <code>column</code> to the position currently
2821 * occupied by the column <code>targetColumn</code> in the view.
2822 * The old column at <code>targetColumn</code> is
2825 * @param column the index of column to be moved
2826 * @param targetColumn the new index of the column
2828 public void moveColumn(int column, int targetColumn) {
2829 getColumnModel().moveColumn(column, targetColumn);
2837 * Returns the index of the column that <code>point</code> lies in,
2842 * @return the index of the column 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
2907 * @param column the column index where the desired cell
2909 * necessarily the same as the column index
2913 * model column index to a display
2914 * column index
2918 * the column and row models
2921 * <code>row</code>,<code>column</code>
2924 public Rectangle getCellRect(int row, int column, boolean includeSpacing) {
2940 if (column < 0) {
2947 else if (column >= getColumnCount()) {
2957 for(int i = 0; i < column; i++) {
2961 for(int i = cm.getColumnCount()-1; i > column; i--) {
2965 r.width = cm.getColumn(column).getWidth();
2981 for (int column = 0; column < cm.getColumnCount(); column++) {
2982 if (cm.getColumn(column) == aColumn) {
2983 return column;
3013 * <li> AUTO_RESIZE_OFF: Don't automatically adjust the column's
3019 * <li> AUTO_RESIZE_NEXT_COLUMN: Use just the column after the
3020 * resizing column. This results in the "boundary" or divider
3026 * size of the last column only. If the bounds of the last column
3028 * width of the last column to the appropriate limit and make
3044 * column minimum or maximum, meaning, either that there
3134 // A column has been resized and JTable may need to distribute
3142 // resizing column will have to take any remainder. This means
3143 // that the column is not being allowed to take the requested
3146 // to the column after the resizing column. If one were to attempt
3147 // to resize the last column of the table, there would be no
3149 // It would then be given entirely back to the resizing column,
3190 * @param resizingColumn the column whose resizing made this adjustment
3191 * necessary or -1 if there is no such column
3458 * <code>column</code>, if those indices are in the valid range, and
3464 * @param column the column to be edited
3468 public boolean editCellAt(int row, int column) {
3469 return editCellAt(row, column, null);
3474 * <code>column</code>, if those indices are in the valid range, and
3477 * editing a particular table, column or cell value, return false from
3482 * @param column the column to be edited
3489 public boolean editCellAt(int row, int column, EventObject e){
3495 column < 0 || column >= getColumnCount()) {
3499 if (!isCellEditable(row, column))
3509 TableCellEditor editor = getCellEditor(row, column);
3511 editorComp = prepareEditor(editor, row, column);
3516 editorComp.setBounds(getCellRect(row, column, false));
3523 setEditingColumn(column);
3553 * Returns the index of the column that contains the cell currently
3556 * @return the index of the column that contains the cell currently
3617 for(int column = 0; column < cm.getColumnCount(); column++) {
3618 TableColumn aColumn = cm.getColumn(column);
3709 * Sets the column model for this table to <code>newModel</code> and registers
3710 * for listener notifications from the new column model. Also sets
3711 * the column model of the <code>JTableHeader</code> to <code>columnModel</code>.
3732 // Set the column model of the header as well.
3743 * Returns the <code>TableColumnModel</code> that contains all column information
3746 * @return the object that provides the column state of the table
4426 // A cell or column of cells has changed.
4431 int column = convertColumnIndexToView(modelColumn);
4432 dirtyRegion = getCellRect(start, column, false);
4531 * Invoked when a column is added to the table column model.
4547 * Invoked when a column is removed from the table column model.
4563 * Invoked when a column is repositioned. If a cell is being
4580 * Invoked when a column is moved due to a margin change.
4691 // The getCellRect() calls will fail unless there is at least one column.
4771 * row or column (depending on the orientation).
5091 * Return the column at the leading edge of the visibleRect.
5128 * Return the column at the trailing edge of the visibleRect.
5399 boolean isSelected, boolean hasFocus, int row, int column) {
5482 int row, int column) {
5486 Class<?> type = table.getColumnClass(column);
5499 return super.getTableCellEditorComponent(table, value, isSelected, row, column);
5565 * Returns the default column model object, which is
5567 * method to return a different column model object.
5569 * @return the default column model object
5638 * @param aColumn the column of the cell to be edited
5658 * column. If the <code>TableColumn</code> for this column has a non-null
5660 * this column (using <code>getColumnClass</code>)
5669 * @param column the column of the cell to render,
5670 * where 0 is the first column
5678 public TableCellRenderer getCellRenderer(int row, int column) {
5679 TableColumn tableColumn = getColumnModel().getColumn(column);
5682 renderer = getDefaultRenderer(getColumnClass(column));
5690 * of the cell at <code>row</code>, <code>column</code>.
5709 * @param column the column of the cell to render,
5710 * where 0 is the first column
5713 public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
5714 Object value = getValueAt(row, column);
5721 isSelected = isCellSelected(row, column);
5726 (columnModel.getSelectionModel().getLeadSelectionIndex() == column);
5733 row, column);
5738 * <code>row</code> and <code>column</code>. If the
5739 * <code>TableColumn</code> for this column has a non-null editor,
5741 * column (using <code>getColumnClass</code>)
5750 * @param column the column of the cell to edit,
5751 * where 0 is the first column
5757 public TableCellEditor getCellEditor(int row, int column) {
5758 TableColumn tableColumn = getColumnModel().getColumn(column);
5761 editor = getDefaultEditor(getColumnClass(column));
5769 * selection state of the cell at <code>row</code>, <code>column</code>.
5779 * @param column the column of the cell to edit,
5780 * where 0 is the first column
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);
6392 * <li>In <code>PrintMode.NORMAL</code> when a column
6394 * portion of the column and leave the left and right borders
6609 * Track changes to selection model, column model, etc. so as to
6659 // and column's selection property listener as well
6809 * Track changes to the table contents (column insertions)
6829 * Track changes to the table contents (column deletions)
6848 * Track changes of a column repositioning.
6880 * Track changes of a column moving due to margin changes.
6983 int column = columnAtPoint(p);
6986 if ((column != -1) && (row != -1)) {
6987 TableColumn aColumn = getColumnModel().getColumn(column);
6990 Class<?> columnClass = getColumnClass(column);
6995 row, column);
6996 return new AccessibleJTableCell(JTable.this, row, column,
6997 getAccessibleIndexAt(row, column));
7025 int column = getAccessibleColumnAtIndex(i);
7028 TableColumn aColumn = getColumnModel().getColumn(column);
7031 Class<?> columnClass = getColumnClass(column);
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
7220 int column = getAccessibleColumnAtIndex(i);
7222 return JTable.this.isCellSelected(row, column);
7241 int column = getAccessibleColumnAtIndex(i);
7243 JTable.this.changeSelection(row, column, true, false);
7259 int column = getAccessibleColumnAtIndex(i);
7262 JTable.this.removeColumnSelectionInterval(column, column);
7300 * Returns the column number of an index in the table.
7303 * @return the zero-based column of the table if one exists;
7312 * Returns the index at a row and column in the table.
7315 * @param c zero-based column of the table
7413 * and column in the table.
7416 * @param c zero-based column 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
7472 * Returns the column headers as an <code>AccessibleTable</code>.
7474 * @return an <code>AccessibleTable</code> representing the column
7485 * Private class representing a table column header
7542 * Returns the Accessible at a specified row and column
7546 * @param column zero-based column of the table
7547 * @return the Accessible at the specified row and column
7549 public Accessible getAccessibleAt(int row, int column) {
7553 TableColumn aColumn = headerModel.getColumn(column);
7561 -1, 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
7603 * Returns the column headers as an AccessibleTable.
7605 * @return an AccessibleTable representing the column
7611 * Sets the column headers.
7614 * column headers
7638 * Returns the description text of the specified column in the table.
7640 * @param c zero-based column of the table
7641 * @return the text description of the column
7647 * Sets the description text of the specified column in the table.
7649 * @param c zero-based column of the table
7650 * @param a the text description of the column
7657 * a specified row and column is selected.
7660 * @param c zero-based column of the table
7662 * row and column is selected. Otherwise, the boolean value
7680 * Returns a boolean value indicating whether the specified column
7683 * @param r zero-based column of the table
7684 * @return the boolean value true if the specified column is selected.
7703 * zero-based column of the table
7711 * Sets the column headers as an <code>AccessibleTable</code>.
7714 * column headers
7758 * Returns the description of the specified column in the table.
7760 * @param c zero-based column of the table
7761 * @return the description of the column
7776 * Sets the description text of the specified column of the table.
7778 * @param c zero-based column of the table
7779 * @param a the description of the column
7795 * given (row, column) is selected.
7798 * @param c zero-based column of the table
7799 * @return the boolean value true if the accessible at (row, column)
7821 * Returns a boolean value indicating whether the specified column
7824 * @param c zero-based column of the table
7825 * @return the boolean value true if the specified column is selected;
7848 * zero-based column of the table
7872 * Returns the column at a given index into the table.
7875 * @return the column at a given index
7888 * Returns the index at a given (row, column) in the table.
7891 * @param c zero-based column of the table
7910 private int column;
7920 column = c;
7946 TableColumn aColumn = getColumnModel().getColumn(column);
7949 Class<?> columnClass = getColumnClass(column);
7953 JTable.this, getValueAt(row, column),
7954 false, false, row, column);
7970 TableColumn aColumn = getColumnModel().getColumn(column);
7973 Class<?> columnClass = getColumnClass(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);
8738 private int column;
8746 * @param column header cell column index
8750 public AccessibleJTableHeaderCell(int row, int column,
8754 this.column = column;
8888 Rectangle rcell = JTable.this.getCellRect(row, column, false);
8896 if (JTable.this.isCellSelected(row, column)) {
8901 if ((row == getSelectedRow()) && (column == getSelectedColumn())) {
8927 return column;
9410 Rectangle r = parent.getHeaderRect(column);
9437 return parent.getHeaderRect(column);
9475 Rectangle r = parent.getHeaderRect(column);