-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTechind.java
35 lines (30 loc) · 1.15 KB
/
Techind.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import javax.swing.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.TreeSelectionModel;
import java.io.*;
import java.awt.*;
import java.util.StringTokenizer;
public class Techind extends JDialog{
public Techind(final CPL cpl, String indvalue){
boolean stop = false;
int counter = 0;
float test = 0;
StringTokenizer st = new StringTokenizer(indvalue,"#");
while (st.hasMoreTokens()){
StringTokenizer x = new StringTokenizer(st.nextToken(),"@\"");
// x has two tokens: company and a set of pattern instances
String companyName = x.nextToken();
//String formula = x.nextToken();
int SizeOfArr = Integer.parseInt(x.nextToken());
StringTokenizer y = new StringTokenizer(x.nextToken(),",");
float ti[] = new float[SizeOfArr];
for(int i = 0; i<SizeOfArr; i++){
ti[i] = Float.parseFloat(y.nextToken());
}
cpl.graph.loadChart("data/ascii/"+companyName);
cpl.graph.addALineWithLocAndVal(ti, SizeOfArr);
}
}
}