Revision: 7697
Author: [email protected]
Date: Wed Mar 10 09:49:59 2010
Log: Adds missing header/text-header classes from previous commit.

http://code.google.com/p/google-web-toolkit/source/detail?r=7697

Added:
 /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/Header.java
 /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/TextHeader.java

=======================================
--- /dev/null
+++ /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/Header.java Wed Mar 10 09:49:59 2010
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.bikeshed.list.client;
+
+import com.google.gwt.bikeshed.cells.client.Cell;
+import com.google.gwt.bikeshed.cells.client.ValueUpdater;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.dom.client.NativeEvent;
+
+public class Header<H> {
+  private final Cell<H> cell;
+  private ValueUpdater<H> updater;
+  private H value;
+
+  public H getValue() {
+    return value;
+  }
+
+  public void setValue(H value) {
+    this.value = value;
+  }
+
+  public Header(Cell<H> cell) {
+    this.cell = cell;
+  }
+
+  public void setUpdater(ValueUpdater<H> updater) {
+    this.updater = updater;
+  }
+
+  public void onBrowserEvent(Element elem, NativeEvent event) {
+    cell.onBrowserEvent(elem, value, event, updater);
+  }
+
+  public void render(StringBuilder sb) {
+    cell.render(value, sb);
+  }
+}
=======================================
--- /dev/null
+++ /trunk/bikeshed/src/com/google/gwt/bikeshed/list/client/TextHeader.java Wed Mar 10 09:49:59 2010
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.bikeshed.list.client;
+
+import com.google.gwt.bikeshed.cells.client.TextCell;
+
+public class TextHeader extends Header<String> {
+
+  public TextHeader(String text) {
+    super(new TextCell());
+    setValue(text);
+  }
+}

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to