I'm getting the following error from the eclipse debugger: local variable unavailable. Tried to trim the code as much as possible. The problem is pretty simple, I have to use the DivisiveUI UpdateLog() method, from the Divise class, using variables from the Cluster class. The Divise has a list containing all of the clusters. Divisive and DivisiveUI has a reference to each other. How can I get access to the variables: sumDistance, avgDistance from the Divisive class? Tried writing a method in the Divisive class, still couldn't access the needed variables :| Thank you!
Error crops at log.append(text+"\n"); Source Not Found.
Divisive:
package clusters;
import java.util.LinkedList;
public class Divisive implements Runnable
{
LinkedList<Record> mainTable;
LinkedList<Cluster> clusterList;
int meassureType;
DivisiveUI parent;
int clusterCount;
Divisive(LinkedList<Record> mainTable, DivisiveUI parent)
{
this.parent=parent;
this.mainTable=new LinkedList<Record>(mainTable);
setMeassureType(0);
}
}
DivisiveUI:
package clusters;
@SuppressWarnings("serial")
public class DivisiveUI extends JPanel implements Runnable{
ClusteringSelection parent;
Divisive divisive;
JTextField clusterCount;
JTextArea log;
public void UpdateLog(String text)
{
log.append(text+"\n");
log.setCaretPosition(log.getDocument().getLength());
}
}
Cluster:
package clusters;
public class Cluster
{
LinkedList<Record> table;
LinkedList<MatrixRow> matrix;
LinkedList<Double> center;
double sumDistance;
double avgDistance;
int meassureType;
}