This commit is contained in:
2018-04-23 08:11:26 +02:00
parent ccf63a1ade
commit 9d0b2d41fa
6 changed files with 117 additions and 55 deletions

View File

@@ -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
}