Startup
This commit is contained in:
@@ -13,6 +13,7 @@ import ch.psi.pshell.ui.View;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import ch.psi.wsaf.Task;
|
||||
import java.awt.Point;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -26,6 +27,7 @@ import javax.swing.table.DefaultTableModel;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
@@ -315,10 +317,27 @@ public class TestingList extends Panel {
|
||||
* add custom panel if specified
|
||||
*/
|
||||
private void addCustomPanel(){
|
||||
Path pluginsPath = Paths.get(".", "home", "config", "plugins.properties");
|
||||
try {
|
||||
File file = new File(pluginsPath.toString());
|
||||
FileReader fileReader = new FileReader(file);
|
||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
String line;
|
||||
while ((line = bufferedReader.readLine()) != null) {
|
||||
stringBuffer.append(line);
|
||||
stringBuffer.append("\n");
|
||||
}
|
||||
fileReader.close();
|
||||
System.out.println("Contents of file:");
|
||||
System.out.println(stringBuffer.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
//create a class to visualise the details panel
|
||||
Class testingListDetailsClass = getController().getClassByName("Kollimators");
|
||||
JPanel detailsPanel = (JPanel) testingListDetailsClass.getConstructor(new Class[]{String.class}).newInstance(new Object[]{""});
|
||||
Class panelClass = getController().getClassByName("Kollimators");
|
||||
JPanel detailsPanel = (JPanel) panelClass.getConstructor(new Class[]{String.class}).newInstance(new Object[]{""});
|
||||
this.jPanelCustom.add(detailsPanel);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
|
||||
|
||||
Reference in New Issue
Block a user