summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/TreeTable.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-07-23 15:23:43 +0300
committerLeif Åstrand <leif@vaadin.com>2012-07-23 15:23:43 +0300
commit3604bf01ded16d21041cbb655632429e00c94639 (patch)
tree9bf7ae9d3a33e6b672c164e696a24aef08ebc13e /src/com/vaadin/ui/TreeTable.java
parentb7982bac6d8bca02fc76c9974ffd1c24d9a06f04 (diff)
downloadvaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.tar.gz
vaadin-framework-3604bf01ded16d21041cbb655632429e00c94639.zip
Add Java 6 @Override annotations to all methods from interfaces
Diffstat (limited to 'src/com/vaadin/ui/TreeTable.java')
-rw-r--r--src/com/vaadin/ui/TreeTable.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/TreeTable.java b/src/com/vaadin/ui/TreeTable.java
index 3294f6fab0..6132b652f7 100644
--- a/src/com/vaadin/ui/TreeTable.java
+++ b/src/com/vaadin/ui/TreeTable.java
@@ -82,6 +82,7 @@ public class TreeTable extends Table implements Hierarchical {
* scalability with some container implementations.
*/
+ @Override
public int getDepth(Object itemId) {
int depth = 0;
Hierarchical hierarchicalContainer = getContainerDataSource();
@@ -92,6 +93,7 @@ public class TreeTable extends Table implements Hierarchical {
return depth;
}
+ @Override
public void containerItemSetChange(ItemSetChangeEvent event) {
}
@@ -110,44 +112,54 @@ public class TreeTable extends Table implements Hierarchical {
return (Collapsible) getContainerDataSource();
}
+ @Override
public void toggleChildVisibility(Object itemId) {
c().setCollapsed(itemId, !c().isCollapsed(itemId));
}
+ @Override
public boolean isNodeOpen(Object itemId) {
return !c().isCollapsed(itemId);
}
+ @Override
public int size() {
return TreeTable.super.size();
}
+ @Override
public Object getIdByIndex(int index) {
return TreeTable.super.getIdByIndex(index);
}
+ @Override
public int indexOfId(Object id) {
return TreeTable.super.indexOfId(id);
}
+ @Override
public boolean isLastId(Object itemId) {
// using the default impl
return TreeTable.super.isLastId(itemId);
}
+ @Override
public Object lastItemId() {
// using the default impl
return TreeTable.super.lastItemId();
}
+ @Override
public Object nextItemId(Object itemId) {
return TreeTable.super.nextItemId(itemId);
}
+ @Override
public Object prevItemId(Object itemId) {
return TreeTable.super.prevItemId(itemId);
}
+ @Override
public Collection<?> getItemIds() {
return TreeTable.super.getItemIds();
}
@@ -165,18 +177,22 @@ public class TreeTable extends Table implements Hierarchical {
private final HashSet<Object> openItems = new HashSet<Object>();
+ @Override
public boolean isNodeOpen(Object itemId) {
return openItems.contains(itemId);
}
+ @Override
public int size() {
return getPreOrder().size();
}
+ @Override
public Collection<Object> getItemIds() {
return Collections.unmodifiableCollection(getPreOrder());
}
+ @Override
public boolean isLastId(Object itemId) {
if (itemId == null) {
return false;
@@ -185,6 +201,7 @@ public class TreeTable extends Table implements Hierarchical {
return itemId.equals(lastItemId());
}
+ @Override
public Object lastItemId() {
if (getPreOrder().size() > 0) {
return getPreOrder().get(getPreOrder().size() - 1);
@@ -193,6 +210,7 @@ public class TreeTable extends Table implements Hierarchical {
}
}
+ @Override
public Object nextItemId(Object itemId) {
int indexOf = getPreOrder().indexOf(itemId);
if (indexOf == -1) {
@@ -206,6 +224,7 @@ public class TreeTable extends Table implements Hierarchical {
}
}
+ @Override
public Object prevItemId(Object itemId) {
int indexOf = getPreOrder().indexOf(itemId);
indexOf--;
@@ -216,6 +235,7 @@ public class TreeTable extends Table implements Hierarchical {
}
}
+ @Override
public void toggleChildVisibility(Object itemId) {
boolean removed = openItems.remove(itemId);
if (!removed) {
@@ -265,10 +285,12 @@ public class TreeTable extends Table implements Hierarchical {
}
+ @Override
public int indexOfId(Object id) {
return getPreOrder().indexOf(id);
}
+ @Override
public Object getIdByIndex(int index) {
return getPreOrder().get(index);
}
@@ -610,36 +632,44 @@ public class TreeTable extends Table implements Hierarchical {
return getContainerStrategy().getItemIds();
}
+ @Override
public boolean areChildrenAllowed(Object itemId) {
return getContainerDataSource().areChildrenAllowed(itemId);
}
+ @Override
public Collection<?> getChildren(Object itemId) {
return getContainerDataSource().getChildren(itemId);
}
+ @Override
public Object getParent(Object itemId) {
return getContainerDataSource().getParent(itemId);
}
+ @Override
public boolean hasChildren(Object itemId) {
return getContainerDataSource().hasChildren(itemId);
}
+ @Override
public boolean isRoot(Object itemId) {
return getContainerDataSource().isRoot(itemId);
}
+ @Override
public Collection<?> rootItemIds() {
return getContainerDataSource().rootItemIds();
}
+ @Override
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed)
throws UnsupportedOperationException {
return getContainerDataSource().setChildrenAllowed(itemId,
areChildrenAllowed);
}
+ @Override
public boolean setParent(Object itemId, Object newParentId)
throws UnsupportedOperationException {
return getContainerDataSource().setParent(itemId, newParentId);