Author: ruschein
Date: 2010-10-19 16:36:41 -0700 (Tue, 19 Oct 2010)
New Revision: 22306
Added:
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandlerFactory.java
Removed:
core3/work-api/trunk/src/main/java/org/cytoscape/work/HandlerFactory.java
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
core3/work-api/trunk/src/main/java/org/cytoscape/work/TaskFactory.java
core3/work-api/trunk/src/main/java/org/cytoscape/work/Tunable.java
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
core3/work-api/trunk/src/main/java/org/cytoscape/work/util/AbstractBounded.java
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTaskManagerTest.java
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
core3/work-headless-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/CLHandlerFactory.java
core3/work-spring-hack/trunk/src/main/java/org/cytoscape/work/spring/SpringTunableInterceptor.java
core3/work-swing-api/trunk/src/main/java/org/cytoscape/work/swing/AbstractGUITunableInterceptor.java
core3/work-swing-impl/trunk/src/integration/java/integration/ITSpringIntegration.java
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableHandlerFactory.java
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
core3/work-tunable-props-impl/trunk/src/main/java/org/cytoscape/work/internal/props/PropHandlerFactory.java
Log:
Renamed HandlerFactory to TunableHandlerFactory and misc. cleanup.
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
===================================================================
---
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableHandler.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -54,16 +54,13 @@
this.tunable = tunable;
}
- /**
- * @return an object describing a field annotated with @Tunable or null
if no field has been associated with this handler
+ /** {...@inheritdoc}
*/
final public Object getValue() throws IllegalAccessException,
InvocationTargetException {
return field != null ? field.get(instance) :
getter.invoke(instance);
}
- /** Sets the value of the Tunable associated with this TunableHandler.
- *
- * @param newValue The new value that the associated tunable will be
set to.
+ /** {...@inheritdoc}
*/
final public void setValue(final Object newValue) throws
IllegalAccessException, InvocationTargetException {
if (field != null)
@@ -72,44 +69,37 @@
setter.invoke(instance, newValue);
}
- /**
- * @return the associated <code>Tunable</code>'s description
+ /** {...@inheritdoc}
*/
final public String getDescription() {
return tunable.description();
}
- /**
- * @return the associated <code>Tunable</code>'s groups or nesting
hierarchy
+ /** {...@inheritdoc}
*/
final public String[] getGroups() {
return tunable.groups();
}
- /**
- * @return true if the associated <code>Tunable</code> controls nested
children, else false
+ /** {...@inheritdoc}
*/
final public boolean controlsMutuallyExclusiveNestedChildren() {
return tunable.xorChildren();
}
- /**
- * @return returns the name of the key that determines the selection
of which controlled nested child is currently presented, or the empty string if
- * controlsMutuallyExclusiveNestedChildren() returns false.
+ /** {...@inheritdoc}
*/
final public String getChildKey() {
return tunable.xorKey();
}
- /**
- * @return the dependsOn property of the tunable
+ /** {...@inheritdoc}
*/
final public String dependsOn() {
return tunable.dependsOn();
}
- /**
- * @return a name representing a tunable property
+ /** {...@inheritdoc}
*/
final public String getName() {
if (field != null)
@@ -118,10 +108,7 @@
return setter.getName().substring(3);
}
- /**
- * @return the name of the underlying class of the tunable followed by
a dot and the name of the tunable field or getter/setter root name.
- *
- * Please note that the returned String will always contain a single
embedded dot.
+ /** {...@inheritdoc}
*/
final public String getQualifiedName() {
final String unqualifiedClassName =
@@ -130,8 +117,7 @@
return
unqualifiedClassName.substring(unqualifiedClassName.lastIndexOf(".") + 1) + "."
+ getName();
}
- /**
- * @return the parsed result from Tunable.getParams()
+ /** {...@inheritdoc}
*/
final public Properties getParams() throws IllegalArgumentException {
final String rawString = tunable.params();
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
===================================================================
---
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-api/trunk/src/main/java/org/cytoscape/work/AbstractTunableInterceptor.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -81,7 +81,7 @@
/**
* Factory for Handlers
*/
- protected final HandlerFactory<TH> factory;
+ protected final TunableHandlerFactory<TH> factory;
/**
* Store the Handlers
@@ -102,7 +102,7 @@
* <code>CLHandlerFactory</code> to get the <code>Handlers</code>
that will create the <i>Options</i> for the <code>Tasks</code> runnable through
the CommandLine Interface,
* or <code>PropHandlerFactory</code> to get the <code>Handlers</code>
for Properties.
*/
- public AbstractTunableInterceptor(HandlerFactory<TH>
tunableHandlerFactory) {
+ public AbstractTunableInterceptor(TunableHandlerFactory<TH>
tunableHandlerFactory) {
this.factory = tunableHandlerFactory;
handlerMap = new HashMap<Object, LinkedHashMap<String, TH>>();
guiProviderMap = new HashMap<Object, Method>();
Deleted:
core3/work-api/trunk/src/main/java/org/cytoscape/work/HandlerFactory.java
===================================================================
--- core3/work-api/trunk/src/main/java/org/cytoscape/work/HandlerFactory.java
2010-10-19 23:21:21 UTC (rev 22305)
+++ core3/work-api/trunk/src/main/java/org/cytoscape/work/HandlerFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -1,37 +0,0 @@
-package org.cytoscape.work;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-
-
-/**
- * Provides a factory to create <code>Handlers</code> depending on their type.
- * <code>Handlers</code> will be generated for Fields and Methods in the class
that contains the <code>Tunables</code>.
- *
- * @param <TH> <code>TunableHandler</code> that will be created by this
factory. They will contain the informations
- * provided by the <code>Tunable</code> annotations and the Object itself.
- * @author Pasteur
- */
-
-public interface HandlerFactory<TH extends TunableHandler> {
- /**
- * This method returns a <code>TunableHandler</code> for a Field
annotated as a <code>Tunable</code>
- *
- * @param field Field that need to have a <code>Handler</code>
- * @param instance the object on which we want to read/write the
Field <code>field</code>
- * @param tunable Tunable that contains all the information
concerning the user interface
- * @return TH the newly constructed <code>TunableHandler</code>
- */
- TH getHandler(final Field field, final Object instance, final Tunable
tunable);
-
- /**
- * This method returns a <code>TunableHandler</code> for a Method
annotated as a <code>Tunable</code>
- *
- * @param setter a Method that need to be annotated with
<code>@Tunable</code>
- * @param getter a Method that need to be annotated with
<code>@Tunable</code>
- * @param instance the object on which we want to invoke the
<code>setter</code> and <code>getter</code> methods
- * @param tunable Tunable that contains all the information
concerning the user interface
- * @return TH the newly constructed <code>TunableHandler</code>
- */
- TH getHandler(final Method setter, final Method getter, final Object
instance, final Tunable tunable);
-}
\ No newline at end of file
Modified: core3/work-api/trunk/src/main/java/org/cytoscape/work/TaskFactory.java
===================================================================
--- core3/work-api/trunk/src/main/java/org/cytoscape/work/TaskFactory.java
2010-10-19 23:21:21 UTC (rev 22305)
+++ core3/work-api/trunk/src/main/java/org/cytoscape/work/TaskFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -8,7 +8,7 @@
public interface TaskFactory {
/** @return an iterator returning a sequence of <code>Task</code>s.
*
- * N.B.: Most factory's returned iterator only yields a single
<code>Task</code>.
+ * Note: Most factory's returned iterator only yields a single
<code>Task</code>.
*/
TaskIterator getTaskIterator();
}
Modified: core3/work-api/trunk/src/main/java/org/cytoscape/work/Tunable.java
===================================================================
--- core3/work-api/trunk/src/main/java/org/cytoscape/work/Tunable.java
2010-10-19 23:21:21 UTC (rev 22305)
+++ core3/work-api/trunk/src/main/java/org/cytoscape/work/Tunable.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -7,9 +7,6 @@
import java.lang.annotation.Target;
-...@retention(RetentionPolicy.RUNTIME)
-...@target({ElementType.FIELD,ElementType.METHOD})
-
/**
* An annotation type that can be applied to a <i>field</i> or a <i>method</i>
in order to allow <code>TunableInterceptor</code> to catch it,
* and so to use its members to create a corresponding interface for a user.
@@ -30,6 +27,8 @@
* display the JTextField with the <code>lastName</code> will be collapsed and
needs to be expanded in order to see its components.<br>
*
*/
+...@retention(RetentionPolicy.RUNTIME)
+...@target({ElementType.FIELD,ElementType.METHOD})
public @interface Tunable {
/**
* Human-readable label indentifying the tunable as displayed to a user.
@@ -40,7 +39,7 @@
* Used to define all the groups in which the Tunable takes part (by
default, its doesn't belong to any group).
*
* <p><pre><code>
- * <b>example</b>:
+ * <b>Example</b>:
* <code>@Tunable(description="write your last name",
group={"Company","Department","office","identity"})</code>
* public String lastName = "Smith";
* </code></pre></p>
@@ -49,7 +48,7 @@
* <b>warning</b>: Note that they are set in an order of subgroups of a
main one.
*
* <p><pre>
- * <b>example</b>:
+ * <b>Example</b>:
*
* <code>@Tunable(description="write your first name",
groups={"Company","Department","office","identity"})</code>
* public String firstName = "John";
@@ -75,7 +74,7 @@
* Key that will refer to the "value" of the <code>Tunable</code> which
has <code>xorChildren=true</code>
*
* <p><pre><code>
- * <b>example</b> :
+ * <b>Example</b> :
* <code>@Tunable(description="Single list", group={"TestGroup"},
<b>xorChildren=true</b>)</code>
* public ListSingleSelection<String> chooser = new
ListSingleSelection<String>("<b>Names</b>","<b>FirstNames</b>");
*
@@ -103,12 +102,12 @@
* Here is an example of how to add dependencies between
<code>Tunables<code> :
*
* <code>
- * <code>@Tunable(description="Type")</code>
- * public boolean type = false;
+ * @Tunable(description="Type")
+ * public boolean type = false;
*
- * <code>@Tunable(description="Host
name",dependsOn="type=true")</code>
- * public String hostname="";
- * </code>
+ * @Tunable(description="Host name",dependsOn="type=true")
+ * public String hostname="";
+ * </code>
* </pre></p>
* So <code>hostname</code> will be activated if <code>type</code> is
set to "true"
*/
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
===================================================================
--- core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
2010-10-19 23:21:21 UTC (rev 22305)
+++ core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandler.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -10,6 +10,7 @@
*/
public interface TunableHandler {
/**
+ * Returns an object describing a field annotated with @Tunable or null
if no field has been associated with this handler.
* @return an object describing a field annotated with @Tunable or null
if no field has been associated with this handler
*/
Object getValue() throws IllegalAccessException,
InvocationTargetException;
@@ -20,38 +21,47 @@
void setValue(final Object newValue) throws IllegalAccessException,
InvocationTargetException;
/**
+ * Returns the associated <code>Tunable</code>'s description.
* @return the associated <code>Tunable</code>'s description
*/
String getDescription();
/**
+ * Returns the associated <code>Tunable</code>'s groups or nesting
hierarchy.
* @return the associated <code>Tunable</code>'s groups or nesting
hierarchy
*/
String[] getGroups();
/**
+ * Returns true if the associated <code>Tunable</code> allows
switching of mutually exclusive nested children, else false.
* @return true if the associated <code>Tunable</code> allows
switching of mutually exclusive nested children, else false
*/
boolean controlsMutuallyExclusiveNestedChildren();
/**
- * @return returns the name of the key that determines the selection
of which controlled
+ * Returns the name of the key that determines the selection of which
controlled
* nested child is currently presented, or the empty string if
* controlsMutuallyExclusiveNestedChildren() returns false.
+ * @return the name of the key that determines the selection of which
controlled
+ * nested child is currently presented, or the empty string if
+ * controlsMutuallyExclusiveNestedChildren() returns false.
*/
String getChildKey();
/**
+ * Returns the dependsOn property of the associated
<code>Tunable</code>.
* @return the dependsOn property of the tunable
*/
String dependsOn();
/**
- * @return a name representing a tunable property
+ * Returns a name representing a tunable property.
+ * @return a name representing a tunable property
*/
String getName();
/**
+ * Returns the name of the underlying class of the tunable followed by
a dot and the name of the tunable field or getter/setter root name.
* @return the name of the underlying class of the tunable followed by
a dot and the name of the tunable field or getter/setter root name.
*
* Please note that the returned String will always contain a single
embedded dot.
@@ -59,7 +69,8 @@
String getQualifiedName();
/**
- * @return the parsed result from Tunable.getParams()
+ * Returns the parsed result from <code>Tunable.getParams()</code>.
+ * @return the parsed result from <code>Tunable.getParams()</code>
*/
Properties getParams();
}
Copied:
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandlerFactory.java
(from rev 22291,
core3/work-api/trunk/src/main/java/org/cytoscape/work/HandlerFactory.java)
===================================================================
---
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandlerFactory.java
(rev 0)
+++
core3/work-api/trunk/src/main/java/org/cytoscape/work/TunableHandlerFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -0,0 +1,38 @@
+package org.cytoscape.work;
+
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+
+/**
+ * Provides a factory to create <code>Handlers</code> depending on their type.
+ * <code>Handlers</code> will be generated for Fields and Methods in the class
that contains the <code>Tunables</code>.
+ *
+ * @param <TH> <code>TunableHandler</code> that will be created by this
factory. They will contain the informations
+ * provided by the <code>Tunable</code> annotations and the Object itself.
+ * @author Pasteur
+ */
+
+public interface TunableHandlerFactory<T extends TunableHandler> {
+ /**
+ * This method returns a <code>TunableHandler</code> for a Field
annotated as a <code>Tunable</code>
+ *
+ * @param field Field that need to have a <code>Handler</code>
+ * @param instance the object on which we want to read/write the
Field <code>field</code>
+ * @param tunable Tunable that contains all the information
concerning the user interface
+ * @return TH the newly constructed <code>TunableHandler</code>
+ */
+ T getHandler(final Field field, final Object instance, final Tunable
tunable);
+
+ /**
+ * This method returns a <code>TunableHandler</code> for a Method
annotated as a <code>Tunable</code>
+ *
+ * @param setter a Method that need to be annotated with
<code>@Tunable</code>
+ * @param getter a Method that need to be annotated with
<code>@Tunable</code>
+ * @param instance the object on which we want to invoke the
<code>setter</code> and <code>getter</code> methods
+ * @param tunable Tunable that contains all the information
concerning the user interface
+ * @return TH the newly constructed <code>TunableHandler</code>
+ */
+ T getHandler(final Method setter, final Method getter, final Object
instance, final Tunable tunable);
+}
\ No newline at end of file
Modified:
core3/work-api/trunk/src/main/java/org/cytoscape/work/util/AbstractBounded.java
===================================================================
---
core3/work-api/trunk/src/main/java/org/cytoscape/work/util/AbstractBounded.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-api/trunk/src/main/java/org/cytoscape/work/util/AbstractBounded.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -33,7 +33,7 @@
* @param <N> Any type of Number
* @author Pasteur
*/
-public abstract class AbstractBounded<N extends Comparable<N>> {
+abstract public class AbstractBounded<N extends Comparable<N>> {
/**
* Initial value of the Bounded Object that will be modified
*/
@@ -70,8 +70,9 @@
/**
* Creates a new Bounded object.
*
- * @param lower The lower bound value
- * @param upper The upper bound value
+ * @param lower The lower bound value
+ * @param initValue The initial value
+ * @param upper The upper bound value
* @param lowerStrict True means that the value cannot be equal to
the lower bound
* @param upperStrict True means that the value cannot be equal to
the upper bound
*/
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTaskManagerTest.java
===================================================================
---
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTaskManagerTest.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTaskManagerTest.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -50,7 +50,7 @@
}
static private class SimpleTunableInterceptor<TH extends
TunableHandler> extends AbstractTunableInterceptor {
- SimpleTunableInterceptor(HandlerFactory<TH>
tunableHandlerFactory) {
+ SimpleTunableInterceptor(TunableHandlerFactory<TH>
tunableHandlerFactory) {
super(tunableHandlerFactory);
}
@@ -73,7 +73,7 @@
@Test
public void testHasTunables() {
- final HandlerFactory<SimpleTunableHandler> handlerFactory=
mock(HandlerFactory.class);
+ final TunableHandlerFactory<SimpleTunableHandler>
handlerFactory= mock(TunableHandlerFactory.class);
final TunableInterceptor interceptor = new
SimpleTunableInterceptor<SimpleTunableHandler>(handlerFactory);
final SimpleTaskMananger taskManager = new
SimpleTaskMananger(interceptor);
assertFalse("This object has *no* Tunable annotation!",
taskManager.hasTunables(new Object()));
Modified:
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
===================================================================
---
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-api/trunk/src/test/java/org/cytoscape/work/AbstractTunableInterceptorTest.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -48,7 +48,7 @@
@Before
public void init() {
- final HandlerFactory<AbstractTunableHandler> handlerFactory =
new SimpleHandlerFactory();
+ final TunableHandlerFactory<AbstractTunableHandler>
handlerFactory = new SimpleHandlerFactory();
interceptor = new ConcreteTunableInterceptor(handlerFactory);
hasAnnotatedField = new HasAnnotatedField();
hasAnnotatedSetterAndGetterMethods = new
HasAnnotatedSetterAndGetterMethods();
@@ -122,7 +122,7 @@
}
-class SimpleHandlerFactory implements HandlerFactory<AbstractTunableHandler> {
+class SimpleHandlerFactory implements
TunableHandlerFactory<AbstractTunableHandler> {
public AbstractTunableHandler getHandler(final Field field, final
Object instance, final Tunable tunable) {
return new AbstractTunableHandler(field, instance, tunable);
}
@@ -134,7 +134,7 @@
class ConcreteTunableInterceptor extends AbstractTunableInterceptor {
- ConcreteTunableInterceptor(final HandlerFactory<AbstractTunableHandler>
handlerFactory) {
+ ConcreteTunableInterceptor(final
TunableHandlerFactory<AbstractTunableHandler> handlerFactory) {
super(handlerFactory);
}
Modified:
core3/work-headless-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/CLHandlerFactory.java
===================================================================
---
core3/work-headless-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/CLHandlerFactory.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-headless-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/CLHandlerFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -6,8 +6,8 @@
import java.lang.reflect.Method;
import java.net.URL;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.Tunable;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.util.BoundedDouble;
import org.cytoscape.work.util.BoundedFloat;
import org.cytoscape.work.util.BoundedInteger;
@@ -21,7 +21,7 @@
* @author pasteur
*
*/
-public class CLHandlerFactory implements HandlerFactory<CLHandler> {
+public class CLHandlerFactory implements TunableHandlerFactory<CLHandler> {
public CLHandler getHandler(final Method m, final Object o, final
Tunable t) {
return null;
Modified:
core3/work-spring-hack/trunk/src/main/java/org/cytoscape/work/spring/SpringTunableInterceptor.java
===================================================================
---
core3/work-spring-hack/trunk/src/main/java/org/cytoscape/work/spring/SpringTunableInterceptor.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-spring-hack/trunk/src/main/java/org/cytoscape/work/spring/SpringTunableInterceptor.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -2,8 +2,8 @@
import org.cytoscape.work.AbstractTunableInterceptor;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.TunableHandler;
+import org.cytoscape.work.TunableHandlerFactory;
import org.springframework.core.InfrastructureProxy;
@@ -16,7 +16,7 @@
* being used with Spring.
*/
public abstract class SpringTunableInterceptor<T extends TunableHandler>
extends AbstractTunableInterceptor<T> {
- public SpringTunableInterceptor(HandlerFactory<T> hf) {
+ public SpringTunableInterceptor(TunableHandlerFactory<T> hf) {
super(hf);
}
Modified:
core3/work-swing-api/trunk/src/main/java/org/cytoscape/work/swing/AbstractGUITunableInterceptor.java
===================================================================
---
core3/work-swing-api/trunk/src/main/java/org/cytoscape/work/swing/AbstractGUITunableInterceptor.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-swing-api/trunk/src/main/java/org/cytoscape/work/swing/AbstractGUITunableInterceptor.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -9,7 +9,7 @@
import javax.swing.JOptionPane;
import javax.swing.JPanel;
-import org.cytoscape.work.HandlerFactory;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.TunableValidator;
import org.cytoscape.work.spring.SpringTunableInterceptor;
@@ -45,10 +45,11 @@
protected Logger logger;
/**
- * Creates an Interceptor that will use the
<code>GUITunableHandlers</code> created in a <code>HandlerFactory</code> from
intercepted <code>Tunables</code>.
- * @param factory
+ * Creates an Interceptor that will use the
<code>GUITunableHandlers</code> created in a
+ * <code>TunableHandlerFactory</code> from intercepted
<code>Tunables</code>.
+ * @param factory used to create tunable handlers
*/
- public AbstractGUITunableInterceptor(final
HandlerFactory<GUITunableHandler> factory) {
+ public AbstractGUITunableInterceptor(final
TunableHandlerFactory<GUITunableHandler> factory) {
super(factory);
logger = LoggerFactory.getLogger(getClass());
}
Modified:
core3/work-swing-impl/trunk/src/integration/java/integration/ITSpringIntegration.java
===================================================================
---
core3/work-swing-impl/trunk/src/integration/java/integration/ITSpringIntegration.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-swing-impl/trunk/src/integration/java/integration/ITSpringIntegration.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -1,8 +1,8 @@
package integration;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.TaskManager;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.swing.GUITaskManager;
import org.cytoscape.work.undo.UndoSupport;
@@ -27,7 +27,7 @@
"org.cytoscape, integration-test-support,
1.0-SNAPSHOT" ,
},
new String[] { "undoSupport", "swingTaskManager",
"swingTaskManager", "guiHandlerFactory" },
- new Class[] { UndoSupport.class, GUITaskManager.class,
TaskManager.class, HandlerFactory.class },
+ new Class[] { UndoSupport.class, GUITaskManager.class,
TaskManager.class, TunableHandlerFactory.class },
new String[] { }
);
}
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableHandlerFactory.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableHandlerFactory.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableHandlerFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -11,8 +11,8 @@
import org.cytoscape.property.bookmark.BookmarksUtil;
import org.cytoscape.property.bookmark.Bookmarks;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.Tunable;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.internal.tunables.utils.SupportedFileTypesManager;
import org.cytoscape.work.swing.GUITunableHandler;
import org.cytoscape.work.util.BoundedDouble;
@@ -29,7 +29,7 @@
*
* @author pasteur
*/
-public class GUITunableHandlerFactory implements
HandlerFactory<GUITunableHandler> {
+public class GUITunableHandlerFactory implements
TunableHandlerFactory<GUITunableHandler> {
private Bookmarks bookmarks;
private BookmarksUtil bkUtil;
private SupportedFileTypesManager fileTypesManager;
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/GUITunableInterceptorImpl.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -15,8 +15,8 @@
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.TaskFactory;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.TunableValidator;
import org.cytoscape.work.swing.AbstractGUITunableInterceptor;
import org.cytoscape.work.swing.GUITunableHandler;
@@ -53,10 +53,11 @@
private boolean newValuesSet;
/**
- * Creates an Interceptor that will use the
<code>GUITunableHandlers</code> created in a <code>HandlerFactory</code> from
intercepted <code>Tunables</code>.
+ * Creates an Interceptor that will use the
<code>GUITunableHandlers</code> created in a
+ * <code>TunableHandlerFactory</code> from intercepted
<code>Tunables</code>.
* @param factory
*/
- public GUITunableInterceptorImpl(final
HandlerFactory<GUITunableHandler> factory) {
+ public GUITunableInterceptorImpl(final
TunableHandlerFactory<GUITunableHandler> factory) {
super(factory);
panelMap = new HashMap<List<GUITunableHandler>, JPanel>();
}
Modified:
core3/work-tunable-props-impl/trunk/src/main/java/org/cytoscape/work/internal/props/PropHandlerFactory.java
===================================================================
---
core3/work-tunable-props-impl/trunk/src/main/java/org/cytoscape/work/internal/props/PropHandlerFactory.java
2010-10-19 23:21:21 UTC (rev 22305)
+++
core3/work-tunable-props-impl/trunk/src/main/java/org/cytoscape/work/internal/props/PropHandlerFactory.java
2010-10-19 23:36:41 UTC (rev 22306)
@@ -1,16 +1,17 @@
package org.cytoscape.work.internal.props;
+
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.io.File;
import java.net.URL;
-import org.cytoscape.work.HandlerFactory;
import org.cytoscape.work.Tunable;
+import org.cytoscape.work.TunableHandlerFactory;
import org.cytoscape.work.util.*;
-public class PropHandlerFactory implements HandlerFactory<PropHandler> {
+public class PropHandlerFactory implements TunableHandlerFactory<PropHandler> {
public PropHandler getHandler(final Field field, final Object instance,
final Tunable tunable) {
final Class<?> type = field.getType();
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.