/[classpath]/classpath/javax/swing/JTable.java
ViewVC logotype

Diff of /classpath/javax/swing/JTable.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by mark, Sat Jul 2 20:32:49 2005 UTC revision 1.30 by trebligd, Tue Jul 5 09:03:43 2005 UTC
# Line 356  public class JTable extends JComponent Line 356  public class JTable extends JComponent
356     * {@link TableColumnModel} and assign it to the {@link #columnModel}     * {@link TableColumnModel} and assign it to the {@link #columnModel}
357     * property when the {@link #dataModel} property is changed.     * property when the {@link #dataModel} property is changed.
358     *     *
359     * @see #setModel()     * @see #setModel(TableModel)
360     * @see #createColumnsFromModel()     * @see #createColumnsFromModel()
361     * @see #setColumnModel()     * @see #setColumnModel(TableColumnModel)
362     * @see #setAutoCreateColumnsFromModel()     * @see #setAutoCreateColumnsFromModel(boolean)
363     * @see #getAutoCreateColumnsFromModel()     * @see #getAutoCreateColumnsFromModel()
364     */     */
365    protected boolean autoCreateColumnsFromModel;    protected boolean autoCreateColumnsFromModel;
# Line 371  public class JTable extends JComponent Line 371  public class JTable extends JComponent
371     * #AUTO_RESIZE_SUBSEQUENT_COLUMNS}, or {@link #AUTO_RESIZE_OFF}.     * #AUTO_RESIZE_SUBSEQUENT_COLUMNS}, or {@link #AUTO_RESIZE_OFF}.
372     *     *
373     * @see #doLayout()     * @see #doLayout()
374     * @see #setAutoResizeMode()     * @see #setAutoResizeMode(int)
375     * @see #getAutoResizeMode()     * @see #getAutoResizeMode()
376     */     */
377    protected int autoResizeMode;    protected int autoResizeMode;
# Line 383  public class JTable extends JComponent Line 383  public class JTable extends JComponent
383     * {@link #columnModel}.     * {@link #columnModel}.
384     *     *
385     * @see #getRowHeight()     * @see #getRowHeight()
386     * @see #setRowHeight()     * @see #setRowHeight(int)
387     * @see TableColumn#getWidth()     * @see TableColumn#getWidth()
388     * @see TableColumn#setWidth()     * @see TableColumn#setWidth(int)
389     */     */
390    protected int rowHeight;    protected int rowHeight;
391    
392    /**    /**
393     * The height in pixels of the gap left between any two rows of the table.     * The height in pixels of the gap left between any two rows of the table.
394     *     *
395     * @see #setRowMargin()     * @see #setRowMargin(int)
396     * @see #getRowHeight()     * @see #getRowHeight()
397     * @see #getIntercellSpacing()     * @see #getIntercellSpacing()
398     * @see #setIntercellSpacing()     * @see #setIntercellSpacing(Dimension)
399     * @see TableColumnModel#getColumnMargin()     * @see TableColumnModel#getColumnMargin()
400     * @see TableColumnModel#setColumnMargin()     * @see TableColumnModel#setColumnMargin(int)
401     */     */
402    protected int rowMargin;    protected int rowMargin;
403    
# Line 408  public class JTable extends JComponent Line 408  public class JTable extends JComponent
408     * selection as an independent concept, but it is now represented solely     * selection as an independent concept, but it is now represented solely
409     * in terms of simultaneous row and column selection.     * in terms of simultaneous row and column selection.
410     *     *
411     * @see TableColumnModel#columnSelectionAllowed()     * @see TableColumnModel#getColumnSelectionAllowed()
412     * @see #setRowSelectionAllowed()     * @see #setRowSelectionAllowed(boolean)
413     * @see #getRowSelectionAllowed()     * @see #getRowSelectionAllowed()
414     * @see #getCellSelectionEnabled()     * @see #getCellSelectionEnabled()
415     * @see #setCellSelectionEnabled()     * @see #setCellSelectionEnabled(boolean)
416     */     */
417    protected boolean rowSelectionAllowed;    protected boolean rowSelectionAllowed;
418    
419    /**    /**
420     * @deprecated Use {@link #rowSelectionAllowed}, {@link     * @deprecated Use {@link #rowSelectionAllowed}, {@link
421     * #columnSelectionAllowed}, or the combined methods {@link     * #getColumnSelectionAllowed}, or the combined methods {@link
422     * getCellSelectionEnabled} and {@link setCellSelectionEnabled}.     * #getCellSelectionEnabled} and {@link #setCellSelectionEnabled(boolean)}.
423     */     */
424    protected boolean cellSelectionEnabled;    protected boolean cellSelectionEnabled;
425        
# Line 429  public class JTable extends JComponent Line 429  public class JTable extends JComponent
429     * property name. The table listens to its model as a {@link     * property name. The table listens to its model as a {@link
430     * TableModelListener}.     * TableModelListener}.
431     *     *
432     * @see #tableChanged()     * @see #tableChanged(TableModelEvent)
433     * @see TableModel#addTableModelListener()     * @see TableModel#addTableModelListener(TableModelListener)
434     */     */
435    protected TableModel dataModel;    protected TableModel dataModel;
436    
# Line 444  public class JTable extends JComponent Line 444  public class JTable extends JComponent
444     *     *
445     * <p>The TableColumnModel also contains a {@link ListSelectionModel} which     * <p>The TableColumnModel also contains a {@link ListSelectionModel} which
446     * indicates which columns are currently selected. This selection model     * indicates which columns are currently selected. This selection model
447     * works in combination with the {@link selectionModel} of the table     * works in combination with the {@link #selectionModel} of the table
448     * itself to specify a <em>table selection</em>: a combination of row and     * itself to specify a <em>table selection</em>: a combination of row and
449     * column selections.</p>     * column selections.</p>
450     *     *
# Line 453  public class JTable extends JComponent Line 453  public class JTable extends JComponent
453     * columnModel automatically, and the table acts as a facade for most of     * columnModel automatically, and the table acts as a facade for most of
454     * the interesting properties of the columnModel anyways.</p>     * the interesting properties of the columnModel anyways.</p>
455     *     *
456     * @see #setColumnModel()     * @see #setColumnModel(TableColumnModel)
457     * @see #getColumnModel()     * @see #getColumnModel()
458     */     */
459    protected TableColumnModel columnModel;    protected TableColumnModel columnModel;
# Line 461  public class JTable extends JComponent Line 461  public class JTable extends JComponent
461    /**    /**
462     * A model of the rows of this table which are currently selected. This     * A model of the rows of this table which are currently selected. This
463     * model is used in combination with the column selection model held as a     * model is used in combination with the column selection model held as a
464     * member of the {@link columnModel} property, to represent the rows and     * member of the {@link #columnModel} property, to represent the rows and
465     * columns (or both: cells) of the table which are currently selected.     * columns (or both: cells) of the table which are currently selected.
466     *     *
467     * @see #rowSelectionAllowed     * @see #rowSelectionAllowed
468     * @see #setSelectionModel()     * @see #setSelectionModel(ListSelectionModel)
469     * @see #getSelectionModel()     * @see #getSelectionModel()
470     * @see TableColumnModel#getSelectionModel()     * @see TableColumnModel#getSelectionModel()
471     * @see ListSelectionModel#addListSelectionListener()       * @see ListSelectionModel#addListSelectionListener(ListSelectionListener)  
472     */     */
473    protected ListSelectionModel selectionModel;    protected ListSelectionModel selectionModel;
474    
# Line 494  public class JTable extends JComponent Line 494  public class JTable extends JComponent
494     * The color to paint the grid lines of the table, when either {@link     * The color to paint the grid lines of the table, when either {@link
495     * #showHorizontalLines} or {@link #showVerticalLines} is set.     * #showHorizontalLines} or {@link #showVerticalLines} is set.
496     *     *
497     * @see #setGridColor()     * @see #setGridColor(Color)
498     * @see #getGridColor()     * @see #getGridColor()
499     */     */
500    protected Color gridColor;    protected Color gridColor;
# Line 503  public class JTable extends JComponent Line 503  public class JTable extends JComponent
503     * The size this table would prefer its viewport assume, if it is     * The size this table would prefer its viewport assume, if it is
504     * contained in a {@link JScrollPane}.     * contained in a {@link JScrollPane}.
505     *     *
506     * @see #setPreferredScrollableViewportSize()     * @see #setPreferredScrollableViewportSize(Dimension)
507     * @see #getPreferredScrollableViewportSize()     * @see #getPreferredScrollableViewportSize()
508     */     */
509    protected Dimension preferredViewportSize;    protected Dimension preferredViewportSize;
# Line 513  public class JTable extends JComponent Line 513  public class JTable extends JComponent
513     * change event with name {@link #SELECTION_BACKGROUND_CHANGED_PROPERTY}     * change event with name {@link #SELECTION_BACKGROUND_CHANGED_PROPERTY}
514     * when its value changes.     * when its value changes.
515     *     *
516     * @see #setSelectionBackground()     * @see #setSelectionBackground(Color)
517     * @see #getSelectionBackground()     * @see #getSelectionBackground()
518     */     */
519    protected Color selectionBackground;    protected Color selectionBackground;
# Line 529  public class JTable extends JComponent Line 529  public class JTable extends JComponent
529     * change event with name {@link #SELECTION_FOREGROUND_CHANGED_PROPERTY}     * change event with name {@link #SELECTION_FOREGROUND_CHANGED_PROPERTY}
530     * when its value changes.     * when its value changes.
531     *     *
532     * @see #setSelectionForeground()     * @see #setSelectionForeground(Color)
533     * @see #getSelectionForeground()     * @see #getSelectionForeground()
534     */     */
535    protected Color selectionForeground;    protected Color selectionForeground;
# Line 896  public class JTable extends JComponent Line 896  public class JTable extends JComponent
896    }    }
897    
898    /**    /**
899     * Get the value of the {@link #selectedRow} property by delegation to     * Get the value of the selectedRow property by delegation to
900     * the {@link ListSelectionModel#getMinSelectionIndex} method of the     * the {@link ListSelectionModel#getMinSelectionIndex} method of the
901     * {@link #selectionModel} field.     * {@link #selectionModel} field.
902     *     *
# Line 927  public class JTable extends JComponent Line 927  public class JTable extends JComponent
927    }    }
928    
929    /**    /**
930     * Get the value of the {@link #scrollableTracksViewportHeight} property.     * Get the value of the <code>scrollableTracksViewportHeight</code> property.
931     *     *
932     * @return The constant value <code>false</code>     * @return The constant value <code>false</code>
933     */     */
   
934    public boolean getScrollableTracksViewportHeight()    public boolean getScrollableTracksViewportHeight()
935    {    {
936      return false;      return false;
937    }    }
938        
939    /**    /**
940     * Get the value of the {@link #scrollableTracksViewportWidth} property.     * Get the value of the <code>scrollableTracksViewportWidth</code> property.
941     *     *
942     * @return <code>true</code> unless the {@link autoResizeMode} prperty is     * @return <code>true</code> unless the {@link #autoResizeMode} property is
943     * <code>AUTO_RESIZE_OFF</code>     * <code>AUTO_RESIZE_OFF</code>
944     */     */
   
945    public boolean getScrollableTracksViewportWidth()    public boolean getScrollableTracksViewportWidth()
946    {    {
947      if (autoResizeMode == AUTO_RESIZE_OFF)      if (autoResizeMode == AUTO_RESIZE_OFF)
# Line 1138  public class JTable extends JComponent Line 1136  public class JTable extends JComponent
1136    }    }
1137    
1138    /**    /**
1139     * Get the value of the {@link #columnCount} property by     * Get the value of the <code>columnCount</code> property by
1140     * delegation to the @{link #columnModel} field.     * delegation to the @{link #columnModel} field.
1141     *     *
1142     * @return The current value of the columnCount property     * @return The current value of the columnCount property
# Line 1149  public class JTable extends JComponent Line 1147  public class JTable extends JComponent
1147    }    }
1148    
1149    /**    /**
1150     * Get the value of the {@link #rowCount} property by     * Get the value of the <code>rowCount</code> property by
1151     * delegation to the @{link #dataModel} field.     * delegation to the @{link #dataModel} field.
1152     *     *
1153     * @return The current value of the rowCount property     * @return The current value of the rowCount property
# Line 1170  public class JTable extends JComponent Line 1168  public class JTable extends JComponent
1168    }    }
1169    
1170    /**    /**
1171     * Get the value of the {@link #selectedColumn} property by     * Get the value of the <code>selectedColumn</code> property by
1172     * delegation to the @{link #columnModel} field.     * delegation to the @{link #columnModel} field.
1173     *     *
1174     * @return The current value of the selectedColumn property     * @return The current value of the selectedColumn property
# Line 1240  public class JTable extends JComponent Line 1238  public class JTable extends JComponent
1238    }    }
1239    
1240    /**    /**
1241     * Get the value of the {@link #selectedColumnCount} property by     * Get the value of the <code>selectedColumnCount</code> property by
1242     * delegation to the @{link #columnModel} field.     * delegation to the @{link #columnModel} field.
1243     *     *
1244     * @return The current value of the selectedColumnCount property     * @return The current value of the selectedColumnCount property
# Line 1251  public class JTable extends JComponent Line 1249  public class JTable extends JComponent
1249    }    }
1250    
1251    /**    /**
1252     * Get the value of the {@link #selectedColumns} property by     * Get the value of the <code>selectedColumns</code> property by
1253     * delegation to the @{link #columnModel} field.     * delegation to the @{link #columnModel} field.
1254     *     *
1255     * @return The current value of the selectedColumns property     * @return The current value of the selectedColumns property
# Line 1262  public class JTable extends JComponent Line 1260  public class JTable extends JComponent
1260    }    }
1261    
1262    /**    /**
1263     * Get the value of the {@link #columnSelectionAllowed} property.     * Get the value of the <code>columnSelectionAllowed</code> property.
1264     *     *
1265     * @return The current value of the columnSelectionAllowed property     * @return The current value of the columnSelectionAllowed property
1266     */     */
# Line 1272  public class JTable extends JComponent Line 1270  public class JTable extends JComponent
1270    }    }
1271    
1272    /**    /**
1273     * Get the value of the {@link #selectedRowCount} property by     * Get the value of the <code>selectedRowCount</code> property by
1274     * delegation to the @{link #selectionModel} field.     * delegation to the @{link #selectionModel} field.
1275     *     *
1276     * @return The current value of the selectedRowCount property     * @return The current value of the selectedRowCount property
# Line 1283  public class JTable extends JComponent Line 1281  public class JTable extends JComponent
1281    }    }
1282    
1283    /**    /**
1284     * Get the value of the {@link #selectedRows} property by     * Get the value of the <code>selectedRows</code> property by
1285     * delegation to the @{link #selectionModel} field.     * delegation to the @{link #selectionModel} field.
1286     *     *
1287     * @return The current value of the selectedRows property     * @return The current value of the selectedRows property
# Line 1334  public class JTable extends JComponent Line 1332  public class JTable extends JComponent
1332    }    }
1333    
1334    /**    /**
1335     * Get the value of the {@link #intercellSpacing} property.     * Get the value of the <code>intercellSpacing</code> property.
1336     *     *
1337     * @return The current value of the property     * @return The current value of the property
1338     */     */
# Line 1574  public class JTable extends JComponent Line 1572  public class JTable extends JComponent
1572    }    }
1573    
1574    /**    /**
1575     * Set the value of the {@link #columnSelectionAllowed} property.     * Set the value of the <code>columnSelectionAllowed</code> property.
1576     *     *
1577     * @param c The new value of the property     * @param c The new value of the property
1578     */     */
# Line 1606  public class JTable extends JComponent Line 1604  public class JTable extends JComponent
1604    }    }
1605    
1606    /**    /**
1607     * Set the value of the {@link #selectionMode} property by     * Set the value of the <code>selectionMode</code> property by
1608     * delegation to the {@link #selectionModel} field. The same selection     * delegation to the {@link #selectionModel} field. The same selection
1609     * mode is set for row and column selection models.     * mode is set for row and column selection models.
1610     *     *
# Line 1661  public class JTable extends JComponent Line 1659  public class JTable extends JComponent
1659    }    }
1660    
1661    /**    /**
1662     * Set the value of the {@link #intercellSpacing} property.     * Set the value of the <code>intercellSpacing</code> property.
1663     *     *
1664     * @param i The new value of the intercellSpacing property     * @param i The new value of the intercellSpacing property
1665     */     */
# Line 1708  public class JTable extends JComponent Line 1706  public class JTable extends JComponent
1706     * <p>Set the value of the {@link #selectionForeground} property.</p>     * <p>Set the value of the {@link #selectionForeground} property.</p>
1707     *     *
1708     * <p>Fire a PropertyChangeEvent with name {@link     * <p>Fire a PropertyChangeEvent with name {@link
1709     * SELECTION_FOREGROUND_CHANGED_PROPERTY} to registered listeners, if     * #SELECTION_FOREGROUND_CHANGED_PROPERTY} to registered listeners, if
1710     * selectionForeground changed.</p>     * selectionForeground changed.</p>
1711     *     *
1712     * @param s The new value of the selectionForeground property     * @param s The new value of the selectionForeground property
# Line 1725  public class JTable extends JComponent Line 1723  public class JTable extends JComponent
1723    }    }
1724    
1725    /**    /**
1726     * Set the value of the {@link #showGrid} property.     * Set the value of the <code>showGrid</code> property.
1727     *     *
1728     * @param s The new value of the showGrid property     * @param s The new value of the showGrid property
1729     */     */

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26