This commit is contained in:
@@ -28,9 +28,9 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="67" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="73" max="32767" attributes="0"/>
|
||||
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
|
||||
<Component id="circlePanel2" alignment="1" pref="67" max="32767" attributes="0"/>
|
||||
<Component id="circlePanel2" alignment="1" pref="73" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -104,15 +104,16 @@
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.Glue"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="filler5">
|
||||
<Component class="javax.swing.JLabel" name="textPosition">
|
||||
<Properties>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[32767, 32767]"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Monospaced" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
||||
<Color blue="0" green="80" red="0" type="rgb"/>
|
||||
</Property>
|
||||
<Property name="horizontalAlignment" type="int" value="0"/>
|
||||
</Properties>
|
||||
<AuxValues>
|
||||
<AuxValue name="classDetails" type="java.lang.String" value="Box.Filler.Glue"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.Box$Filler" name="filler4">
|
||||
<Properties>
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.awt.Color;
|
||||
*/
|
||||
public class HexiposiPanel extends DevicePanel {
|
||||
|
||||
final Color COLOR_ON = new Color(51,102,255);
|
||||
final Color COLOR_ON = Color.GREEN; //new Color(51,102,255);
|
||||
final Color COLOR_OFF = Color.BLACK;
|
||||
|
||||
public HexiposiPanel() {
|
||||
@@ -31,6 +31,7 @@ public class HexiposiPanel extends DevicePanel {
|
||||
ledD.setColor("D".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledE.setColor("E".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledF.setColor("F".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
textPosition.setText((value==null) ? " " : (value+" ").substring(0, 1));
|
||||
repaint();
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ public class HexiposiPanel extends DevicePanel {
|
||||
filler6 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledE = new ch.psi.pshell.swing.Led();
|
||||
filler10 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
textPosition = new javax.swing.JLabel();
|
||||
filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledB = new ch.psi.pshell.swing.Led();
|
||||
filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
@@ -80,7 +81,11 @@ public class HexiposiPanel extends DevicePanel {
|
||||
ledE.setLedSize(18);
|
||||
circlePanel2.add(ledE);
|
||||
circlePanel2.add(filler10);
|
||||
circlePanel2.add(filler5);
|
||||
|
||||
textPosition.setFont(new java.awt.Font("Monospaced", 0, 14)); // NOI18N
|
||||
textPosition.setForeground(new java.awt.Color(0, 128, 0));
|
||||
textPosition.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(textPosition);
|
||||
circlePanel2.add(filler4);
|
||||
|
||||
ledB.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
@@ -102,9 +107,9 @@ public class HexiposiPanel extends DevicePanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 67, Short.MAX_VALUE)
|
||||
.addGap(0, 73, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(circlePanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 67, Short.MAX_VALUE))
|
||||
.addComponent(circlePanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -124,7 +129,6 @@ public class HexiposiPanel extends DevicePanel {
|
||||
private javax.swing.Box.Filler filler2;
|
||||
private javax.swing.Box.Filler filler3;
|
||||
private javax.swing.Box.Filler filler4;
|
||||
private javax.swing.Box.Filler filler5;
|
||||
private javax.swing.Box.Filler filler6;
|
||||
private javax.swing.Box.Filler filler7;
|
||||
private javax.swing.Box.Filler filler8;
|
||||
@@ -135,5 +139,6 @@ public class HexiposiPanel extends DevicePanel {
|
||||
private ch.psi.pshell.swing.Led ledD;
|
||||
private ch.psi.pshell.swing.Led ledE;
|
||||
private ch.psi.pshell.swing.Led ledF;
|
||||
private javax.swing.JLabel textPosition;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
@@ -402,10 +402,10 @@
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonInitHexiposi" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="40" max="32767" attributes="0"/>
|
||||
<Component id="hexiposiPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="28" max="32767" attributes="0"/>
|
||||
<Component id="jPanel9" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -414,24 +414,20 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<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="led3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="led4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jButton1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="hexiposiPanel" alignment="0" min="-2" pref="71" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="led3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="led4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="buttonInitHexiposi" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jPanel9" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
@@ -450,13 +446,41 @@
|
||||
<Property name="text" type="java.lang.String" value="Initialized"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="jButton1">
|
||||
<Component class="javax.swing.JButton" name="buttonInitHexiposi">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Initialize"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonInitHexiposiActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.mxsc.HexiposiPanel" name="hexiposiPanel">
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="jPanel9">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="hexiposiPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="hexiposiPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="ch.psi.mxsc.HexiposiPanel" name="hexiposiPanel">
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel7">
|
||||
@@ -704,6 +728,7 @@
|
||||
<TitledBorder justification="1" title="Dewar Light"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="deviceName" type="java.lang.String" value="led_level"/>
|
||||
<Property name="showAdvanced" type="boolean" value="false"/>
|
||||
<Property name="showButtons" type="boolean" value="false"/>
|
||||
<Property name="showLimitButtons" type="boolean" value="false"/>
|
||||
|
||||
@@ -69,7 +69,8 @@ public class MainPanel extends Panel {
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
led4 = new ch.psi.pshell.swing.Led();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
buttonInitHexiposi = new javax.swing.JButton();
|
||||
jPanel9 = new javax.swing.JPanel();
|
||||
hexiposiPanel = new ch.psi.mxsc.HexiposiPanel();
|
||||
jPanel7 = new javax.swing.JPanel();
|
||||
led5 = new ch.psi.pshell.swing.Led();
|
||||
@@ -279,7 +280,29 @@ public class MainPanel extends Panel {
|
||||
|
||||
jLabel7.setText("Initialized");
|
||||
|
||||
jButton1.setText("Initialize");
|
||||
buttonInitHexiposi.setText("Initialize");
|
||||
buttonInitHexiposi.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonInitHexiposiActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
|
||||
jPanel9.setLayout(jPanel9Layout);
|
||||
jPanel9Layout.setHorizontalGroup(
|
||||
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel9Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel9Layout.setVerticalGroup(
|
||||
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel9Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
|
||||
jPanel6.setLayout(jPanel6Layout);
|
||||
@@ -296,28 +319,26 @@ public class MainPanel extends Panel {
|
||||
.addComponent(led4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel7))
|
||||
.addComponent(jButton1))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonInitHexiposi))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
|
||||
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel6Layout.setVerticalGroup(
|
||||
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel6Layout.createSequentialGroup()
|
||||
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel7))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jButton1))
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel6))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel7))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonInitHexiposi)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Barcode Reader"));
|
||||
@@ -461,6 +482,7 @@ public class MainPanel extends Panel {
|
||||
);
|
||||
|
||||
panelDewar.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dewar Light", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
|
||||
panelDewar.setDeviceName("led_level");
|
||||
panelDewar.setShowAdvanced(false);
|
||||
panelDewar.setShowButtons(false);
|
||||
panelDewar.setShowLimitButtons(false);
|
||||
@@ -526,12 +548,20 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_buttonCameraActionPerformed
|
||||
|
||||
private void buttonInitHexiposiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonInitHexiposiActionPerformed
|
||||
try{
|
||||
this.showDevicePanel("hexiposi");
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonInitHexiposiActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private ch.psi.mxsc.BasePlatePanel basePlatePanel;
|
||||
private javax.swing.JToggleButton buttonCamera;
|
||||
private javax.swing.JButton buttonInitHexiposi;
|
||||
private ch.psi.mxsc.HexiposiPanel hexiposiPanel;
|
||||
private javax.swing.JButton jButton1;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
@@ -556,6 +586,7 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JPanel jPanel6;
|
||||
private javax.swing.JPanel jPanel7;
|
||||
private javax.swing.JPanel jPanel8;
|
||||
private javax.swing.JPanel jPanel9;
|
||||
private javax.swing.JSeparator jSeparator1;
|
||||
private javax.swing.JSeparator jSeparator2;
|
||||
private javax.swing.JSeparator jSeparator3;
|
||||
|
||||
@@ -281,7 +281,7 @@ public class Puck extends DeviceBase {
|
||||
return Color.GRAY;
|
||||
} else */
|
||||
if (isHighlithted()){
|
||||
return new Color(32,32,32);
|
||||
return new Color(0,0,0);
|
||||
}
|
||||
return Color.GRAY;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class Sample extends DeviceBase {
|
||||
|
||||
|
||||
Color getLabelColor(boolean drawBackground) {
|
||||
return drawBackground ? Color.DARK_GRAY : new Color (0,96,0);
|
||||
return drawBackground ? getPuck().isHighlithted() ? Color.DARK_GRAY : new Color(92, 92, 92) : new Color (0,96,0);
|
||||
}
|
||||
|
||||
Font getLabelFont() {
|
||||
|
||||
Reference in New Issue
Block a user