This commit is contained in:
@@ -213,6 +213,7 @@ public class EnergyScan extends ScriptProcessor {
|
||||
buttonInsert.setEnabled(editing);
|
||||
buttonClear.setEnabled(editing);
|
||||
buttonOpen.setEnabled(editing);
|
||||
buttonSave.setEnabled(getState().isInitialized());
|
||||
table.setEnabled(editing);
|
||||
textName.setEnabled(editing);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ public class TimeResolved extends ScriptProcessor {
|
||||
boolean editing = !isExecuting();
|
||||
buttonClear.setEnabled(editing);
|
||||
buttonOpen.setEnabled(editing);
|
||||
buttonSave.setEnabled(getState().isInitialized());
|
||||
textName.setEnabled(editing);
|
||||
spinnerScans.setEnabled(editing);
|
||||
|
||||
|
||||
@@ -29,16 +29,16 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jPanel2" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="jPanel2" alignment="1" pref="421" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="34" max="32767" attributes="0"/>
|
||||
<Component id="buttonStart" linkSize="3" min="-2" pref="150" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="44" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
@@ -49,16 +49,18 @@
|
||||
</Group>
|
||||
<Component id="buttonScienta" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="progress" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="textFileId" linkSize="4" min="-2" pref="67" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="buttonResetId" linkSize="4" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -66,14 +68,15 @@
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jPanel2" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="textFileId" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="textCurScan" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="progress" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="textCurScan" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="textFileId" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
@@ -266,7 +269,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="85" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" pref="90" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="buttonInsert" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -371,5 +374,10 @@
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JProgressBar" name="progress">
|
||||
<Properties>
|
||||
<Property name="maximum" type="int" value="1000"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -69,7 +69,8 @@ public class XPS extends ScriptProcessor {
|
||||
}
|
||||
});
|
||||
table.getColumnModel().getColumn(0).setMaxWidth(60);
|
||||
table.getColumnModel().getColumn(0).setResizable(false);
|
||||
table.getColumnModel().getColumn(0).setResizable(false);
|
||||
progress.setVisible(false);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
@@ -115,6 +116,7 @@ public class XPS extends ScriptProcessor {
|
||||
//Overridable callbacks
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
progress.setVisible(false);
|
||||
this.startTimer(1000);
|
||||
}
|
||||
|
||||
@@ -131,6 +133,15 @@ public class XPS extends ScriptProcessor {
|
||||
@Override
|
||||
public void onTimer() {
|
||||
if (isRunning()){
|
||||
progress.setVisible(true);
|
||||
|
||||
try {
|
||||
progress.setValue((Integer) this.eval("int(scienta.getProgress()*1000)", true));
|
||||
//this.getView().getStatusBar().setProgress(eval("scienta.getProgress()", true));
|
||||
} catch (Exception ex) {
|
||||
getLogger().log(Level.FINER, null, ex);
|
||||
}
|
||||
|
||||
try{
|
||||
textCurScan.setText(getGlobalVar("CURRENT_REGION").toString());
|
||||
} catch(Exception ex){
|
||||
@@ -154,7 +165,8 @@ public class XPS extends ScriptProcessor {
|
||||
table.clearSelection();
|
||||
}
|
||||
} else {
|
||||
textCurScan.setText("");
|
||||
textCurScan.setText("");
|
||||
progress.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,6 +281,7 @@ public class XPS extends ScriptProcessor {
|
||||
buttonInsert.setEnabled(editing);
|
||||
buttonClear.setEnabled(editing);
|
||||
buttonOpen.setEnabled(editing);
|
||||
buttonSave.setEnabled(getState().isInitialized());
|
||||
table.setEnabled(editing);
|
||||
textName.setEnabled(editing);
|
||||
}
|
||||
@@ -304,6 +317,7 @@ public class XPS extends ScriptProcessor {
|
||||
buttonResetId = new javax.swing.JButton();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
textCurScan = new javax.swing.JTextField();
|
||||
progress = new javax.swing.JProgressBar();
|
||||
|
||||
jScrollPane2.setViewportView(jEditorPane1);
|
||||
|
||||
@@ -461,7 +475,7 @@ public class XPS extends ScriptProcessor {
|
||||
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel1Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 90, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(buttonInsert)
|
||||
@@ -533,20 +547,22 @@ public class XPS extends ScriptProcessor {
|
||||
textCurScan.setEditable(false);
|
||||
textCurScan.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
||||
|
||||
progress.setMaximum(1000);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 421, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGap(0, 34, Short.MAX_VALUE)
|
||||
.addComponent(buttonStart, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(33, 33, 33)
|
||||
.addComponent(buttonAbort)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(44, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
@@ -554,9 +570,11 @@ public class XPS extends ScriptProcessor {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(textCurScan, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(buttonScienta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(progress, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addComponent(jLabel2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(textFileId, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@@ -570,14 +588,15 @@ public class XPS extends ScriptProcessor {
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(8, 8, 8)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(textFileId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(progress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(textCurScan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4)
|
||||
.addComponent(textCurScan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(textFileId, 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(buttonResetId)
|
||||
@@ -762,6 +781,7 @@ public class XPS extends ScriptProcessor {
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JScrollPane jScrollPane2;
|
||||
private javax.swing.JProgressBar progress;
|
||||
private javax.swing.JSpinner spinnerPasses;
|
||||
private javax.swing.JTable table;
|
||||
private javax.swing.JTextField textCurScan;
|
||||
|
||||
Reference in New Issue
Block a user