Closedown
This commit is contained in:
+15
-3
@@ -1,5 +1,8 @@
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.JFrame;
|
||||
|
||||
/*
|
||||
@@ -18,7 +21,8 @@ public class TestMain {
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// TODO code application logic here
|
||||
try {
|
||||
// TODO code application logic here
|
||||
HashMap details = new HashMap();
|
||||
details.put("deviceName", "Device name");
|
||||
details.put("deviceDescription", "Device des");
|
||||
@@ -29,13 +33,21 @@ public class TestMain {
|
||||
HashMap params = new HashMap();
|
||||
params = aBuildParametersMap("repeatTimes:3:Repeat times;midPoint:41.0:Middle point;spanFromMidPoint:11.0:Span around middle point");
|
||||
details.put("parameters", params);
|
||||
|
||||
|
||||
details.put("testDescription", "TestDescription");
|
||||
details.put("testPath", "C:\\Users\\boccioli_m\\Documents\\pshell\\home\\script\\tests\\tests\\Collimator Tests\\Calibrate\\Calibrate.py");
|
||||
details.put("testHelp", "<html>this is a <b>help</b><code> directly from config file</code></html>");
|
||||
// details.put("testHelpUrl", "file:\\\\C:\\Users\\boccioli_m\\Documents\\pshell\\home\\script\\tests\\tests\\Collimator Tests\\Calibrate\\help.html");
|
||||
// details.put("testHelpUrl", "http://www.google.com");
|
||||
System.out.print(new java.io.File(".").getCanonicalPath());
|
||||
|
||||
JFrame frame = new JFrame();
|
||||
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
|
||||
frame.getContentPane().add(new TestingListDetails(details));
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(TestMain.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -196,6 +196,32 @@
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton1"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="Center"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="jButton2"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
|
||||
</Events>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||
<BorderConstraints direction="After"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
|
||||
+100
-10
@@ -18,9 +18,14 @@ import javax.swing.JPanel;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.util.Iterator;
|
||||
import java.util.Properties;
|
||||
import java.util.Vector;
|
||||
import java.util.logging.FileHandler;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import javax.swing.JDialog;
|
||||
@@ -278,6 +283,8 @@ public class TestingList extends Panel {
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
jButtonMoveDown = new javax.swing.JButton();
|
||||
jButtonMoveUp = new javax.swing.JButton();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
jButton2 = new javax.swing.JButton();
|
||||
|
||||
setLayout(new java.awt.BorderLayout());
|
||||
|
||||
@@ -387,6 +394,22 @@ public class TestingList extends Panel {
|
||||
});
|
||||
jPanel2.add(jButtonMoveUp, java.awt.BorderLayout.PAGE_START);
|
||||
|
||||
jButton1.setText("jButton1");
|
||||
jButton1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(jButton1, java.awt.BorderLayout.CENTER);
|
||||
|
||||
jButton2.setText("jButton2");
|
||||
jButton2.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton2ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
jPanel2.add(jButton2, java.awt.BorderLayout.LINE_END);
|
||||
|
||||
jPanel1.add(jPanel2, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
add(jPanel1, java.awt.BorderLayout.NORTH);
|
||||
@@ -483,8 +506,20 @@ public class TestingList extends Panel {
|
||||
moveUp();
|
||||
}//GEN-LAST:event_jButtonMoveUpActionPerformed
|
||||
|
||||
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
this.saveSettings();
|
||||
}//GEN-LAST:event_jButton1ActionPerformed
|
||||
|
||||
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
this.loadSettings();
|
||||
}//GEN-LAST:event_jButton2ActionPerformed
|
||||
|
||||
//<editor-fold defaultstate="collapsed" desc="Witget Variables declaration">
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JButton jButton2;
|
||||
private javax.swing.JButton jButtonMoveDown;
|
||||
private javax.swing.JButton jButtonMoveUp;
|
||||
private javax.swing.JButton jButtonOpenLog;
|
||||
@@ -523,11 +558,11 @@ public class TestingList extends Panel {
|
||||
|
||||
//open details of the selected test in a new panel
|
||||
private void openDetails() throws Exception{
|
||||
|
||||
//pick details from the clicked row
|
||||
int row = jTable1.getSelectedRow();
|
||||
String sDeviceName = jTable1.getValueAt(row, COL.DEVICENAME.ordinal()).toString();
|
||||
String sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
|
||||
String sTestPath = String.valueOf(jTable1.getValueAt(row, COL.TESTPATH.ordinal()));
|
||||
String sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
|
||||
String sTestDescription = jTable1.getValueAt(row, COL.TESTDESCR.ordinal()).toString();
|
||||
String sDeviceDescription = jTable1.getValueAt(row, COL.DEVICEDESCR.ordinal()).toString();
|
||||
@@ -546,6 +581,7 @@ public class TestingList extends Panel {
|
||||
details.put("time", sResultTime);
|
||||
details.put("parameters", mParameters);
|
||||
details.put("testHelp", sTestHelp);
|
||||
details.put("testPath", sTestPath);
|
||||
//open details panel
|
||||
JDialog dlg = new JDialog(getView(), "Test Details - " + sTestName , true);
|
||||
//create a class to visualise the details panel
|
||||
@@ -736,7 +772,7 @@ public class TestingList extends Panel {
|
||||
/**
|
||||
*table management
|
||||
*/
|
||||
public void buildTable() {
|
||||
private void buildTable() {
|
||||
String sDate = getNow();
|
||||
DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
|
||||
jTable1.setModel(model);
|
||||
@@ -744,17 +780,19 @@ public class TestingList extends Panel {
|
||||
jTable1.getColumnModel().getColumn(COL.CHECK.ordinal()).setMaxWidth(27);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICENAME.ordinal()).setPreferredWidth(30);
|
||||
jTable1.getColumnModel().getColumn(COL.STATUS.ordinal()).setPreferredWidth(30);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICEDESCR.ordinal()).setMinWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.DEVICEDESCR.ordinal()).setMaxWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTPATH.ordinal()).setMinWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTPATH.ordinal()).setMaxWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTDESCR.ordinal()).setMinWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTDESCR.ordinal()).setMaxWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTPARAMS.ordinal()).setMinWidth(0);
|
||||
jTable1.getColumnModel().getColumn(COL.TESTPARAMS.ordinal()).setMaxWidth(0);
|
||||
hideColumn(COL.DEVICEDESCR);
|
||||
hideColumn(COL.TESTPATH);
|
||||
hideColumn(COL.TESTDESCR);
|
||||
hideColumn(COL.TESTPARAMS);
|
||||
hideColumn(COL.TESTHELP);
|
||||
jTable1.setAutoCreateRowSorter(true);
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
private void hideColumn(COL column){
|
||||
jTable1.getColumnModel().getColumn(column.ordinal()).setMinWidth(0);
|
||||
jTable1.getColumnModel().getColumn(column.ordinal()).setMaxWidth(0);
|
||||
}
|
||||
|
||||
//append test info to table
|
||||
private void addToTable(String deviceName,
|
||||
@@ -898,7 +936,59 @@ public class TestingList extends Panel {
|
||||
System.out.println("Open command cancelled by user.");
|
||||
}
|
||||
}
|
||||
|
||||
private void saveSettings() {
|
||||
final JFileChooser fc = new JFileChooser();
|
||||
|
||||
int returnVal = fc.showOpenDialog(NetbeansPluginPanel.this);
|
||||
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
File file = fc.getSelectedFile();
|
||||
saveSettings(file);
|
||||
}
|
||||
}
|
||||
|
||||
private void saveSettings(File file) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) jTable1.getModel();
|
||||
try {
|
||||
ObjectOutputStream out = new ObjectOutputStream(
|
||||
new FileOutputStream(file));
|
||||
out.writeObject(tableModel.getDataVector());
|
||||
out.close();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void loadSettings() {
|
||||
final JFileChooser fc = new JFileChooser();
|
||||
int returnVal = fc.showOpenDialog(NetbeansPluginPanel.this);
|
||||
if (returnVal == JFileChooser.APPROVE_OPTION) {
|
||||
File file = fc.getSelectedFile();
|
||||
loadSettings(file);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadSettings(File file) {
|
||||
DefaultTableModel tableModel = (DefaultTableModel) jTable1.getModel();
|
||||
try {
|
||||
ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));
|
||||
Vector rowData = (Vector)in.readObject();
|
||||
Iterator itr = rowData.iterator();
|
||||
for (int row = 0 ; row < jTable1.getRowCount() ; row++){
|
||||
tableModel.removeRow(row);
|
||||
}
|
||||
while(itr.hasNext()) {
|
||||
tableModel.addRow((Vector) itr.next());
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
SwingUtils.showMessage(this, "getTestInProgress()", ex.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,13 +49,7 @@
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel3" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane4" pref="317" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jScrollPane4" pref="317" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -63,15 +57,14 @@
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDeviceName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDeviceName" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDeviceDescription" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -337,14 +330,6 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Help"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane4">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
@@ -358,6 +343,9 @@
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="dropMode" type="javax.swing.DropMode" editor="org.netbeans.modules.form.editors.EnumEditor">
|
||||
<Value id="INSERT"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
|
||||
@@ -2,9 +2,15 @@
|
||||
* Copyright (c) 2015 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
@@ -61,7 +67,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
jScrollPane3 = new javax.swing.JScrollPane();
|
||||
txtTestDescription = new javax.swing.JTextArea();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
jScrollPane4 = new javax.swing.JScrollPane();
|
||||
jEditorPaneHelp = new javax.swing.JEditorPane();
|
||||
|
||||
@@ -171,11 +176,9 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
txtTestDescription.setRows(5);
|
||||
jScrollPane3.setViewportView(txtTestDescription);
|
||||
|
||||
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jLabel3.setText("Help");
|
||||
|
||||
jEditorPaneHelp.setContentType("text/html"); // NOI18N
|
||||
jEditorPaneHelp.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
|
||||
jEditorPaneHelp.setDropMode(javax.swing.DropMode.INSERT);
|
||||
jScrollPane4.setViewportView(jEditorPaneHelp);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
@@ -210,24 +213,19 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(cmCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jLabel3)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE))
|
||||
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
|
||||
.addContainerGap())
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel3))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(txtDeviceName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(txtDeviceDescription, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@@ -263,14 +261,15 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void fillComponents(HashMap hDetails) {
|
||||
//add values to each text box
|
||||
this.txtDeviceName.setText(hDetails.get("deviceName").toString());
|
||||
this.txtDeviceDescription.setText(hDetails.get("deviceDescription").toString());
|
||||
this.txtTestDescription.setText(hDetails.get("testDescription").toString());
|
||||
this.txtTestSuite.setText(hDetails.get("testSuite").toString());
|
||||
this.txtTestName.setText(hDetails.get("testName").toString());
|
||||
this.txtTestResult.setText(hDetails.get("time").toString() + "\n" + hDetails.get("testResult").toString());
|
||||
this.jEditorPaneHelp.setText(String.valueOf(hDetails.get("testHelp")));
|
||||
|
||||
//help text
|
||||
showHelp(String.valueOf(hDetails.get("testPath")), String.valueOf(hDetails.get("testHelp")));
|
||||
//parameters table
|
||||
HashMap hParams = (HashMap) hDetails.get("parameters");
|
||||
String name="", value="", description="";
|
||||
@@ -288,6 +287,47 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
jTableParams.setModel(model);
|
||||
}
|
||||
}
|
||||
|
||||
//load and show help
|
||||
private void showHelp(String sTestPath, String sHelpText){
|
||||
this.jEditorPaneHelp.addHyperlinkListener(new HyperlinkListener() {
|
||||
@Override
|
||||
public void hyperlinkUpdate(HyperlinkEvent hle) {
|
||||
if (HyperlinkEvent.EventType.ACTIVATED.equals(hle.getEventType())) {
|
||||
System.out.println(hle.getURL());
|
||||
Desktop desktop = Desktop.getDesktop();
|
||||
try {
|
||||
desktop.browse(hle.getURL().toURI());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.jEditorPaneHelp.setEditable(false);
|
||||
//if there is no input, exit
|
||||
if(sTestPath == "" && sHelpText == ""){
|
||||
return;
|
||||
}
|
||||
File fTest = new File(sTestPath);
|
||||
String sParentPath = fTest.getParent().toString();
|
||||
File fHelp = new File(FilenameUtils.separatorsToSystem(sParentPath + "/help.html"));
|
||||
|
||||
if(fHelp.isFile()){//if local help file existis:
|
||||
try {
|
||||
this.jEditorPaneHelp.setPage(fHelp.toURI().toURL());
|
||||
} catch (IOException ex) {
|
||||
this.jEditorPaneHelp.setText(String.valueOf(ex));
|
||||
}
|
||||
} else { //help.html file is present. see if a plain text has been given from .config file
|
||||
if(sHelpText.isEmpty() || sHelpText == "null"){
|
||||
this.jEditorPaneHelp.setText("[No help available]");
|
||||
//this.jEditorPaneHelp.setVisible(false);
|
||||
}else {
|
||||
this.jEditorPaneHelp.setText(sHelpText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void cmCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmCancelActionPerformed
|
||||
|
||||
@@ -305,7 +345,6 @@ public class TestingListDetails extends javax.swing.JPanel {
|
||||
private javax.swing.JEditorPane jEditorPaneHelp;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
|
||||
@@ -4,11 +4,9 @@ filename=Calibrate.xml
|
||||
help = \
|
||||
This test sends a command to the low level firmware which controls the collimators \n\
|
||||
requesting that it calibrates itself. \n\n\
|
||||
<strong>Calibration</strong> involves moving to the R1 and R2 reference positions and measuring the \n\
|
||||
<b>Calibration</b> involves moving to the R1 and R2 reference positions and measuring the \n\
|
||||
number of steps required to do so. At the end of the sequence the default collimator \n\
|
||||
will be selected. \n\n\
|
||||
During the course of the expected calibration period (45-70 seconds) the test \n\
|
||||
procedure will plot the values of all critical system variables. \n\n\
|
||||
For further information please consult Valery Ovinnikov.
|
||||
|
||||
<img src="./mount.png"/>
|
||||
For further information please consult Valery Ovinnikov.<br/>\
|
||||
|
||||
Reference in New Issue
Block a user