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
TunableHandler s that deal with
Tunable s that annotate a field. |
AbstractTunableHandler(Method getter,
Method setter,
Object instance,
Tunable tunable)
Standard base class constructor for
TunableHandler s that deal with
Tunable s 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 |
getExampleStringValue()
Returns the exampleStringValue property of the associated
Tunable . |
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 |
getLongDescription()
Returns the associated
Tunable 's longDescription |
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 |
setOffset(double offset) |
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, wait
handle
public 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)
TunableHandler
s that deal with
Tunable
s that annotate a field.field
- An instance of Field
that represents a field
annotated with @Tunable
instance
- 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)
TunableHandler
s that deal with
Tunable
s 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()
TunableHandler
Tunable
.getType
in interface TunableHandler
Tunable
.public final Object getValue() throws IllegalAccessException, InvocationTargetException
TunableHandler
Tunable
or null if no field / get method has been associated with this handler.getValue
in interface TunableHandler
IllegalAccessException
InvocationTargetException
public void setValue(Object newValue) throws IllegalAccessException, InvocationTargetException
TunableHandler
Tunable
.setValue
in interface TunableHandler
newValue
- the value to be written into field or set method annotated with Tunable
IllegalAccessException
InvocationTargetException
public final String getDescription()
TunableHandler
Tunable
's description.getDescription
in interface TunableHandler
Tunable
's descriptionpublic final String getLongDescription()
TunableHandler
Tunable
's longDescriptiongetLongDescription
in interface TunableHandler
Tunable
's longDescriptionpublic final String getExampleStringValue()
TunableHandler
Tunable
.getExampleStringValue
in interface TunableHandler
Tunable
.public final String[] getGroups()
TunableHandler
Tunable
's groups or nesting hierarchy.getGroups
in interface TunableHandler
Tunable
's groups or nesting hierarchypublic final boolean controlsMutuallyExclusiveNestedChildren()
TunableHandler
Tunable
allows switching
of mutually exclusive nested children, else false.controlsMutuallyExclusiveNestedChildren
in interface TunableHandler
Tunable
allows switching
of mutually exclusive nested children, else falsepublic final String getChildKey()
TunableHandler
getChildKey
in interface TunableHandler
public final String dependsOn()
TunableHandler
Tunable
.dependsOn
in interface TunableHandler
public final String[] listenForChange()
TunableHandler
Tunable
.listenForChange
in interface TunableHandler
public final String getName()
TunableHandler
getName
in interface TunableHandler
public final String getQualifiedName()
TunableHandler
getQualifiedName
in interface TunableHandler
public final Properties getParams() throws IllegalArgumentException
TunableHandler
Tunable.getParams()
.getParams
in interface TunableHandler
Tunable.getParams()
IllegalArgumentException
public final String getContext()
public final String getTooltip()
public final double getGravity()
public final boolean getRequired()
public final String getFormat()
public void setOffset(double offset)
Copyright 2011-2015 Cytoscape Consortium. All rights reserved.