|
Cytoscape 3.1.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GUITunableHandler
An extension of TunableHandler with added functionality to support
the construction of a Swing-based UI.
Any implementation of this interface should extend AbstractGUITunableHandler
to avoid the difficult handling of dependencies!
Module: work-swing-api
To use this in your app, include the following dependency in your POM:
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>work-swing-api</artifactId>
</dependency>| Method Summary | |
|---|---|
void |
addChangeListener(GUITunableHandler gh)
Adds a GUITunableHandler that listens to THIS tunable handler. |
void |
addDependent(GUITunableHandler gh)
Adds a GUITunableHandler that depends on THIS tunable handler. |
void |
changeOccurred(String name,
String state)
This is called when a GUITunableHandler that this tunable handler listens to makes
a change. |
void |
checkDependency(String depName,
String depState)
To check the dependencies of this GUITunableHandler with the others. |
String[] |
getChangeSources()
Returns the name of different GUITunableHandlers that this tunable handler listens to. |
String |
getDependency()
Returns the name of a different GUITunableHandler that this tunable handler depends on. |
JPanel |
getJPanel()
To get the panel that contains the GUI representation ( JTextField, JFileChooser, JLabel, JList ...) |
String |
getState()
To get the current value of a Handler
(or path for a FileHandler, or selected item(s)
for ListMultipleSelection ListSingleSelection, ...) |
void |
notifyChangeListeners()
Notify listeners that this object has changed, i.e. |
void |
notifyDependents()
Notify dependents that this object has changed, i.e. |
void |
update()
This method should be implemented to update the user interface in such a way that other tunable handlers we listen to have changed, this tunable handler can display the appropriate inforamtion. |
| Methods inherited from interface org.cytoscape.work.TunableHandler |
|---|
controlsMutuallyExclusiveNestedChildren, dependsOn, getChildKey, getDescription, getGroups, getName, getParams, getQualifiedName, getType, getValue, handle, listenForChange, setValue |
| Method Detail |
|---|
JPanel getJPanel()
JTextField, JFileChooser, JLabel, JList ...)
String getState()
Handler
(or path for a FileHandler, or selected item(s)
for ListMultipleSelection ListSingleSelection, ...)
void notifyDependents()
void addDependent(GUITunableHandler gh)
GUITunableHandler that depends on THIS tunable handler.
gh - the GUITunableHandler that depends on THIS tunable handler.
void checkDependency(String depName,
String depState)
GUITunableHandler with the others.
Check the dependencies :
- if there isn't any dependency, this handler's JPanel container is enabled
- if there is, enable or not the JPanel, depending on the name
(depName) and the state(depState)
of the dependencies of this GUITunableHandler
depName - if this handler has a dependency, it must match this in order
for the associated JPanel to be enableddepState - if this handler has a dependency, this must match the condition
in order for the associated JPanel to be enabledString getDependency()
GUITunableHandler that this tunable handler depends on.
GUITunableHandler that this tunable handler depends on.void notifyChangeListeners()
void addChangeListener(GUITunableHandler gh)
GUITunableHandler that listens to THIS tunable handler.
gh - the GUITunableHandler that listens to THIS tunable handler.String[] getChangeSources()
GUITunableHandlers that this tunable handler listens to.
GUITunableHandlers that this tunable handler listens to.
void changeOccurred(String name,
String state)
GUITunableHandler that this tunable handler listens to makes
a change. This method will call the abstract update() method if the change described by the name and state
parameters has not already been recorded by this tunable handler.
name - The name of the GUITunableHandler that has changed.state - The state the GUITunableHandler has changed to.void update()
|
Cytoscape 3.1.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||