Author: ruschein
Date: 2010-08-03 12:21:39 -0700 (Tue, 03 Aug 2010)
New Revision: 21144
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/AbstractGuiHandler.java
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/utils/XorPanel.java
Log:
Removed unused getMethod() method.
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/AbstractGuiHandler.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/AbstractGuiHandler.java
2010-08-03 19:21:30 UTC (rev 21143)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/AbstractGuiHandler.java
2010-08-03 19:21:39 UTC (rev 21144)
@@ -1,5 +1,6 @@
package org.cytoscape.work.internal.tunables;
+
import java.awt.Component;
import java.awt.Container;
import java.awt.event.ActionEvent;
@@ -36,23 +37,23 @@
* it represents the name of this dependency (i.e name of the other
<code>Tunable</code>
* </pre>
*/
- private String dependencyName;
-
- /**
- * <pre>
- * Represents the state of the dependency :
- * could be : "true, false, an item of a <code>ListSelection</code>, a
value ..."
- * </pre>
- */
- private String dependencyState;
+ private String dependencyName;
+
+ /**
+ * <pre>
+ * Represents the state of the dependency :
+ * could be : "true, false, an item of a <code>ListSelection</code>, a
value ..."
+ * </pre>
+ */
+ private String dependencyState;
- private String dependencyUnState;
+ private String dependencyUnState;
- /**
- * The list of dependencies between the <code>Guihandlers</code>
- */
+ /**
+ * The list of dependencies between the <code>Guihandlers</code>
+ */
private List<Guihandler> dependencies;
/**
@@ -64,8 +65,8 @@
*/
protected AbstractGuiHandler(Field f, Object o, Tunable t) {
super(f,o,t);
- String s = t.dependsOn();
- if ( !s.equals("") ) {
+ String s = t.dependsOn();
+ if ( !s.equals("") ) {
if(!s.contains("!=")){
dependencyName = s.substring(0,s.indexOf("="));
dependencyState = s.substring(s.indexOf("=") +
1);
@@ -101,12 +102,11 @@
*
* @param le change in the selection of an item in a list
*/
- public void valueChanged(ListSelectionEvent le) {
- boolean ok = le.getValueIsAdjusting();
- if(!ok){
- notifyDependents();
- }
- }
+ public void valueChanged(ListSelectionEvent le) {
+ boolean ok = le.getValueIsAdjusting();
+ if (!ok)
+ notifyDependents();
+ }
/**
@@ -116,7 +116,7 @@
String state = getState();
String name = getName();
for ( Guihandler gh : dependencies )
- gh.checkDependency( name, state );
+ gh.checkDependency( name, state );
}
/**
@@ -144,7 +144,8 @@
* Get the new "values" for the <code>Tunables</code> object that have
been modified if their JPanel is enabled
*/
public void handleDependents(){
- if(panel.isEnabled())handle();
+ if (panel.isEnabled())
+ handle();
}
/**
@@ -161,38 +162,29 @@
*/
public void checkDependency(String name, String state) {
// if we don't depend on anything, then we should be enabled
- if ( dependencyName == null || dependencyState == null ) {
- setEnabledContainer(true,panel);
-// handle();
+ if (dependencyName == null || dependencyState == null) {
+ setEnabledContainer(true, panel);
return;
}
// if the dependency name matches ...
- if ( dependencyName.equals(name) ) {
+ if (dependencyName.equals(name)) {
// ... and the state matches, then enable
- if(dependencyState!=""){
- if ( dependencyState.equals(state) ){
- setEnabledContainer(true,panel);
-// handle();
- }
- // ... and the state doesn't match, then disable
- else{
- setEnabledContainer(false,panel);
- }
- }
- else {
- if ( !dependencyUnState.equals(state) ){
- setEnabledContainer(true,panel);
-// handle();
- }
- // ... and the state doesn't match, then disable
- else{
- setEnabledContainer(false,panel);
- }
- }
+ if (dependencyState!=""){
+ if (dependencyState.equals(state))
+ setEnabledContainer(true, panel);
+ else // ... and the state doesn't match, then
disable
+ setEnabledContainer(false, panel);
+ }
+ else {
+ if (!dependencyUnState.equals(state))
+ setEnabledContainer(true, panel);
+ else // ... and the state doesn't match, then
disable
+ setEnabledContainer(false, panel);
+ }
}
- return;
+ return;
}
/**
@@ -216,12 +208,10 @@
* @return the name of the <code>Guihandler</code>
*/
public String getName() {
- if ( f != null ) {
- return f.getName();
- } else if ( m != null ) {
- return m.getName();
- } else
- return "";
+ if (f != null)
+ return f.getName();
+ else
+ return "";
}
/**
Modified:
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/utils/XorPanel.java
===================================================================
---
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/utils/XorPanel.java
2010-08-03 19:21:30 UTC (rev 21143)
+++
core3/work-swing-impl/trunk/src/main/java/org/cytoscape/work/internal/tunables/utils/XorPanel.java
2010-08-03 19:21:39 UTC (rev 21144)
@@ -72,7 +72,6 @@
public Tunable getTunable() {return null;}
public Field getField() {return null;}
- public Method getMethod() {return null;}
public Object getObject() {return null;}
public void actionPerformed(ActionEvent ae) { }
public void notifyDependents() { }
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.