Undeprecate HandlerManager and TabPanel, neither of which is quite
ready to die yet.

Review at http://gwt-code-reviews.appspot.com/1187801

Review by: jlabanca@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9358 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/event/shared/HandlerManager.java b/user/src/com/google/gwt/event/shared/HandlerManager.java
index 4621491..73d181e 100644
--- a/user/src/com/google/gwt/event/shared/HandlerManager.java
+++ b/user/src/com/google/gwt/event/shared/HandlerManager.java
@@ -19,12 +19,16 @@
 
 /**
  * Manager responsible for adding handlers to event sources and firing those
- * handlers on passed in events. Primitive ancestor of {@link EventBus},
- * and used at the core of {com.google.gwt.user.client.ui.Widget}.
- *
- * @deprecated use {@link SimpleEventBus}.
+ * handlers on passed in events. Primitive ancestor of {@link EventBus}, and
+ * used at the core of {com.google.gwt.user.client.ui.Widget}.
+ * <p>
+ * While widget authors should continue to use
+ * {@link com.google.gwt.user.client.ui.Widget#addDomHandler(EventHandler, com.google.gwt.event.dom.client.DomEvent.Type)}
+ * and
+ * {@link com.google.gwt.user.client.ui.Widget#addHandler(EventHandler, Type)},
+ * application developers are strongly discouraged from using a HandlerManager
+ * instance as a global event dispatch mechanism.
  */
-@Deprecated
 public class HandlerManager implements HasHandlers {
 
   private final SimpleEventBus eventBus;
@@ -50,6 +54,7 @@
    * @param source the event source
    * @param fireInReverseOrder true to fire handlers in reverse order
    */
+  @SuppressWarnings("deprecation")
   public HandlerManager(Object source, boolean fireInReverseOrder) {
     eventBus = new SimpleEventBus(fireInReverseOrder);
     this.source = source;
@@ -114,6 +119,7 @@
    * @param type the handler's event type
    * @return the given handler
    */
+  @SuppressWarnings("deprecation")
   public <H extends EventHandler> H getHandler(GwtEvent.Type<H> type, int index) {
     return eventBus.getHandler(type, index);
   }
@@ -124,6 +130,7 @@
    * @param type the event type
    * @return the number of registered handlers
    */
+  @SuppressWarnings("deprecation")
   public int getHandlerCount(Type<?> type) {
     return eventBus.getHandlerCount(type);
   }
@@ -134,6 +141,7 @@
    * @param e the event type
    * @return whether the given event type is handled
    */
+  @SuppressWarnings("deprecation")
   public boolean isEventHandled(Type<?> e) {
     return eventBus.isEventHandled(e);
   }
diff --git a/user/src/com/google/gwt/user/client/ui/TabPanel.java b/user/src/com/google/gwt/user/client/ui/TabPanel.java
index 1253cdf..fc609e9 100644
--- a/user/src/com/google/gwt/user/client/ui/TabPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/TabPanel.java
@@ -59,17 +59,12 @@
  * {@example com.google.gwt.examples.TabPanelExample}
  * </p>
  *
- * @deprecated Use {@link TabLayoutPanel} instead, but understand that it is
- *             not a drop in replacement for this class. It requires standards
- *             mode, and is most easily used under a {@link RootLayoutPanel} (as
- *             opposed to a {@link RootPanel}
- *
  * @see TabLayoutPanel
  */
 
 // Cannot do anything about tab panel implementing TabListener until next
 // release
-@Deprecated
+@SuppressWarnings("deprecation")
 public class TabPanel extends Composite implements TabListener,
     SourcesTabEvents, HasWidgets, HasAnimation, IndexedPanel.ForIsWidget,
     HasBeforeSelectionHandlers<Integer>, HasSelectionHandlers<Integer> {
diff --git a/user/src/com/google/gwt/user/client/ui/Widget.java b/user/src/com/google/gwt/user/client/ui/Widget.java
index e0138a0..18082ab 100644
--- a/user/src/com/google/gwt/user/client/ui/Widget.java
+++ b/user/src/com/google/gwt/user/client/ui/Widget.java
@@ -55,7 +55,6 @@
    */
   int eventsToSink;
   private boolean attached;
-  @SuppressWarnings("deprecation")
   private HandlerManager handlerManager;
   private Object layoutData;
   private Widget parent;
@@ -74,7 +73,6 @@
    * @param handler the handler
    * @return {@link HandlerRegistration} used to remove the handler
    */
-  @SuppressWarnings("deprecation")
   public final <H extends EventHandler> HandlerRegistration addDomHandler(
       final H handler, DomEvent.Type<H> type) {
     assert handler != null : "handler must not be null";
@@ -91,7 +89,6 @@
    * @param handler the handler
    * @return {@link HandlerRegistration} used to remove the handler
    */
-  @SuppressWarnings("deprecation")
   public final <H extends EventHandler> HandlerRegistration addHandler(
       final H handler, GwtEvent.Type<H> type) {
     return ensureHandlers().addHandler(type, handler);
@@ -101,7 +98,6 @@
     return this;
   }
 
-  @SuppressWarnings("deprecation")
   public void fireEvent(GwtEvent<?> event) {
     if (handlerManager != null) {
       handlerManager.fireEvent(event);
@@ -228,7 +224,6 @@
    *
    * @return the {@link HandlerManager} you want to use
    */
-  @SuppressWarnings("deprecation")
   protected com.google.gwt.event.shared.HandlerManager createHandlerManager() {
     return new com.google.gwt.event.shared.HandlerManager(this);
   }
@@ -272,7 +267,6 @@
    * @param type the event type
    * @return the number of registered handlers
    */
-  @SuppressWarnings("deprecation")
   protected int getHandlerCount(Type<?> type) {
     return handlerManager == null ? 0 : handlerManager.getHandlerCount(type);
   }
@@ -396,13 +390,11 @@
    *
    * @return the handler manager
    * */
-  @SuppressWarnings("deprecation")
   com.google.gwt.event.shared.HandlerManager ensureHandlers() {
     return handlerManager == null ? handlerManager = createHandlerManager()
         : handlerManager;
   }
 
-  @SuppressWarnings("deprecation")
   com.google.gwt.event.shared.HandlerManager getHandlerManager() {
     return handlerManager;
   }