Closedown
This commit is contained in:
@@ -33,6 +33,11 @@ import javax.swing.JPanel;
|
||||
import javax.swing.table.DefaultTableCellRenderer;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import org.fusesource.jansi.Ansi;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
public class TestingList extends Panel {
|
||||
NetbeansPluginPanel testingList;
|
||||
@@ -284,8 +289,7 @@ public class TestingList extends Panel {
|
||||
private javax.swing.JTable jTable1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
//table with checkboxes
|
||||
|
||||
//table management
|
||||
public void buildTable(){
|
||||
String sDate = getNow();
|
||||
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
|
||||
@@ -299,7 +303,18 @@ public class TestingList extends Panel {
|
||||
jTable1.getColumnModel().getColumn(0).setMaxWidth(27);
|
||||
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
public void addToTable(String deviceName, String testName){
|
||||
String sDate = getNow();
|
||||
if(testName.equals("") || deviceName.equals("")) return;
|
||||
|
||||
ImageIcon icon = new ImageIcon(getClass().getResource("/icons/button_pause-16px.png"));
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
model.addRow(new Object[] {false, sDate, deviceName, testName, "No comm", "Pending", icon});
|
||||
jTable1.setModel(model);
|
||||
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
public String getNow(){
|
||||
@@ -308,5 +323,16 @@ public class TestingList extends Panel {
|
||||
return dateFormat.format(date);
|
||||
}
|
||||
|
||||
public void loadTests() throws FileNotFoundException, IOException{
|
||||
Properties prop = new Properties();
|
||||
String fileName = "../script/test/devces/LS";
|
||||
InputStream is = new FileInputStream(fileName);
|
||||
|
||||
prop.load(is);
|
||||
|
||||
addToTable(prop.getProperty("name"), prop.getProperty("description"));
|
||||
//System.out.println(prop.getProperty("tests"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user