/[classpath]/classpath/javax/swing/table/TableColumn.java
ViewVC logotype

Diff of /classpath/javax/swing/table/TableColumn.java

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

revision 1.7.2.4 by gnu_andrew, Tue Aug 2 20:12:38 2005 UTC revision 1.7.2.5 by gnu_andrew, Tue Sep 20 18:46:34 2005 UTC
# Line 402  public class TableColumn Line 402  public class TableColumn
402      if (width == oldWidth)      if (width == oldWidth)
403        return;        return;
404    
405      firePropertyChange(COLUMN_WIDTH_PROPERTY, oldWidth, width);      // We do have a constant field COLUMN_WIDTH_PROPERTY,
406        // however, tests show that the actual fired property name is 'width'
407        // and even Sun's API docs say that this constant field is obsolete and
408        // not used.
409        firePropertyChange("width", oldWidth, width);
410    }    }
411    
412    /**    /**
# Line 422  public class TableColumn Line 426  public class TableColumn
426     */     */
427    public void setPreferredWidth(int preferredWidth)    public void setPreferredWidth(int preferredWidth)
428    {    {
429        int oldPrefWidth = this.preferredWidth;
430    
431      if (preferredWidth < minWidth)      if (preferredWidth < minWidth)
432        this.preferredWidth = minWidth;        this.preferredWidth = minWidth;
433      else if (preferredWidth > maxWidth)      else if (preferredWidth > maxWidth)
434        this.preferredWidth = maxWidth;        this.preferredWidth = maxWidth;
435      else      else
436        this.preferredWidth = preferredWidth;        this.preferredWidth = preferredWidth;
437    
438        firePropertyChange("preferredWidth", oldPrefWidth, this.preferredWidth);
439    }    }
440    
441    /**    /**

Legend:
Removed from v.1.7.2.4  
changed lines
  Added in v.1.7.2.5

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