public abstract class AbstractTunableHandler extends Object implements TunableHandler
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>| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT |
static String |
FORMAT |
static String |
GRAVITY |
static String |
TOOLTIP |
| Constructor and Description |
|---|
AbstractTunableHandler(Field field,
Object instance,
Tunable tunable)
Standard base class constructor for
TunableHandlers that deal with
Tunables that annotate a field. |
AbstractTunableHandler(Method getter,
Method setter,
Object instance,
Tunable tunable)
Standard base class constructor for
TunableHandlers that deal with
Tunables that use getter and setter methods. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
controlsMutuallyExclusiveNestedChildren()
Returns true if the associated
Tunable allows switching
of mutually exclusive nested children, else false. |
String |
dependsOn()
Returns the dependsOn property of the associated
Tunable. |
String |
getChildKey()
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.
|
String |
getContext()
This returns the context of the Tunable.
|
String |
getDescription()
Returns the associated
Tunable's description. |
String |
getFormat()
Provides a format string suitable for passing to String.format.
|
double |
getGravity()
Returns the gravity value for the annotation.
|
String[] |
getGroups()
Returns the associated
Tunable's groups or nesting hierarchy. |
String |
getName()
Returns a name representing a tunable property.
|
Properties |
getParams()
Returns the parsed result from
Tunable.getParams(). |
String |
getQualifiedName()
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.
|
boolean |
getRequired()
Returns true if this Tunable must be set (i.e.
|
String |
getTooltip()
Returns the tooltip annotation for this Tunable if there is one.
|
Class<?> |
getType()
Returns the class type of the field or method annotated by
Tunable. |
Object |
getValue()
Returns an object describing a field / get method annotated with
Tunable or null if no field / get method has been associated with this handler. |
String[] |
listenForChange()
Returns the listenForChange property of the associated
Tunable. |
void |
setValue(Object newValue)
Attempts to set the value of the associated field or set method that has been
annotated with
Tunable. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandlepublic static final String TOOLTIP
public static final String GRAVITY
public static final String CONTEXT
public static final String FORMAT
public AbstractTunableHandler(Field field, Object instance, Tunable tunable)
TunableHandlers that deal with
Tunables that annotate a field.field - An instance of Field that represents a field
annotated with @Tunableinstance - An object instance that contains a field corresponding to
the field parametertunable - The Tunable that annotates fieldpublic AbstractTunableHandler(Method getter, Method setter, Object instance, Tunable tunable)
TunableHandlers that deal with
Tunables that use getter and setter methods.getter - The getter method of the tunable object represented by the
instance parameter.setter - The setter method complimentary to the getter.instance - An instance of an object with a getter method that has been
determined to be annotated with @Tunable.tunable - The Tunable that annotates the getter.public final Class<?> getType()
Tunable.getType in interface TunableHandlerTunable.public final Object getValue() throws IllegalAccessException, InvocationTargetException
Tunable or null if no field / get method has been associated with this handler.getValue in interface TunableHandlerIllegalAccessExceptionInvocationTargetExceptionpublic void setValue(Object newValue) throws IllegalAccessException, InvocationTargetException
Tunable.setValue in interface TunableHandlernewValue - the value to be written into field or set method annotated with TunableIllegalAccessExceptionInvocationTargetExceptionpublic final String getDescription()
Tunable's description.getDescription in interface TunableHandlerTunable's descriptionpublic final String[] getGroups()
Tunable's groups or nesting hierarchy.getGroups in interface TunableHandlerTunable's groups or nesting hierarchypublic final boolean controlsMutuallyExclusiveNestedChildren()
Tunable allows switching
of mutually exclusive nested children, else false.controlsMutuallyExclusiveNestedChildren in interface TunableHandlerTunable allows switching
of mutually exclusive nested children, else falsepublic final String getChildKey()
getChildKey in interface TunableHandlerpublic final String dependsOn()
Tunable.dependsOn in interface TunableHandlerpublic final String[] listenForChange()
Tunable.listenForChange in interface TunableHandlerpublic final String getName()
getName in interface TunableHandlerpublic final String getQualifiedName()
getQualifiedName in interface TunableHandlerpublic final Properties getParams() throws IllegalArgumentException
Tunable.getParams().getParams in interface TunableHandlerTunable.getParams()IllegalArgumentExceptionpublic final String getContext()
public final String getTooltip()
public final double getGravity()
public final boolean getRequired()
public final String getFormat()
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.