|
Cytoscape 2.6.0 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.layout.Tunable
public class Tunable
The Tunable class provides a convenient way to encapsulate CyLayoutAlgorithm property and settings values. Each Tunable has a name, which corresponds to the property name, a description, which is used as the label in the settings dialog, a type, a value, and information about the value, such as a list of options or the lower and upper bounds for the value. These are meant to be used as part of the LayoutSettingsDialog (see getPanel).
Field Summary | |
---|---|
static int |
BOOLEAN
|
static int |
DOUBLE
|
static int |
EDGEATTRIBUTE
|
static int |
GROUP
|
static int |
INTEGER
Types |
static int |
LIST
|
static int |
MULTISELECT
For LIST, NODEATTRIBUTE, or EDGEATTRIBUTE types, use a list widget that supports multiselect rather than a combo box. |
static int |
NODEATTRIBUTE
|
static int |
NOINPUT
Flags |
static int |
NUMERICATTRIBUTE
For attributes, indicate that the list should be restricted to integer or float attributes. |
static int |
STRING
|
Constructor Summary | |
---|---|
Tunable(String name,
String desc,
int type,
Object value)
Constructor to create a Tunable with no bounds information, and no flag. |
|
Tunable(String name,
String desc,
int type,
Object value,
int flag)
Constructor to create a Tunable with no bounds information, but with a flag. |
|
Tunable(String name,
String desc,
int type,
Object value,
Object lowerBound,
Object upperBound,
int flag)
Constructor to create a Tunable with bounds information as well as a flag. |
|
Tunable(String name,
String desc,
int type,
Object value,
Object lowerBound,
Object upperBound,
int flag,
boolean immutable)
|
Method Summary | |
---|---|
void |
clearFlag(int flag)
This method can be used to clear a flag for this Tunable |
String |
getDescription()
Method to return the description for this Tunable. |
Object |
getLowerBound()
Method to get the lowerBound for this Tunable. |
String |
getName()
Method to return a string representation of this Tunable, which is essentially its name. |
JPanel |
getPanel()
This method returns a JPanel suitable for inclusion in the LayoutSettingsDialog to represent this Tunable. |
int |
getType()
Method to return the type of this Tunable. |
Object |
getUpperBound()
Method to get the upperBound for this Tunable. |
Object |
getValue()
This method returns the current value. |
void |
setFlag(int flag)
This method can be used to set a flag for this Tunable |
void |
setLowerBound(Object lowerBound)
Method to set the lowerBound for this Tunable. |
void |
setUpperBound(Object upperBound)
Method to set the upperBound for this Tunable. |
void |
setValue(Object value)
This method is used to set the value for this Tunable. |
String |
toString()
Method to return a string representation of this Tunable, which is essentially its name. |
void |
updateValue()
This method is called to extract the user-entered data from the JPanel and store it as our value. |
boolean |
valueChanged()
Returns the changed state of the value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int INTEGER
public static final int DOUBLE
public static final int BOOLEAN
public static final int STRING
public static final int NODEATTRIBUTE
public static final int EDGEATTRIBUTE
public static final int LIST
public static final int GROUP
public static final int NOINPUT
public static final int NUMERICATTRIBUTE
public static final int MULTISELECT
Constructor Detail |
---|
public Tunable(String name, String desc, int type, Object value)
name
- The name of the Tunabledesc
- The description of the Tunabletype
- Integer value that represents the type of
the Tunable. The type not only impact the
way that the value is interpreted, but also
the component used for the LayoutSettingsDialogvalue
- The initial (default) value of the Tunablepublic Tunable(String name, String desc, int type, Object value, int flag)
name
- The name of the Tunabledesc
- The description of the Tunabletype
- Integer value that represents the type of
the Tunable. The type not only impact the
way that the value is interpreted, but also
the component used for the LayoutSettingsDialogvalue
- The initial (default) value of the Tunableflag
- The initial value of the flag. This can be
used to indicate that this tunable is not user
changeable (e.g. debug), or to indicate if there
is a specific type for the attributes.public Tunable(String name, String desc, int type, Object value, Object lowerBound, Object upperBound, int flag)
name
- The name of the Tunabledesc
- The description of the Tunabletype
- Integer value that represents the type of
the Tunable. The type not only impact the
way that the value is interpreted, but also
the component used for the LayoutSettingsDialogvalue
- The initial (default) value of the Tunable. This
is a String in the case of an EDGEATTRIBUTE or
NODEATTRIBUTE tunable, it is an Integer index
a LIST tunable.lowerBound
- An Object that either represents the lower
bounds of a numeric Tunable or an array of values
for an attribute (or other type of) list.upperBound
- An Object that represents the upper bounds
of a numeric Tunable.flag
- The initial value of the flag. This can be
used to indicate that this tunable is not user
changeable (e.g. debug), or to indicate if there
is a specific type for the attributes.public Tunable(String name, String desc, int type, Object value, Object lowerBound, Object upperBound, int flag, boolean immutable)
Method Detail |
---|
public void setFlag(int flag)
flag
- integer value the contains the flag to set.public void clearFlag(int flag)
flag
- integer value the contains the flag to be cleared.public void setValue(Object value)
value
- Object (usually String) containing the value to be setpublic Object getValue()
public boolean valueChanged()
public void setLowerBound(Object lowerBound)
lowerBound
- the new lowerBound for the tunablepublic Object getLowerBound()
public void setUpperBound(Object upperBound)
upperBound
- the new upperBound for the tunablepublic Object getUpperBound()
public String toString()
toString
in class Object
public String getName()
public int getType()
public String getDescription()
public JPanel getPanel()
public void updateValue()
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |