summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-06-16 07:31:43 (EDT)
committerCarsten Drossel2008-06-16 07:31:43 (EDT)
commit34ae352fd7923de54816a1fc3a4f2634b4c64758 (patch)
tree327f32507b18102782df5b2d9bbea803e561f151
parent6e6565ac1e19e3f5cdf22123917a0aa2b530e06a (diff)
downloadorg.eclipse.riena-34ae352fd7923de54816a1fc3a4f2634b4c64758.zip
org.eclipse.riena-34ae352fd7923de54816a1fc3a4f2634b4c64758.tar.gz
org.eclipse.riena-34ae352fd7923de54816a1fc3a4f2634b4c64758.tar.bz2
fixed copyright headers and comments to comply with Riena standards
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractLazyUserTreeElementIterator.java40
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractUserTreeElement.java30
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeModel.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeNode.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeModel.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeNode.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicLoadTreeModel.java20
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeModificationProcess.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeNode.java85
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeReloadEvent.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ExpansionRetainingDynamicTreeModificationProcess.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IDynamicTreeReloadListener.java24
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModel.java85
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModelListener.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNode.java49
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNodeToolTip.java28
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElement.java43
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElementFilter.java27
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeModel.java57
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeNode.java40
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/LoadNodeProcess.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ResetRootChildrenProcess.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ToolTipTreeNode.java36
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/TreeModelEvent.java19
-rw-r--r--org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ValueTreeNode.java33
25 files changed, 441 insertions, 365 deletions
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractLazyUserTreeElementIterator.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractLazyUserTreeElementIterator.java
index 83115c2..c01f4d6 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractLazyUserTreeElementIterator.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractLazyUserTreeElementIterator.java
@@ -1,37 +1,39 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.Collection;
import java.util.Iterator;
/**
- * A helper class wrapping an Iterator for the children of an IUserTreeElement that will
- * not create the actual iterator until the first element is accessed using next(). Before
- * that hasNext() is determined otherwise.
- *
- * @author Carsten Drossel
+ * A helper class wrapping an Iterator for the children of an IUserTreeElement
+ * that will not create the actual iterator until the first element is accessed
+ * using next(). Before that hasNext() is determined otherwise.
*/
public abstract class AbstractLazyUserTreeElementIterator implements Iterator<Collection<IUserTreeElement>> {
private Iterator<Collection<IUserTreeElement>> wrappee;
/**
- * Indicates whether the element has children. Used as the return value for hasNext()
- * until the first call of next(). May return true even though the actual iterator is
- * empty.
+ * Indicates whether the element has children. Used as the return value for
+ * hasNext() until the first call of next(). May return true even though the
+ * actual iterator is empty.
*
* @return true if the element has children, false otherwise.
*/
protected abstract boolean hasChildren();
/**
- * Creates the actual iterator. Invoked when next() is called for the first time.
+ * Creates the actual iterator. Invoked when next() is called for the first
+ * time.
*
* @return The actual iterator of the elements children.
*/
@@ -41,7 +43,7 @@ public abstract class AbstractLazyUserTreeElementIterator implements Iterator<Co
* @see java.util.Iterator#hasNext()
*/
public boolean hasNext() {
- if ( wrappee != null ) {
+ if (wrappee != null) {
return wrappee.hasNext();
} else {
return hasChildren();
@@ -52,9 +54,9 @@ public abstract class AbstractLazyUserTreeElementIterator implements Iterator<Co
* @see java.util.Iterator#next()
*/
public Collection<IUserTreeElement> next() {
- if ( wrappee == null ) {
+ if (wrappee == null) {
wrappee = getChildIterator();
- if ( wrappee == null || !wrappee.hasNext() ) {
+ if (wrappee == null || !wrappee.hasNext()) {
return null;
}
}
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractUserTreeElement.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractUserTreeElement.java
index ceffd2a..cfe5802 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractUserTreeElement.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/AbstractUserTreeElement.java
@@ -1,16 +1,17 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
* Abstract implementation of <code>IUserTreeElement</code>.
- *
- * @author Thorsten Schenkel
*/
public abstract class AbstractUserTreeElement implements IUserTreeElement {
@@ -19,7 +20,7 @@ public abstract class AbstractUserTreeElement implements IUserTreeElement {
/**
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.IUserTreeElement#setFilter(de.compeople.spirit.core.client.uibinding.adapter.tree.IUserTreeElementFilter)
*/
- public void setFilter( IUserTreeElementFilter filter ) {
+ public void setFilter(IUserTreeElementFilter filter) {
this.filter = filter;
}
@@ -34,13 +35,14 @@ public abstract class AbstractUserTreeElement implements IUserTreeElement {
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.IUserTreeElement#hasFilter()
*/
public boolean hasFilter() {
- return ( filter != null );
+ return (filter != null);
}
/**
- * Returns a default value that will be displayed as a placeholder for a child that is in
- * the process of being loaded. May be overridden by subclasses to return some more
- * specific information about what is loaded like "Loading files...".
+ * Returns a default value that will be displayed as a placeholder for a
+ * child that is in the process of being loaded. May be overridden by
+ * subclasses to return some more specific information about what is loaded
+ * like "Loading files...".
*
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.IUserTreeElement#getLoadingChildValue()
*/
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeModel.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeModel.java
index 84cea7e..2d447ac 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeModel.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeModel.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
@@ -15,8 +18,6 @@ import org.eclipse.riena.ui.ridgets.UIBindingFailure;
/**
* Class <code>ChangeVisibilityTreeModel</code> provides an interface to
* change the visibility of its nodes.
- *
- * @author Frank Schepp
*/
public class ChangeVisibilityTreeModel extends DefaultTreeModel implements IVisibleTreeModel {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeNode.java
index ae064af..a3844c8 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ChangeVisibilityTreeNode.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.Enumeration;
@@ -15,8 +18,6 @@ import org.eclipse.core.runtime.Assert;
/**
* Nodes of class <code>ChangeVisibilityTreeNode</code> can change their
* visibility (visible/invisible).
- *
- * @author Frank Schepp
*/
public class ChangeVisibilityTreeNode extends ToolTipTreeNode implements IVisibleTreeNode {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeModel.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeModel.java
index 7abf280..82cd88d 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeModel.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeModel.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
@@ -18,8 +21,6 @@ import org.eclipse.riena.ui.ridgets.UIBindingFailure;
/**
* A simple tree data model that uses <code>DefaultTreeNode</code>.
- *
- * @author Thorsten Schenkel
*/
public class DefaultTreeModel extends AbstractObservableValue implements ITreeModel {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeNode.java
index 31ef60f..fbc1125 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DefaultTreeNode.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.Vector;
@@ -14,8 +17,6 @@ import org.eclipse.core.runtime.Assert;
/**
* A <code>DefaultTreeNode</code> is a general-purpose node in a tree data
* structure.
- *
- * @author Thorsten Schenkel
*/
public class DefaultTreeNode implements ITreeNode {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicLoadTreeModel.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicLoadTreeModel.java
index bd3e45d..b2b4265 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicLoadTreeModel.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicLoadTreeModel.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.ArrayList;
@@ -15,9 +18,6 @@ import org.eclipse.riena.ui.ridgets.obsolete.ITreeAdapter;
/**
* Model of a <code>DynamicTree</code>.
- *
- * @author Thorsten Schenkel
- * @author Carsten Drossel
*/
public class DynamicLoadTreeModel extends DefaultTreeModel {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeModificationProcess.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeModificationProcess.java
index f47a598..6c10cbf 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeModificationProcess.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeModificationProcess.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import org.eclipse.riena.ui.core.uiprocess.IUISynchronizer;
@@ -12,8 +15,6 @@ import org.eclipse.riena.ui.core.uiprocess.UIProcess;
/**
* A UI process that modifies a dynamic tree.
- *
- * @author Carsten Drossel
*/
abstract class DynamicTreeModificationProcess extends UIProcess {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeNode.java
index 753a9a9..534b783 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeNode.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.Collection;
@@ -14,33 +17,34 @@ import java.util.List;
/**
* A node of a tree that is dynamic.
- *
- * @author Thorsten Schenkel
- * @author Carsten Drossel
*/
public class DynamicTreeNode extends DefaultTreeNode {
private Iterator<? extends Collection<? extends IUserTreeElement>> unloadedChildren;
/**
- * Constructor. Creates a tree node with the given parent and initializes it with the specified user element.
- *
- * @param parent - the parent of the tree element.
- * @param userElement - an element provided by the user that constitutes the data of the tree element.
+ * Constructor. Creates a tree node with the given parent and initializes it
+ * with the specified user element.
+ *
+ * @param parent -
+ * the parent of the tree element.
+ * @param userElement -
+ * an element provided by the user that constitutes the data of
+ * the tree element.
*/
- public DynamicTreeNode( DynamicTreeNode parent, IUserTreeElement userElement ) {
+ public DynamicTreeNode(DynamicTreeNode parent, IUserTreeElement userElement) {
- super( parent, userElement );
+ super(parent, userElement);
}
/**
* Returns whether the user object is loaded or not.
- *
- * @return true if user object is loaded, false if it is not loaded or in the
- * process of being loaded.
+ *
+ * @return true if user object is loaded, false if it is not loaded or in
+ * the process of being loaded.
*/
public boolean isLoaded() {
- return !( getUserObject() instanceof PlaceholderUserTreeElement );
+ return !(getUserObject() instanceof PlaceholderUserTreeElement);
}
/**
@@ -52,14 +56,14 @@ public class DynamicTreeNode extends DefaultTreeNode {
*/
ValueTreeNode getLoadedSubTreeValues() {
- ValueTreeNode loadedSubTreeRoot = new ValueTreeNode( toString() );
+ ValueTreeNode loadedSubTreeRoot = new ValueTreeNode(toString());
- for ( int i = 0; i < getChildCount(); i++ ) {
- DynamicTreeNode childNode = ( (DynamicTreeNode) children.get( i ) );
- if ( childNode.isLoaded() ) {
+ for (int i = 0; i < getChildCount(); i++) {
+ DynamicTreeNode childNode = ((DynamicTreeNode) children.get(i));
+ if (childNode.isLoaded()) {
ValueTreeNode childLoadedSubTreeValues = childNode.getLoadedSubTreeValues();
- if ( childLoadedSubTreeValues != null ) {
- loadedSubTreeRoot.add( childLoadedSubTreeValues );
+ if (childLoadedSubTreeValues != null) {
+ loadedSubTreeRoot.add(childLoadedSubTreeValues);
}
}
}
@@ -71,8 +75,8 @@ public class DynamicTreeNode extends DefaultTreeNode {
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.DefaultTreeNode#setUserObject(java.lang.Object)
*/
@Override
- public void setUserObject( Object userObject ) {
- super.setUserObject( userObject );
+ public void setUserObject(Object userObject) {
+ super.setUserObject(userObject);
resetChildIterator();
}
@@ -81,7 +85,7 @@ public class DynamicTreeNode extends DefaultTreeNode {
* Resets the iterator of unloaded children.
*/
void resetChildIterator() {
- if ( getUserObject() instanceof IUserTreeElement ) {
+ if (getUserObject() instanceof IUserTreeElement) {
unloadedChildren = getUserTreeElement().getChildren();
}
}
@@ -89,10 +93,11 @@ public class DynamicTreeNode extends DefaultTreeNode {
/**
* Checks whether there is another unloaded child to load.
*
- * @return true if the iterator of unloaded children has more, false otherwise.
+ * @return true if the iterator of unloaded children has more, false
+ * otherwise.
*/
boolean hasNextChildUserTreeElements() {
- if ( unloadedChildren != null ) {
+ if (unloadedChildren != null) {
return unloadedChildren.hasNext();
} else {
return false;
@@ -100,13 +105,13 @@ public class DynamicTreeNode extends DefaultTreeNode {
}
/**
- * Loads the next child tree user element by retrieving it from the iterator of
- * unloaded children.
+ * Loads the next child tree user element by retrieving it from the iterator
+ * of unloaded children.
*
* @return The user tree element of the next unloaded child.
*/
Collection<? extends IUserTreeElement> getNextChildUserTreeElements() {
- if ( unloadedChildren != null ) {
+ if (unloadedChildren != null) {
return unloadedChildren.next();
} else {
return null;
@@ -118,7 +123,7 @@ public class DynamicTreeNode extends DefaultTreeNode {
}
protected DynamicTreeNode createChildNode() {
- return new DynamicTreeNode( this, null );
+ return new DynamicTreeNode(this, null);
}
/**
@@ -129,12 +134,12 @@ public class DynamicTreeNode extends DefaultTreeNode {
}
private IUserTreeElement getUserTreeElement() {
- return ( (IUserTreeElement) getUserObject() );
+ return ((IUserTreeElement) getUserObject());
}
/**
- * A user tree element that is used as the placeholder for the next user tree
- * element to be retrieved from the iterator of unloaded children.
+ * A user tree element that is used as the placeholder for the next user
+ * tree element to be retrieved from the iterator of unloaded children.
*/
protected class PlaceholderUserTreeElement implements IUserTreeElement {
@@ -165,8 +170,8 @@ public class DynamicTreeNode extends DefaultTreeNode {
return getUserTreeElement().getLoadingChildValue();
}
- public void setFilter( IUserTreeElementFilter filter ) {
- // ignore
+ public void setFilter(IUserTreeElementFilter filter) {
+ // ignore
}
public IUserTreeElementFilter getFilter() {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeReloadEvent.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeReloadEvent.java
index a4fd057..47b1c5b 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeReloadEvent.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/DynamicTreeReloadEvent.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.EventObject;
@@ -14,8 +17,6 @@ import org.eclipse.core.runtime.Assert;
/**
* <code>DynamicTreeReloadEvent</code> is used to notify listeners that reload
* of tree elements has started or has stopped.
- *
- * @author Thorsten Schenkel
*/
public class DynamicTreeReloadEvent extends EventObject {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ExpansionRetainingDynamicTreeModificationProcess.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ExpansionRetainingDynamicTreeModificationProcess.java
index c5fbcb5..e7c5a7f 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ExpansionRetainingDynamicTreeModificationProcess.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ExpansionRetainingDynamicTreeModificationProcess.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.ArrayList;
@@ -23,8 +26,6 @@ import org.eclipse.riena.ui.ridgets.obsolete.ITreeAdapter;
* elements), resets the children of the root element and then attempts to
* restore the expansion by the values of the nodes previously expanded. Nodes
* that no longer exist due to the model change cannot be expanded.
- *
- * @author Carsten Drossel
*/
class ExpansionRetainingDynamicTreeModificationProcess extends DynamicTreeModificationProcess {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IDynamicTreeReloadListener.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IDynamicTreeReloadListener.java
index d2d0cbc..74eb1a7 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IDynamicTreeReloadListener.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IDynamicTreeReloadListener.java
@@ -1,25 +1,27 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.EventListener;
/**
* Defines an object which listens for <code>DynamicTreeReloadEvent</code> 's.
- *
- * @author Thorsten Schenkel
*/
public interface IDynamicTreeReloadListener extends EventListener {
/**
* Invoked when reload of tree elements has started or stopped.
*
- * @param e a <code>DynamicTreeReloadEvent</code> object.
+ * @param e
+ * a <code>DynamicTreeReloadEvent</code> object.
*/
- void reload( DynamicTreeReloadEvent e );
+ void reload(DynamicTreeReloadEvent e);
} // end interface
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModel.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModel.java
index 88bca79..2fad572 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModel.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModel.java
@@ -1,86 +1,101 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
- * The interface that defines a suitable data model for a <code>TreeAdapter</code>.
- *
- * @author Thorsten Schenkel
+ * The interface that defines a suitable data model for a
+ * <code>TreeAdapter</code>.
*/
public interface ITreeModel {
/**
- * Returns the child of <code>parent</code> at given index in the parent's child array.
- *
- * @param parent - a node in the tree, obtained from this data source.
- * @param index - the index of the child.
+ * Returns the child of <code>parent</code> at given index in the parent's
+ * child array.
+ *
+ * @param parent -
+ * a node in the tree, obtained from this data source.
+ * @param index -
+ * the index of the child.
* @return child the requested child.
* @pre parent != null
* @pre parent instanceof ITreeNode
*/
- Object getChild( Object parent, int index );
+ Object getChild(Object parent, int index);
/**
* Returns the number of children of <code>parent</code>.<br>
* Returns 0 if the node is a leaf or if it has no children.
- *
- * @param parent - a node in the tree, obtained from this data source.
+ *
+ * @param parent -
+ * a node in the tree, obtained from this data source.
* @return number of children
* @pre parent != null
* @pre parent instanceof ITreeNode
*/
- int getChildCount( Object parent );
+ int getChildCount(Object parent);
/**
* Returns the root of the tree.
- *
+ *
* @return root of the tree.
*/
Object getRoot();
/**
- * Returns the index of <code>child</code> in <code>parent</code>. If <code>parent</code> is null or <code>child</code> is null, returns -1.
- *
- * @param parent - a node in the tree, obtained from this data source.
- * @param child - the node we are interested in.
+ * Returns the index of <code>child</code> in <code>parent</code>. If
+ * <code>parent</code> is null or <code>child</code> is null, returns
+ * -1.
+ *
+ * @param parent -
+ * a node in the tree, obtained from this data source.
+ * @param child -
+ * the node we are interested in.
* @return the index of the <code>child</code> in the <code>parent</code>.
* @pre parent != null
* @pre parent instanceof ITreeNode
* @pre child != null
* @pre child instanceof ITreeNode
*/
- int getIndexOfChild( Object parent, Object child );
+ int getIndexOfChild(Object parent, Object child);
/**
* Returns whether the given <code>node</code> is a leaf or not.
- *
- * @param node - a node in the tree.
+ *
+ * @param node -
+ * a node in the tree.
* @return true if <code>node</code> is a leaf; otherwise false.
* @pre node != null
* @pre node instanceof ITreeNode
*/
- boolean isLeaf( Object node );
+ boolean isLeaf(Object node);
/**
- * Adds a listener for the <code>TreeModelEvent</code> posted after the tree changes.
- *
- * @param l - the listener to add.
+ * Adds a listener for the <code>TreeModelEvent</code> posted after the
+ * tree changes.
+ *
+ * @param l -
+ * the listener to add.
* @see #removeTreeModelListener(ITreeModelListener)
*/
- void addTreeModelListener( ITreeModelListener l );
+ void addTreeModelListener(ITreeModelListener l);
/**
- * Removes a listener previously added with <code>addTreeModelListener</code>.
- *
- * @param l - the listener to remove.
+ * Removes a listener previously added with
+ * <code>addTreeModelListener</code>.
+ *
+ * @param l -
+ * the listener to remove.
* @see #addTreeModelListener(ITreeModelListener)
*/
- void removeTreeModelListener( ITreeModelListener l );
+ void removeTreeModelListener(ITreeModelListener l);
/**
* Refresh the model.
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModelListener.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModelListener.java
index e6de12e..b67f390 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModelListener.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeModelListener.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.EventListener;
@@ -14,8 +17,6 @@ import org.eclipse.core.databinding.observable.IObservablesListener;
/**
* Defines the interface for an object that listens to changes in a
* <code>ITreeModel</code>.
- *
- * @author Thorsten Schenkel
*/
public interface ITreeModelListener extends EventListener, IObservablesListener {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNode.java
index 219d3ee..993ee45 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNode.java
@@ -1,36 +1,43 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
/**
- * Defines the requirements for an object that can be used as a tree node inside a <code>TreeAdapter</code>.
- *
- * @author Thorsten Schenkel
+ * Defines the requirements for an object that can be used as a tree node inside
+ * a <code>TreeAdapter</code>.
*/
public interface ITreeNode extends Serializable {
/**
* Returns the child <code>ITreeNode</code> at the given index.
* <p>
- * <b>Annotation </b>: Is the index negative, than an exception is thrown, because this is an error that is not expected. Otherwise the index is greater
- * than the (real) count of the children, than the return value is null. This is an error that can be possible, if the tree datas are not accurate. The tree
- * is still useable, only the not exisiting child node is not displayed.
+ * <b>Annotation </b>: Is the index negative, than an exception is thrown,
+ * because this is an error that is not expected. Otherwise the index is
+ * greater than the (real) count of the children, than the return value is
+ * null. This is an error that can be possible, if the tree datas are not
+ * accurate. The tree is still useable, only the not exisiting child node is
+ * not displayed.
*
- * @param childIndex - index of the child.
+ * @param childIndex -
+ * index of the child.
* @return child at the given index.
- *
+ *
*/
- ITreeNode getChildAt( int childIndex );
+ ITreeNode getChildAt(int childIndex);
/**
- * Returns the number of children <code>ITreeNode</code> the receiver contains.
+ * Returns the number of children <code>ITreeNode</code> the receiver
+ * contains.
*
* @return number of children.
*/
@@ -44,13 +51,14 @@ public interface ITreeNode extends Serializable {
ITreeNode getParent();
/**
- * Returns the index of given node in the receiver's children. If the receiver does not contain node, -1 will be returned.
+ * Returns the index of given node in the receiver's children. If the
+ * receiver does not contain node, -1 will be returned.
*
* @param node
* @return index of the node
* @pre node != null
*/
- int getIndex( ITreeNode node );
+ int getIndex(ITreeNode node);
/**
* Returns whether the node is a leaf or not.
@@ -63,7 +71,8 @@ public interface ITreeNode extends Serializable {
* The level of a node <code>n</code>:
* <ul>
* <li><code>n</code> is root, then <code>level = 0</code>.
- * <li><code>n</code> is not root and level of parent is <code>l</code>, then <code>level = l + 1</code>.
+ * <li><code>n</code> is not root and level of parent is <code>l</code>,
+ * then <code>level = l + 1</code>.
* </ul>
*
* @return level of the node in the tree.
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNodeToolTip.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNodeToolTip.java
index df844cf..880c7a1 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNodeToolTip.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ITreeNodeToolTip.java
@@ -1,16 +1,17 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
* Use for tree nodes which provide a tool tip.
- *
- * @author Frank Schepp
*/
public interface ITreeNodeToolTip {
@@ -20,9 +21,10 @@ public interface ITreeNodeToolTip {
String getToolTipText();
/**
- * @param toolTipText The toolTipText to set.
+ * @param toolTipText
+ * The toolTipText to set.
*/
- void setToolTipText( String toolTipText );
+ void setToolTipText(String toolTipText);
/**
* @return
@@ -32,7 +34,7 @@ public interface ITreeNodeToolTip {
/**
* @param selectedAsDropTarget
*/
- void setSelectedAsDropTarget( boolean selectedAsDropTarget );
+ void setSelectedAsDropTarget(boolean selectedAsDropTarget);
/**
* @return
@@ -42,5 +44,5 @@ public interface ITreeNodeToolTip {
/**
* @param dropOk
*/
- void setDropOk( boolean dropOk );
+ void setDropOk(boolean dropOk);
} \ No newline at end of file
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElement.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElement.java
index 193f9f8..2f65427 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElement.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElement.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
@@ -13,32 +16,31 @@ import java.util.Iterator;
/**
* Element used inside a dynamic tree.
- *
- * @author Thorsten Schenkel
*/
public interface IUserTreeElement extends Serializable {
/**
- * Indicates whether the element is a leaf in the tree. If not, it will be displayed as
- * a folder and it may have children but not necessarily.
+ * Indicates whether the element is a leaf in the tree. If not, it will be
+ * displayed as a folder and it may have children but not necessarily.
*
* @return true if the element is a leaf, false otherwise.
*/
boolean isLeaf();
/**
- * Returns an Iterator with all children of the element. The children are returned in
- * successive and disjunctive collections of child elements. The children may be returned
- * in a separate collection each, all in one collection or anything inbetween. If the
- * element does not have any children, either an empty Iterator or null may be returned.
- *
+ * Returns an Iterator with all children of the element. The children are
+ * returned in successive and disjunctive collections of child elements. The
+ * children may be returned in a separate collection each, all in one
+ * collection or anything inbetween. If the element does not have any
+ * children, either an empty Iterator or null may be returned.
+ *
* @return An Iterator with all children of the element.
*/
Iterator<? extends Collection<? extends IUserTreeElement>> getChildren();
/**
- * Returns the value that will be displayed as a placeholder for a child that is in
- * the process of being loaded.
+ * Returns the value that will be displayed as a placeholder for a child
+ * that is in the process of being loaded.
*
* @return The value of a child element that is being loaded.
*/
@@ -54,9 +56,10 @@ public interface IUserTreeElement extends Serializable {
/**
* Sets current filter. The filter is used to filter out tree elements. <br>
*
- * @param filter - the new filter to use; null, if no filter should be used.
+ * @param filter -
+ * the new filter to use; null, if no filter should be used.
*/
- void setFilter( IUserTreeElementFilter filter );
+ void setFilter(IUserTreeElementFilter filter);
/**
* Returns the currently used file filter. <br>
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElementFilter.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElementFilter.java
index 4d7c344..516ed2f 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElementFilter.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IUserTreeElementFilter.java
@@ -1,25 +1,28 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
* Filter for <code>IUserTreeElement</code>.
- *
- * @author Thorsten Schenkel
*/
public interface IUserTreeElementFilter {
/**
- * Returns true, if the given object matches the criterion defined by this filter.
+ * Returns true, if the given object matches the criterion defined by this
+ * filter.
*
- * @param object - the object to check.
+ * @param object -
+ * the object to check.
* @return true, if the element matches; otherwise false.
*/
- boolean filter( Object object );
+ boolean filter(Object object);
}
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeModel.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeModel.java
index e669d8f..bdc558b 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeModel.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeModel.java
@@ -1,62 +1,73 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
- * The interface that defines a suitable data model for a <code>TreeAdapter</code> for trees which may have invisible nodes.
- *
- * @author Frank Schepp
+ * The interface that defines a suitable data model for a
+ * <code>TreeAdapter</code> for trees which may have invisible nodes.
*/
public interface IVisibleTreeModel {
/**
- * Returns the child of <code>parent</code> at given index in the parent's visible children.
+ * Returns the child of <code>parent</code> at given index in the parent's
+ * visible children.
*
- * @param parent - a node in the tree, obtained from this data source.
- * @param index - the <code>index</code> of the child.
+ * @param parent -
+ * a node in the tree, obtained from this data source.
+ * @param index -
+ * the <code>index</code> of the child.
* @return child with <code>index</code>.
* @pre parent != null
* @pre parent instanceof IVisibleTreeNode
*/
- Object getVisibleChild( Object parent, int index );
+ Object getVisibleChild(Object parent, int index);
/**
* Returns the number of visible children of <code>parent</code>.<br>
* Returns 0 if the node is a leaf or if it has no children.
*
- * @param parent - a node in the tree, obtained from this data source.
+ * @param parent -
+ * a node in the tree, obtained from this data source.
* @return number of children.
* @pre parent != null
* @pre parent instanceof IVisibleTreeNode
*/
- int getVisibleChildCount( Object parent );
+ int getVisibleChildCount(Object parent);
/**
- * Returns the index of visible <code>child</code> in <code>parent</code>. If <code>parent</code> is null or <code>child</code> is null, returns
+ * Returns the index of visible <code>child</code> in <code>parent</code>.
+ * If <code>parent</code> is null or <code>child</code> is null, returns
* -1.
*
- * @param parent - a node in the tree, obtained from this data source.
- * @param child - the node we are interested in.
+ * @param parent -
+ * a node in the tree, obtained from this data source.
+ * @param child -
+ * the node we are interested in.
* @return the index of the <code>child</code> in the <code>parent</code>.
* @pre parent != null
* @pre parent instanceof IVisibleTreeNode
* @pre child != null
* @pre child instanceof IVisibleTreeNode
*/
- int getIndexOfVisibleChild( Object parent, Object child );
+ int getIndexOfVisibleChild(Object parent, Object child);
/**
- * Returns whether the given <code>node</code> is a leaf (i.e. <code>node</code> has no visible children) or not.
+ * Returns whether the given <code>node</code> is a leaf (i.e.
+ * <code>node</code> has no visible children) or not.
*
- * @param node - a node in the tree.
+ * @param node -
+ * a node in the tree.
* @return true if <code>node</code> is a leaf; otherwise false.
* @pre node != null
* @pre node instanceof IVisibleTreeNode
*/
- boolean isVisibleLeaf( Object node );
+ boolean isVisibleLeaf(Object node);
} \ No newline at end of file
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeNode.java
index fe6a91f..ce6a633 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/IVisibleTreeNode.java
@@ -1,47 +1,53 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
/**
- * Defines the requirements for an object that can be used as a tree node inside a <code>TreeSwingAdapter</code> and may be visible or invisible.
- *
- * @author Frank Schepp
+ * Defines the requirements for an object that can be used as a tree node inside
+ * a <code>TreeSwingAdapter</code> and may be visible or invisible.
*/
public interface IVisibleTreeNode extends Serializable {
/**
* Returns the visible child <code>ITreeNode</code> at the given index.
*
- * @param childIndex - index of the visible child.
+ * @param childIndex -
+ * index of the visible child.
* @return visible child at the given index.
*/
- IVisibleTreeNode getVisibleChildAt( int childIndex );
+ IVisibleTreeNode getVisibleChildAt(int childIndex);
/**
- * Returns the number of visible children <code>ITreeNode</code> the receiver contains.
+ * Returns the number of visible children <code>ITreeNode</code> the
+ * receiver contains.
*
* @return number of visible children.
*/
int getVisibleChildCount();
/**
- * Returns the index of given node in the receiver's visible children. If the receiver does not contain node, -1 will be returned.
+ * Returns the index of given node in the receiver's visible children. If
+ * the receiver does not contain node, -1 will be returned.
*
* @param node
* @return index of the node
* @pre node != null
*/
- int getVisibleIndex( IVisibleTreeNode node );
+ int getVisibleIndex(IVisibleTreeNode node);
/**
- * Returns whether the node is a leaf (i.e. node has no visible children) or not.
+ * Returns whether the node is a leaf (i.e. node has no visible children) or
+ * not.
*
* @return true, if the node is a leaf; otherwise false.
*/
@@ -59,5 +65,5 @@ public interface IVisibleTreeNode extends Serializable {
*
* @param visible
*/
- void setVisible( boolean visible );
+ void setVisible(boolean visible);
} \ No newline at end of file
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/LoadNodeProcess.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/LoadNodeProcess.java
index 6429165..11a520d 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/LoadNodeProcess.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/LoadNodeProcess.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.Collection;
@@ -16,8 +19,6 @@ import org.eclipse.riena.ui.core.uiprocess.IUISynchronizer;
* Loads the value of a node in a dynamic tree. A placeholder user element will
* be replaced with the actual user element from the nodes parent child
* iterator.
- *
- * @author Carsten Drossel
*/
class LoadNodeProcess extends DynamicTreeModificationProcess {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ResetRootChildrenProcess.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ResetRootChildrenProcess.java
index 9a663ab..817f8d0 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ResetRootChildrenProcess.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ResetRootChildrenProcess.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import org.eclipse.riena.ui.core.uiprocess.IUISynchronizer;
@@ -13,8 +16,6 @@ import org.eclipse.riena.ui.core.uiprocess.UIProcess;
/**
* Resets the children of the root element of a dynamic tree. All children will
* be replaced with a dynamic tree node with a placeholder user element.
- *
- * @author Carsten Drossel
*/
class ResetRootChildrenProcess extends DynamicTreeModificationProcess {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ToolTipTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ToolTipTreeNode.java
index cb4e997..4d79ad2 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ToolTipTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ToolTipTreeNode.java
@@ -1,16 +1,17 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
/**
* Tree node providing a tooltip.
- *
- * @author Frank Schepp
*/
public class ToolTipTreeNode extends DefaultTreeNode implements ITreeNodeToolTip {
@@ -19,13 +20,16 @@ public class ToolTipTreeNode extends DefaultTreeNode implements ITreeNodeToolTip
private boolean dropOk;
/**
- * Constructor. Creates a tree node with no parent, no children and initializes it with the specified user object.
+ * Constructor. Creates a tree node with no parent, no children and
+ * initializes it with the specified user object.
*
- * @param userObject - an Object provided by the user that constitutes the node's data.
+ * @param userObject -
+ * an Object provided by the user that constitutes the node's
+ * data.
*/
- public ToolTipTreeNode( Object userObject ) {
+ public ToolTipTreeNode(Object userObject) {
- super( userObject );
+ super(userObject);
}
/**
@@ -39,7 +43,7 @@ public class ToolTipTreeNode extends DefaultTreeNode implements ITreeNodeToolTip
/**
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.ITreeNodeToolTip#setToolTipText(java.lang.String)
*/
- public void setToolTipText( String toolTipText ) {
+ public void setToolTipText(String toolTipText) {
this.toolTipText = toolTipText;
}
@@ -55,7 +59,7 @@ public class ToolTipTreeNode extends DefaultTreeNode implements ITreeNodeToolTip
/**
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.ITreeNodeToolTip#setSelectedAsDropTarget(boolean)
*/
- public void setSelectedAsDropTarget( boolean selectedAsDropTarget ) {
+ public void setSelectedAsDropTarget(boolean selectedAsDropTarget) {
this.selectedAsDropTarget = selectedAsDropTarget;
}
@@ -71,7 +75,7 @@ public class ToolTipTreeNode extends DefaultTreeNode implements ITreeNodeToolTip
/**
* @see de.compeople.spirit.core.client.uibinding.adapter.tree.ITreeNodeToolTip#setDropOk(boolean)
*/
- public void setDropOk( boolean dropOk ) {
+ public void setDropOk(boolean dropOk) {
this.dropOk = dropOk;
}
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/TreeModelEvent.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/TreeModelEvent.java
index 55fd3f5..eb2cd68 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/TreeModelEvent.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/TreeModelEvent.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.io.Serializable;
@@ -16,8 +19,6 @@ import org.eclipse.core.databinding.observable.ObservableEvent;
/**
* Encapsulates information describing changes to a tree model, and used to
* notify tree model listeners of the change.
- *
- * @author Thorsten Schenkel
*/
public class TreeModelEvent extends ObservableEvent {
diff --git a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ValueTreeNode.java b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ValueTreeNode.java
index 04f1464..c4173a6 100644
--- a/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ValueTreeNode.java
+++ b/org.eclipse.riena.ui.ridgets/src/org/eclipse/riena/ui/ridgets/tree/ValueTreeNode.java
@@ -1,10 +1,13 @@
-/****************************************************************
- * *
- * Copyright (c) 2004-2005 compeople AG *
- * All rights reserved. The use of this program and the *
- * accompanying materials are subject to license terms. *
- * *
- ****************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 compeople AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * compeople AG - initial API and implementation
+ *******************************************************************************/
package org.eclipse.riena.ui.ridgets.tree;
import java.util.HashMap;
@@ -12,15 +15,13 @@ import java.util.Map;
/**
* Tree node with the nodes value.
- *
- * @author Carsten Drossel
*/
public class ValueTreeNode {
private String value;
private Map<String, ValueTreeNode> children;
- ValueTreeNode( String value ) {
+ ValueTreeNode(String value) {
this.value = value;
children = new HashMap<String, ValueTreeNode>();
}
@@ -29,20 +30,20 @@ public class ValueTreeNode {
return value;
}
- void add( ValueTreeNode child ) {
- children.put( child.getValue(), child );
+ void add(ValueTreeNode child) {
+ children.put(child.getValue(), child);
}
- void remove( ValueTreeNode child ) {
- children.remove( child.getValue() );
+ void remove(ValueTreeNode child) {
+ children.remove(child.getValue());
}
boolean hasChildren() {
return !children.isEmpty();
}
- ValueTreeNode getChild( Object childValue ) {
- return children.get( childValue );
+ ValueTreeNode getChild(Object childValue) {
+ return children.get(childValue);
}
}