Package org.cytoscape.work
Interface TunableMutator<T extends TunableHandler,S>
-
- Type Parameters:
T
- The specific type ofTunableHandler
used to process the tunables.S
- The type of configuration object returned by this TunableMutator.
public interface TunableMutator<T extends TunableHandler,S>
This is a type of tunable interceptor that reads and modifies the values annotated with theTunable
annotation. Only one TunableMutator will be used by a givenTaskManager
, and that is defined by the TaskManager itself. You control which TunableMutator gets used by choosing the appropriate TaskManager. When implementing this interface, it is recommended that you use theAbstractTunableInterceptor
class to do so.Module:
work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description S
buildConfiguration(Object o)
Returns the configuration object used to mutate the tunables.void
setConfigurationContext(Object o)
Used configure the TunableMutator so that it builds its configuration object in the correct location.boolean
validateAndWriteBack(Object o)
This method is called to validate and then set the values for fields and methods annotated with theTunable
annotation.
-
-
-
Method Detail
-
setConfigurationContext
void setConfigurationContext(Object o)
Used configure the TunableMutator so that it builds its configuration object in the correct location. For instance, a GUI based TunableMutator might call this method with a JPanel, indicating that the TunableMutator should build its configuration within that JPanel. This method may be a no-op depending on the type of configuration.- Parameters:
o
- The context object in which the configuration will be built.
-
buildConfiguration
S buildConfiguration(Object o)
Returns the configuration object used to mutate the tunables.- Parameters:
o
- The object containing the fields and methods annotated with theTunable
annotation.- Returns:
- the configuration object used to mutate the tunables.
-
validateAndWriteBack
boolean validateAndWriteBack(Object o)
This method is called to validate and then set the values for fields and methods annotated with theTunable
annotation.- Parameters:
o
- The object containing the fields and methods annotated with theTunable
annotation.- Returns:
- Whether the tunables were successfully changed.
-
-