MainPanel prototype
This commit is contained in:
@@ -181,4 +181,9 @@ public class Controller {
|
||||
updateView();
|
||||
}
|
||||
|
||||
public void clearImageDetection() throws Context.ContextStateException {
|
||||
getMainFrame().evalAsync("clear_detection(None)");
|
||||
updateView();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -93,14 +93,15 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonPuckDet" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="buttonPuckDet" max="32767" attributes="0"/>
|
||||
<Component id="buttonCamera" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonClearDet" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jPanel11" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="415" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -112,6 +113,8 @@
|
||||
<Component id="buttonCamera" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonPuckDet" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonClearDet" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jPanel11" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
@@ -258,6 +261,14 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="buttonClearDet">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Clear"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonClearDetActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel1">
|
||||
@@ -939,22 +950,22 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="ledAirPressure1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledAirPressure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel24" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="ledN2Pressure1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledN2Pressure" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel25" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="ledLocalSafety1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledLocalSafety" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel26" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="ledPsysSafety1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledPsysSafety" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabell21" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -968,22 +979,22 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="ledAirPressure1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledAirPressure" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel24" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="ledN2Pressure1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledN2Pressure" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel25" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="ledLocalSafety1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledLocalSafety" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel26" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="ledPsysSafety1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="ledPsysSafety" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabell21" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -991,7 +1002,7 @@
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledAirPressure1">
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledAirPressure">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel24">
|
||||
<Properties>
|
||||
@@ -1003,21 +1014,21 @@
|
||||
<Property name="text" type="java.lang.String" value="N2 Pressure"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledN2Pressure1">
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledN2Pressure">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel26">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Local Safety"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledLocalSafety1">
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledLocalSafety">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabell21">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Psys Safety"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledPsysSafety1">
|
||||
<Component class="ch.psi.pshell.swing.Led" name="ledPsysSafety">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
|
||||
@@ -222,6 +222,7 @@ public class MainPanel extends Panel {
|
||||
jLabel19 = new javax.swing.JLabel();
|
||||
ledLidControlActive4 = new ch.psi.pshell.swing.Led();
|
||||
ledLidControlActive3 = new ch.psi.pshell.swing.Led();
|
||||
buttonClearDet = new javax.swing.JButton();
|
||||
jPanel1 = new javax.swing.JPanel();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
jSeparator1 = new javax.swing.JSeparator();
|
||||
@@ -272,14 +273,14 @@ public class MainPanel extends Panel {
|
||||
jLabel18 = new javax.swing.JLabel();
|
||||
panelDewar = new ch.psi.pshell.swing.ProcessVariablePanel();
|
||||
jPanel13 = new javax.swing.JPanel();
|
||||
ledAirPressure1 = new ch.psi.pshell.swing.Led();
|
||||
ledAirPressure = new ch.psi.pshell.swing.Led();
|
||||
jLabel24 = new javax.swing.JLabel();
|
||||
jLabel25 = new javax.swing.JLabel();
|
||||
ledN2Pressure1 = new ch.psi.pshell.swing.Led();
|
||||
ledN2Pressure = new ch.psi.pshell.swing.Led();
|
||||
jLabel26 = new javax.swing.JLabel();
|
||||
ledLocalSafety1 = new ch.psi.pshell.swing.Led();
|
||||
ledLocalSafety = new ch.psi.pshell.swing.Led();
|
||||
jLabell21 = new javax.swing.JLabel();
|
||||
ledPsysSafety1 = new ch.psi.pshell.swing.Led();
|
||||
ledPsysSafety = new ch.psi.pshell.swing.Led();
|
||||
|
||||
basePlatePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Dewar"));
|
||||
|
||||
@@ -365,6 +366,13 @@ public class MainPanel extends Panel {
|
||||
.addComponent(jLabel15)))
|
||||
);
|
||||
|
||||
buttonClearDet.setText("Clear");
|
||||
buttonClearDet.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonClearDetActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout basePlatePanelLayout = new javax.swing.GroupLayout(basePlatePanel);
|
||||
basePlatePanel.setLayout(basePlatePanelLayout);
|
||||
basePlatePanelLayout.setHorizontalGroup(
|
||||
@@ -374,12 +382,13 @@ public class MainPanel extends Panel {
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, basePlatePanelLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonPuckDet)
|
||||
.addComponent(buttonCamera)))
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(buttonPuckDet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonCamera)
|
||||
.addComponent(buttonClearDet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(basePlatePanelLayout.createSequentialGroup()
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE))))
|
||||
.addGap(0, 415, Short.MAX_VALUE))))
|
||||
);
|
||||
basePlatePanelLayout.setVerticalGroup(
|
||||
basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -387,6 +396,8 @@ public class MainPanel extends Panel {
|
||||
.addComponent(buttonCamera)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonPuckDet)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonClearDet)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
@@ -803,19 +814,19 @@ public class MainPanel extends Panel {
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledAirPressure1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledAirPressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel24))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledN2Pressure1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledN2Pressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel25))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledLocalSafety1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledLocalSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel26))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledPsysSafety1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledPsysSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabell21)))
|
||||
.addContainerGap(38, Short.MAX_VALUE))
|
||||
@@ -825,19 +836,19 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledAirPressure1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledAirPressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel24))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledN2Pressure1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledN2Pressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel25))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledLocalSafety1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledLocalSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel26))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledPsysSafety1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledPsysSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabell21)))
|
||||
);
|
||||
|
||||
@@ -957,10 +968,19 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_buttonPuckDetActionPerformed
|
||||
|
||||
private void buttonClearDetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonClearDetActionPerformed
|
||||
try{
|
||||
Controller.getInstance().clearImageDetection();
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonClearDetActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private ch.psi.mxsc.BasePlatePanel basePlatePanel;
|
||||
private javax.swing.JToggleButton buttonCamera;
|
||||
private javax.swing.JButton buttonClearDet;
|
||||
private javax.swing.JButton buttonExpert;
|
||||
private javax.swing.JButton buttonInitHexiposi;
|
||||
private javax.swing.JButton buttonPuckDet;
|
||||
@@ -979,9 +999,6 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JLabel jLabel19;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel20;
|
||||
private javax.swing.JLabel jLabel21;
|
||||
private javax.swing.JLabel jLabel22;
|
||||
private javax.swing.JLabel jLabel23;
|
||||
private javax.swing.JLabel jLabel24;
|
||||
private javax.swing.JLabel jLabel25;
|
||||
private javax.swing.JLabel jLabel26;
|
||||
@@ -992,12 +1009,10 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JLabel jLabel7;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JLabel jLabel9;
|
||||
private javax.swing.JLabel jLabell20;
|
||||
private javax.swing.JLabel jLabell21;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel10;
|
||||
private javax.swing.JPanel jPanel11;
|
||||
private javax.swing.JPanel jPanel12;
|
||||
private javax.swing.JPanel jPanel13;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
@@ -1016,7 +1031,6 @@ public class MainPanel extends Panel {
|
||||
private ch.psi.pshell.swing.Led led6;
|
||||
private ch.psi.pshell.swing.Led led7;
|
||||
private ch.psi.pshell.swing.Led ledAirPressure;
|
||||
private ch.psi.pshell.swing.Led ledAirPressure1;
|
||||
private ch.psi.pshell.swing.Led ledFillingControl;
|
||||
private ch.psi.pshell.swing.Led ledFillingDewar;
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive;
|
||||
@@ -1026,11 +1040,8 @@ public class MainPanel extends Panel {
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive4;
|
||||
private ch.psi.pshell.swing.Led ledLidInitialized;
|
||||
private ch.psi.pshell.swing.Led ledLocalSafety;
|
||||
private ch.psi.pshell.swing.Led ledLocalSafety1;
|
||||
private ch.psi.pshell.swing.Led ledN2Pressure;
|
||||
private ch.psi.pshell.swing.Led ledN2Pressure1;
|
||||
private ch.psi.pshell.swing.Led ledPsysSafety;
|
||||
private ch.psi.pshell.swing.Led ledPsysSafety1;
|
||||
private ch.psi.pshell.swing.ProcessVariablePanel panelDewar;
|
||||
private javax.swing.JProgressBar progressLN2;
|
||||
private javax.swing.JProgressBar progressWater;
|
||||
|
||||
Reference in New Issue
Block a user