Cytoscape 3.0.0-beta1 API

org.cytoscape.work
Interface TunableHandlerFactory<T extends TunableHandler>

Type Parameters:
T - The specific type of TunableHandler that will be created by this factory.
All Known Subinterfaces:
GUITunableHandlerFactory<T>
All Known Implementing Classes:
BasicTunableHandlerFactory, SimpleGUITunableHandlerFactory

public interface TunableHandlerFactory<T extends TunableHandler>

A factory service to create a TunableHandler for a single type of object, determined by the type of the field or the return value of the getter method in the appropriate methods. Each type of object (int, float, String) generally needs a different implementation of this interface. Each implementation is expected to be registered as an OSGi service. TunableInterceptors register the TunableHandlerFactory services of the appropriate type.


Cytoscape Backwards Compatibility (SPI Interface): We expect that this interface will be implemented. Therefore to maintain backwards compatibility this interface will only be modified for major version updates.

Method Summary
 T createTunableHandler(Field field, Object instance, Tunable tunable)
          This method returns a TunableHandler for a Field annotated as a Tunable if this factory can produce an appropriate handler for this type of field.
 T createTunableHandler(Method getter, Method setter, Object instance, Tunable tunable)
          This method returns a TunableHandler for a Method annotated as a Tunable if this factory can produce an appropriate handler for this type of field.
 

Method Detail

createTunableHandler

T createTunableHandler(Field field,
                       Object instance,
                       Tunable tunable)
This method returns a TunableHandler for a Field annotated as a Tunable if this factory can produce an appropriate handler for this type of field. If the factory cannot produce an appropriate handler, it will return null.

Parameters:
field - Field that need to have a Handler
instance - the object on which we want to read/write the Field field
tunable - Tunable that contains all the information concerning the user interface
Returns:
T the newly constructed TunableHandler or null if this factory can't handle a field of the specified type.

createTunableHandler

T createTunableHandler(Method getter,
                       Method setter,
                       Object instance,
                       Tunable tunable)
This method returns a TunableHandler for a Method annotated as a Tunable if this factory can produce an appropriate handler for this type of field. If the factory cannot produce an appropriate handler, it will return null.

Parameters:
getter - a Method that need to be annotated with @Tunable
setter - a Method that need to be annotated with @Tunable
instance - the object on which we want to invoke the setter and getter methods
tunable - Tunable that contains all the information concerning the user interface
Returns:
T the newly constructed TunableHandler or null if this factory can't handle a field of the specified type.

Cytoscape 3.0.0-beta1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.