Subversion Repository Public Repository

litesoft

Diff Revisions 282 vs 475 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/property/PreferredWidthProperty.java

Diff revisions: vs.
  @@ -18,42 +18,48 @@
18 18 /**
19 19 * A {@link ColumnProperty} that provides the preferred width of a column.
20 20 */
21 - public class PreferredWidthProperty extends ColumnProperty {
22 - /**
23 - * Property type.
24 - */
25 - public static final Type<PreferredWidthProperty> TYPE = new Type<PreferredWidthProperty>() {
26 - private PreferredWidthProperty instance;
21 + public class PreferredWidthProperty extends ColumnProperty
22 + {
23 + /**
24 + * Property type.
25 + */
26 + public static final Type<PreferredWidthProperty> TYPE = new Type<PreferredWidthProperty>()
27 + {
28 + private PreferredWidthProperty instance;
27 29
28 - @Override
29 - public PreferredWidthProperty getDefault() {
30 - if (instance == null) {
31 - instance = new PreferredWidthProperty(80);
32 - }
33 - return instance;
34 - }
35 - };
30 + @Override
31 + public PreferredWidthProperty getDefault()
32 + {
33 + if ( instance == null )
34 + {
35 + instance = new PreferredWidthProperty( 80 );
36 + }
37 + return instance;
38 + }
39 + };
40 +
41 + private int preferredWidth;
36 42
37 - private int preferredWidth;
43 + /**
44 + * Construct a new {@link PreferredWidthProperty}.
45 + *
46 + * @param preferredWidth the preferred column width
47 + */
48 + public PreferredWidthProperty( int preferredWidth )
49 + {
50 + this.preferredWidth = preferredWidth;
51 + }
38 52
39 - /**
40 - * Construct a new {@link PreferredWidthProperty}.
41 - *
42 - * @param preferredWidth the preferred column width
43 - */
44 - public PreferredWidthProperty(int preferredWidth) {
45 - this.preferredWidth = preferredWidth;
46 - }
47 -
48 - /**
49 - * Returns the preferred width of the column in pixels. Views should respect
50 - * the preferred column width and attempt to size the column to its preferred
51 - * width. If the column must be resized, the preferred width should serve as a
52 - * weight relative to the preferred widths of other ColumnDefinitions.
53 - *
54 - * @return the preferred width of the column
55 - */
56 - public int getPreferredColumnWidth() {
57 - return preferredWidth;
58 - }
53 + /**
54 + * Returns the preferred width of the column in pixels. Views should respect
55 + * the preferred column width and attempt to size the column to its preferred
56 + * width. If the column must be resized, the preferred width should serve as a
57 + * weight relative to the preferred widths of other ColumnDefinitions.
58 + *
59 + * @return the preferred width of the column
60 + */
61 + public int getPreferredColumnWidth()
62 + {
63 + return preferredWidth;
64 + }
59 65 }