summaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/Tree.java
diff options
context:
space:
mode:
authorPetri Heinonen <petri@vaadin.com>2012-08-23 13:00:17 +0300
committerLeif Åstrand <leif@vaadin.com>2012-08-30 15:32:24 +0300
commitf32d6ab1db5c4732fa3fd13ff8714db6197cc3d4 (patch)
treef2a6d30671a3bbadf2beafc9f90d2c8fd54bf871 /server/src/com/vaadin/ui/Tree.java
parent181904db6aa50a10383f098f022da7d4ed801738 (diff)
downloadvaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.tar.gz
vaadin-framework-f32d6ab1db5c4732fa3fd13ff8714db6197cc3d4.zip
refak listeners com.vaadin.ui
Diffstat (limited to 'server/src/com/vaadin/ui/Tree.java')
-rw-r--r--server/src/com/vaadin/ui/Tree.java66
1 files changed, 60 insertions, 6 deletions
diff --git a/server/src/com/vaadin/ui/Tree.java b/server/src/com/vaadin/ui/Tree.java
index 529847d54c..9cf1aa3511 100644
--- a/server/src/com/vaadin/ui/Tree.java
+++ b/server/src/com/vaadin/ui/Tree.java
@@ -906,22 +906,40 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param listener
* the Listener to be added.
*/
- public void addListener(ExpandListener listener) {
+ public void addExpandListener(ExpandListener listener) {
addListener(ExpandEvent.class, listener, ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void addListener(ExpandListener listener) {
+ addExpandListener(listener);
+ }
+
+ /**
* Removes the expand listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(ExpandListener listener) {
+ public void removeExpandListener(ExpandListener listener) {
removeListener(ExpandEvent.class, listener,
ExpandListener.EXPAND_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeExpandListener(ExpandListener)}
+ **/
+ @Deprecated
+ public void removeListener(ExpandListener listener) {
+ removeExpandListener(listener);
+ }
+
+ /**
* Emits the expand event.
*
* @param itemId
@@ -991,23 +1009,41 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
* @param listener
* the Listener to be added.
*/
- public void addListener(CollapseListener listener) {
+ public void addCollapseListener(CollapseListener listener) {
addListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void addListener(CollapseListener listener) {
+ addCollapseListener(listener);
+ }
+
+ /**
* Removes the collapse listener.
*
* @param listener
* the Listener to be removed.
*/
- public void removeListener(CollapseListener listener) {
+ public void removeCollapseListener(CollapseListener listener) {
removeListener(CollapseEvent.class, listener,
CollapseListener.COLLAPSE_METHOD);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeCollapseListener(CollapseListener)}
+ **/
+ @Deprecated
+ public void removeListener(CollapseListener listener) {
+ removeCollapseListener(listener);
+ }
+
+ /**
* Emits collapse event.
*
* @param itemId
@@ -1162,18 +1198,36 @@ public class Tree extends AbstractSelect implements Container.Hierarchical,
private DropHandler dropHandler;
@Override
- public void addListener(ItemClickListener listener) {
+ public void addItemClickListener(ItemClickListener listener) {
addListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener, ItemClickEvent.ITEM_CLICK_METHOD);
}
+ /**
+ * @deprecated Since 7.0, replaced by
+ * {@link #addItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void addListener(ItemClickListener listener) {
+ addItemClickListener(listener);
+ }
+
@Override
- public void removeListener(ItemClickListener listener) {
+ public void removeItemClickListener(ItemClickListener listener) {
removeListener(TreeConstants.ITEM_CLICK_EVENT_ID, ItemClickEvent.class,
listener);
}
/**
+ * @deprecated Since 7.0, replaced by
+ * {@link #removeItemClickListener(ItemClickListener)}
+ **/
+ @Deprecated
+ public void removeListener(ItemClickListener listener) {
+ removeItemClickListener(listener);
+ }
+
+ /**
* Sets the {@link ItemStyleGenerator} to be used with this tree.
*
* @param itemStyleGenerator