classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: JTable fixes


From: Roman Kennke
Subject: [cp-patches] FYI: JTable fixes
Date: Mon, 12 Sep 2005 14:36:11 +0200 (CEST)
User-agent: SquirrelMail/1.4.4

Hi,

I tweaked JTable a bit, so that it is now possible to programatically set
the column widths. I also check in some Mauve tests to back these changes.

2005-09-12  Roman Kennke  <address@hidden>

        * javax/swing/JTable.java
        (TableColumnPropertyChangeHandler): New inner class. Handles
        changes of column widths.
        (JTable(TableModel, TableColumnModel, ListSelectionModel)):
        Check if column model == null and if so, create a default model.
        (initializeLocalVars): Changed to use createDefaultColumnsFromModel
        instead of createColumnsFromModel.
        (addColumn): Add property change handler to new column.
        (createColumnsFromModel): Removed redundant private method.
        Use the public createDefaultColumnsFromModel instead.
        (tableChanged): Use createDefaultColumnsFromModel instead of
        createColumnsFromModel.
        (setModel): Use createDefaultColumnsFromModel instead of
        createColumnsFromModel.
        (doLayout): When handling AUTO_RESIZE_OFF, then adjust the
        size of the resizing column to it's (new) preferred size.
        (createDefaultColumnsFromModel): Added assertion to make sure
        that the column model is not null. Add property change handler
        to new columns.
        * javax/swing/table/TableColumn.java
        (setWidth): Fire property change with name 'width' instead
        of using the (obsolete) constant field COLUMN_WIDTH_PROPERTY.
        (setPreferredWidth): Make this property a bound property.

/Roman

Attachment: Table.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]