Cytoscape 2.8.0 API

cytoscape.util
Class ModulePropertiesImpl

java.lang.Object
  extended by cytoscape.util.ModulePropertiesImpl
All Implemented Interfaces:
ModuleProperties
Direct Known Subclasses:
LayoutProperties

public class ModulePropertiesImpl
extends Object
implements ModuleProperties


Field Summary
protected  String moduleType
           
protected  HashMap<String,String> propertyMap
           
protected  String propertyPrefix
           
protected  HashMap<String,String> savedPropertyMap
           
protected  List<Tunable> tunablesList
           
protected  HashMap<String,Tunable> tunablesMap
           
 
Constructor Summary
ModulePropertiesImpl(String propertyPrefix, String moduleType)
          Constructor.
 
Method Summary
 void add(Tunable tunable)
          This method is used to add a new Tunable to the LayoutProperties list.
 Tunable get(String name)
          This method is used to get the Tunable named name from this LayoutProperties.
protected  String getPrefix()
           
 HashMap getProperties()
          getProperties is used to extract properties from the Cytoscape properties file.
 List<String> getTunableList()
          This method is used to get the list of available Tunables for this algorithm.
 List<Tunable> getTunables()
          This method returns list of tunables.
 String getValue(String name)
          This method is used to get the value from the Tunable named name from this LayoutProperties.
 void initializeProperties()
          This method is used to read the properties from the Cytoscape properties file and set the values for that property in the appropriate Tunable.
 void revertProperties()
          revertProperties is used primarily by the settings dialog mechanism when the user does a "Cancel".
 void saveProperties()
          saveProperties is used to add modified properties to the Cytoscape properties so they can be saved in the properties file.
protected  void setModuleType(String type)
           
 void setProperty(String property, String value)
          DOCUMENT ME!
 void setSavedProperty(String property, String value)
          DOCUMENT ME!
 void updateValues()
          This method calls the updateValues method of each Tunable that is part of this LayoutProperty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyMap

protected HashMap<String,String> propertyMap

savedPropertyMap

protected HashMap<String,String> savedPropertyMap

tunablesMap

protected HashMap<String,Tunable> tunablesMap

tunablesList

protected List<Tunable> tunablesList

propertyPrefix

protected String propertyPrefix

moduleType

protected String moduleType
Constructor Detail

ModulePropertiesImpl

public ModulePropertiesImpl(String propertyPrefix,
                            String moduleType)
Constructor.

Parameters:
propertyPrefix - String representing the prefix to be used when pulling properties from the property list.
Method Detail

add

public void add(Tunable tunable)
This method is used to add a new Tunable to the LayoutProperties list. The Tunable can later be retrieved by name using the get method.

Specified by:
add in interface ModuleProperties
Parameters:
tunable - The Tunable to add to this LayoutProperties

get

public Tunable get(String name)
This method is used to get the Tunable named name from this LayoutProperties. In general, the name of a Tunable should correspond to the last component of the property that it is associated with.

Specified by:
get in interface ModuleProperties
Parameters:
name - The name of the Tunable to retrieve.
Returns:
Tunable associated with name or null if there is no Tunable with that name.

getTunableList

public List<String> getTunableList()
This method is used to get the list of available Tunables for this algorithm.

Specified by:
getTunableList in interface ModuleProperties
Returns:
the list of the names of Tunables for this algorithm

getValue

public String getValue(String name)
This method is used to get the value from the Tunable named name from this LayoutProperties. The value is always returned as a String.

Specified by:
getValue in interface ModuleProperties
Parameters:
name - The name of the Tunable whose value you want to retrieve.
Returns:
String value from the Tunable or null if there is no Tunable with that name.

updateValues

public void updateValues()
This method calls the updateValues method of each Tunable that is part of this LayoutProperty.

Specified by:
updateValues in interface ModuleProperties

getProperties

public HashMap getProperties()
getProperties is used to extract properties from the Cytoscape properties file. getProperties should always be called first to initialize the property maps.

Specified by:
getProperties in interface ModuleProperties
Returns:
HashMap containing the resulting properties

saveProperties

public void saveProperties()
saveProperties is used to add modified properties to the Cytoscape properties so they can be saved in the properties file.

Specified by:
saveProperties in interface ModuleProperties

setProperty

public void setProperty(String property,
                        String value)
DOCUMENT ME!

Specified by:
setProperty in interface ModuleProperties
Parameters:
property - DOCUMENT ME!
value - DOCUMENT ME!

setSavedProperty

public void setSavedProperty(String property,
                             String value)
DOCUMENT ME!

Specified by:
setSavedProperty in interface ModuleProperties
Parameters:
property - DOCUMENT ME!
value - DOCUMENT ME!

revertProperties

public void revertProperties()
revertProperties is used primarily by the settings dialog mechanism when the user does a "Cancel".

Specified by:
revertProperties in interface ModuleProperties

initializeProperties

public void initializeProperties()
This method is used to read the properties from the Cytoscape properties file and set the values for that property in the appropriate Tunable. If there is no value for the property, then the default value in the Tunable is used to initialize the property.

Specified by:
initializeProperties in interface ModuleProperties

getTunables

public List<Tunable> getTunables()
Description copied from interface: ModuleProperties
This method returns list of tunables.

Specified by:
getTunables in interface ModuleProperties
Returns:
JPanel that contains all of the Tunable widgets

setModuleType

protected void setModuleType(String type)

getPrefix

protected String getPrefix()

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.