Skip to content

Commit

Permalink
Updating GUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajt986 committed Jul 13, 2018
1 parent 7fac7f2 commit ddde0ab
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 190 deletions.
8 changes: 5 additions & 3 deletions PEASUI/src/org/jax/peas/userinterface/AnnotationInformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

public class AnnotationInformer implements Function {

private String _fp;
private String[] _fp;

public AnnotationInformer(String fp){
public AnnotationInformer(String[] fp){
_fp = fp;
}

Expand All @@ -15,7 +15,9 @@ public AnnotationInformer(String fp){
public String run() throws IOException {
StringBuilder rvsb = new StringBuilder();
rvsb.append("Annotated features can be located at the following location: \n");
rvsb.append(_fp+"\n");
for(int i = 0; i < _fp.length; i++){
rvsb.append(_fp[i]+"\n");
}

return rvsb.toString();
}
Expand Down
8 changes: 4 additions & 4 deletions PEASUI/src/org/jax/peas/userinterface/FeatureFileUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ public static LinkedList<ListFile> getFeatureFiles(String featurefile) throws IO
return l;
}

public static ListFile[] reformatFeatureFile(String featurefile, String namesuffix, String filesuffix) throws FileNotFoundException{
public static ListFile[] reformatFeatureFile(String featurefile, String dest) throws FileNotFoundException{
if((new File(featurefile)).exists()){
LinkedList<ListFile> rv = new LinkedList<ListFile>();
BufferedReader br = null;
BufferedWriter bw = null;
try {
br = new BufferedReader(new FileReader(featurefile));
bw = new BufferedWriter(new FileWriter(featurefile+filesuffix));
bw = new BufferedWriter(new FileWriter(dest));

while(br.ready()){
String line = br.readLine();
String[] split = line.split("\t");
String name = split[0].replace(" ", "_")+(namesuffix.equals("")? "" : "_"+namesuffix);
String name = split[0].replace(" ", "_");
String path = split[1];
rv.add(new ListFile(name, path));
bw.write(name+"\t"+path);
bw.write(name+"\t"+path+"\n");
}

} catch (IOException e) {
Expand Down
Loading

0 comments on commit ddde0ab

Please sign in to comment.