diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-10-22 01:01:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-10-22 01:01:27 +0000 |
commit | 057b2275244ddf3755038adade5728fa429ba221 (patch) | |
tree | 57cad641266d7f0a59a66c6c97cddc17c4e4bf95 | |
parent | 0e4533e986b7d7d27850d896451a457c05650c9d (diff) | |
parent | 84275b24d6b3676b9eb7c97744ba47a552cd71a2 (diff) |
Merge "Remove hideHandler from CopyableLabel" into stable-2.8
-rw-r--r-- | gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java index 52c5ed806c..c4f887eff3 100644 --- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java +++ b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java @@ -14,9 +14,6 @@ package com.google.gwtexpui.clippy.client; -import static com.google.gwt.dom.client.Style.Visibility.HIDDEN; -import static com.google.gwt.dom.client.Style.Visibility.VISIBLE; - import com.google.gwt.core.client.Scheduler; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; @@ -24,7 +21,6 @@ import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.KeyPressEvent; import com.google.gwt.event.dom.client.KeyPressHandler; -import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.http.client.URL; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; @@ -37,8 +33,6 @@ import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.TextBox; import com.google.gwtexpui.safehtml.client.SafeHtml; import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder; -import com.google.gwtexpui.user.client.DialogVisibleEvent; -import com.google.gwtexpui.user.client.DialogVisibleHandler; import com.google.gwtexpui.user.client.UserAgent; /** @@ -76,7 +70,6 @@ public class CopyableLabel extends Composite implements HasText { private Label textLabel; private TextBox textBox; private Element swf; - private HandlerRegistration hideHandler; public CopyableLabel() { this(""); @@ -162,27 +155,6 @@ public class CopyableLabel extends Composite implements HasText { getElement().removeChild(swf); } DOM.appendChild(getElement(), swf = SafeHtml.parse(h)); - initHideHandler(); - } - } - - private void initHideHandler() { - if (hideHandler == null && swf != null && isAttached()) { - hideHandler = - UserAgent.addDialogVisibleHandler(new DialogVisibleHandler() { - @Override - public void onDialogVisible(DialogVisibleEvent event) { - if (event.contains(CopyableLabel.this)) { - if (event.isVisible()) { - swf.getStyle().setVisibility(VISIBLE); - } - } else { - swf.getStyle().setVisibility(event.isVisible() - ? HIDDEN - : VISIBLE); - } - } - }); } } @@ -204,19 +176,6 @@ public class CopyableLabel extends Composite implements HasText { embedMovie(); } - @Override - protected void onLoad() { - initHideHandler(); - } - - @Override - protected void onUnload() { - if (hideHandler != null) { - hideHandler.removeHandler(); - hideHandler = null; - } - } - private void showTextBox() { if (textBox == null) { textBox = new TextBox(); |