Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/com/google/gwt/gen2/table/client/TableModel.java

Diff revisions: vs.
  @@ -24,8 +24,7 @@
24 24 *
25 25 * @param <RowType> the data type of the row values
26 26 */
27 - public abstract class TableModel<RowType> implements HasRowCountChangeHandlers
28 - {
27 + public abstract class TableModel<RowType> implements HasRowCountChangeHandlers {
29 28 /**
30 29 * Callback for {@link TableModel}. Every {@link Request} should be associated
31 30 * with a {@link TableModel.Callback} that should be called after a
  @@ -33,8 +32,7 @@
33 32 *
34 33 * @param <RowType> the data type of the row values
35 34 */
36 - public static interface Callback<RowType>
37 - {
35 + public static interface Callback<RowType> {
38 36 /**
39 37 * Called when an error occurs and the rows cannot be loaded.
40 38 *
  @@ -72,8 +70,7 @@
72 70 */
73 71 private int rowCount = UNKNOWN_ROW_COUNT;
74 72
75 - public HandlerRegistration addRowCountChangeHandler( RowCountChangeHandler handler )
76 - {
73 + public HandlerRegistration addRowCountChangeHandler( RowCountChangeHandler handler ) {
77 74 return addHandler( RowCountChangeEvent.TYPE, handler );
78 75 }
79 76
  @@ -83,8 +80,7 @@
83 80 *
84 81 * @return the total number of rows, or {@link #UNKNOWN_ROW_COUNT}
85 82 */
86 - public int getRowCount()
87 - {
83 + public int getRowCount() {
88 84 return rowCount;
89 85 }
90 86
  @@ -102,10 +98,8 @@
102 98 *
103 99 * @param rowCount the row count
104 100 */
105 - public void setRowCount( int rowCount )
106 - {
107 - if ( this.rowCount != rowCount )
108 - {
101 + public void setRowCount( int rowCount ) {
102 + if ( this.rowCount != rowCount ) {
109 103 int oldRowCount = this.rowCount;
110 104 this.rowCount = rowCount;
111 105 fireEvent( new RowCountChangeEvent( oldRowCount, rowCount ) );
  @@ -118,8 +112,7 @@
118 112 * @param key the event key
119 113 * @param handler the handler
120 114 */
121 - protected <HandlerType extends EventHandler> HandlerRegistration addHandler( AbstractEvent.Type<?, HandlerType> key, final HandlerType handler )
122 - {
115 + protected <HandlerType extends EventHandler> HandlerRegistration addHandler( AbstractEvent.Type<?, HandlerType> key, final HandlerType handler ) {
123 116 return handlers.addHandler( key, handler );
124 117 }
125 118
  @@ -128,24 +121,21 @@
128 121 *
129 122 * @param event the event
130 123 */
131 - protected void fireEvent( AbstractEvent event )
132 - {
124 + protected void fireEvent( AbstractEvent event ) {
133 125 handlers.fireEvent( event );
134 126 }
135 127
136 128 /**
137 129 * Returns this widget's {@link HandlerManager} used for event management.
138 130 */
139 - protected final HandlerManager getHandlerManager()
140 - {
131 + protected final HandlerManager getHandlerManager() {
141 132 return handlers;
142 133 }
143 134
144 135 /**
145 136 * Is the event handled by one or more handlers?
146 137 */
147 - protected final boolean isEventHandled( AbstractEvent.Type key )
148 - {
138 + protected final boolean isEventHandled( AbstractEvent.Type key ) {
149 139 return handlers.isEventHandled( key );
150 140 }
151 141
  @@ -158,8 +148,7 @@
158 148 * @param key the event key
159 149 * @param handler the handler
160 150 */
161 - protected <T extends EventHandler> void removeHandler( AbstractEvent.Type<?, T> key, final T handler )
162 - {
151 + protected <T extends EventHandler> void removeHandler( AbstractEvent.Type<?, T> key, final T handler ) {
163 152 handlers.removeHandler( key, handler );
164 153 }
165 154 }