This commit is contained in:
@@ -204,7 +204,8 @@ public class Controller {
|
||||
hexiposi.addListener(hexiposiListener);
|
||||
} else {
|
||||
Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, "No hexiposi detected.");
|
||||
}
|
||||
}
|
||||
mainFrame.hexiposiPanel.setDevice(hexiposi);
|
||||
}
|
||||
|
||||
final PuckState[] puckState;
|
||||
|
||||
@@ -1,143 +1,143 @@
|
||||
package ch.psi.mxsc;
|
||||
|
||||
import ch.psi.pshell.device.DiscretePositionerBase;
|
||||
import ch.psi.pshell.swing.DevicePanel;
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class HexiposiPanel extends DevicePanel {
|
||||
|
||||
final Color COLOR_ON = Color.GREEN; //new Color(51,102,255);
|
||||
final Color COLOR_OFF = Color.BLACK;
|
||||
|
||||
public HexiposiPanel() {
|
||||
initComponents();
|
||||
setDeviceName("hexiposi");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscretePositionerBase getDevice(){
|
||||
return (DiscretePositionerBase) super.getDevice();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDeviceReadbackChanged(Object value) {
|
||||
ledA.setColor("A".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledB.setColor("B".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledC.setColor("C".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
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);
|
||||
if ((value==null) || (value.toString().trim().isEmpty()) || (value.toString().equalsIgnoreCase("Unknown"))){
|
||||
textPosition.setText("");
|
||||
} else {
|
||||
textPosition.setText((value.toString()).substring(0, 1));
|
||||
}
|
||||
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
circlePanel2 = new ch.psi.mxsc.CirclePanel();
|
||||
filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledD = new ch.psi.pshell.swing.Led();
|
||||
filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0));
|
||||
ledC = new ch.psi.pshell.swing.Led();
|
||||
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));
|
||||
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));
|
||||
ledF = new ch.psi.pshell.swing.Led();
|
||||
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledA = new ch.psi.pshell.swing.Led();
|
||||
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
|
||||
circlePanel2.setLayout(new java.awt.GridLayout(5, 3));
|
||||
circlePanel2.add(filler8);
|
||||
|
||||
ledD.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledD);
|
||||
circlePanel2.add(filler7);
|
||||
|
||||
ledC.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledC);
|
||||
circlePanel2.add(filler6);
|
||||
|
||||
ledE.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledE);
|
||||
circlePanel2.add(filler10);
|
||||
|
||||
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);
|
||||
circlePanel2.add(ledB);
|
||||
circlePanel2.add(filler3);
|
||||
|
||||
ledF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledF);
|
||||
circlePanel2.add(filler2);
|
||||
|
||||
ledA.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledA);
|
||||
circlePanel2.add(filler1);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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, 73, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 71, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(circlePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private ch.psi.mxsc.CirclePanel circlePanel2;
|
||||
private javax.swing.Box.Filler filler1;
|
||||
private javax.swing.Box.Filler filler10;
|
||||
private javax.swing.Box.Filler filler2;
|
||||
private javax.swing.Box.Filler filler3;
|
||||
private javax.swing.Box.Filler filler4;
|
||||
private javax.swing.Box.Filler filler6;
|
||||
private javax.swing.Box.Filler filler7;
|
||||
private javax.swing.Box.Filler filler8;
|
||||
private javax.swing.Box.Filler filler9;
|
||||
private ch.psi.pshell.swing.Led ledA;
|
||||
private ch.psi.pshell.swing.Led ledB;
|
||||
private ch.psi.pshell.swing.Led ledC;
|
||||
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
|
||||
}
|
||||
package ch.psi.mxsc;
|
||||
|
||||
import ch.psi.pshell.device.DiscretePositionerBase;
|
||||
import ch.psi.pshell.swing.DevicePanel;
|
||||
import java.awt.Color;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class HexiposiPanel extends DevicePanel {
|
||||
|
||||
final Color COLOR_ON = Color.GREEN; //new Color(51,102,255);
|
||||
final Color COLOR_OFF = Color.BLACK;
|
||||
|
||||
public HexiposiPanel() {
|
||||
initComponents();
|
||||
//setDeviceName("hexiposi");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DiscretePositionerBase getDevice(){
|
||||
return (DiscretePositionerBase) super.getDevice();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDeviceReadbackChanged(Object value) {
|
||||
ledA.setColor("A".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledB.setColor("B".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
ledC.setColor("C".equals(value) ? COLOR_ON: COLOR_OFF);
|
||||
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);
|
||||
if ((value==null) || (value.toString().trim().isEmpty()) || (value.toString().equalsIgnoreCase("Unknown"))){
|
||||
textPosition.setText("");
|
||||
} else {
|
||||
textPosition.setText((value.toString()).substring(0, 1));
|
||||
}
|
||||
|
||||
repaint();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
filler9 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
circlePanel2 = new ch.psi.mxsc.CirclePanel();
|
||||
filler8 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledD = new ch.psi.pshell.swing.Led();
|
||||
filler7 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0));
|
||||
ledC = new ch.psi.pshell.swing.Led();
|
||||
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));
|
||||
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));
|
||||
ledF = new ch.psi.pshell.swing.Led();
|
||||
filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
ledA = new ch.psi.pshell.swing.Led();
|
||||
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 32767));
|
||||
|
||||
circlePanel2.setLayout(new java.awt.GridLayout(5, 3));
|
||||
circlePanel2.add(filler8);
|
||||
|
||||
ledD.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledD);
|
||||
circlePanel2.add(filler7);
|
||||
|
||||
ledC.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledC);
|
||||
circlePanel2.add(filler6);
|
||||
|
||||
ledE.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledE);
|
||||
circlePanel2.add(filler10);
|
||||
|
||||
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);
|
||||
circlePanel2.add(ledB);
|
||||
circlePanel2.add(filler3);
|
||||
|
||||
ledF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledF);
|
||||
circlePanel2.add(filler2);
|
||||
|
||||
ledA.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||
circlePanel2.add(ledA);
|
||||
circlePanel2.add(filler1);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.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, 73, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGap(0, 71, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(circlePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private ch.psi.mxsc.CirclePanel circlePanel2;
|
||||
private javax.swing.Box.Filler filler1;
|
||||
private javax.swing.Box.Filler filler10;
|
||||
private javax.swing.Box.Filler filler2;
|
||||
private javax.swing.Box.Filler filler3;
|
||||
private javax.swing.Box.Filler filler4;
|
||||
private javax.swing.Box.Filler filler6;
|
||||
private javax.swing.Box.Filler filler7;
|
||||
private javax.swing.Box.Filler filler8;
|
||||
private javax.swing.Box.Filler filler9;
|
||||
private ch.psi.pshell.swing.Led ledA;
|
||||
private ch.psi.pshell.swing.Led ledB;
|
||||
private ch.psi.pshell.swing.Led ledC;
|
||||
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
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="panelTop" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="panelBottom" pref="81" max="32767" attributes="0"/>
|
||||
<Component id="panelBottom" pref="77" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
@@ -334,21 +334,21 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="9" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="buttonDetectCover" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="hexiposiPanel" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="9" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="14" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace pref="14" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="15" max="32767" attributes="0"/>
|
||||
<Component id="hexiposiPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="9" max="32767" attributes="0"/>
|
||||
<EmptySpace pref="10" max="32767" attributes="0"/>
|
||||
<Component id="buttonDetectCover" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -357,6 +357,9 @@
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="ch.psi.mxsc.HexiposiPanel" name="hexiposiPanel">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonDetectCover">
|
||||
<Properties>
|
||||
@@ -381,12 +384,12 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace pref="8" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="buttonDrawing" linkSize="25" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonCamera" linkSize="25" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="8" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -879,7 +882,7 @@
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="panelDetail" pref="103" max="32767" attributes="0"/>
|
||||
<Component id="panelDetail" pref="104" max="32767" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="panelDevices" min="-2" pref="280" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
@@ -987,9 +990,9 @@
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Component id="devicesPanel" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="28" max="32767" attributes="0"/>
|
||||
<Component id="panelExpert" min="-2" pref="93" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace pref="31" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -1001,7 +1004,7 @@
|
||||
<Component id="panelExpert" max="32767" attributes="0"/>
|
||||
<Component id="devicesPanel" pref="235" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="8" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
|
||||
@@ -701,18 +701,18 @@ public class MainPanel extends Panel {
|
||||
panelHexiposiLayout.setHorizontalGroup(
|
||||
panelHexiposiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelHexiposiLayout.createSequentialGroup()
|
||||
.addContainerGap(9, Short.MAX_VALUE)
|
||||
.addContainerGap(13, Short.MAX_VALUE)
|
||||
.addGroup(panelHexiposiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(buttonDetectCover)
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(9, Short.MAX_VALUE))
|
||||
.addContainerGap(14, Short.MAX_VALUE))
|
||||
);
|
||||
panelHexiposiLayout.setVerticalGroup(
|
||||
panelHexiposiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelHexiposiLayout.createSequentialGroup()
|
||||
.addContainerGap(14, Short.MAX_VALUE)
|
||||
.addContainerGap(15, Short.MAX_VALUE)
|
||||
.addComponent(hexiposiPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 9, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
|
||||
.addComponent(buttonDetectCover)
|
||||
.addContainerGap())
|
||||
);
|
||||
@@ -739,11 +739,11 @@ public class MainPanel extends Panel {
|
||||
panelViewTypeLayout.setHorizontalGroup(
|
||||
panelViewTypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelViewTypeLayout.createSequentialGroup()
|
||||
.addContainerGap(8, Short.MAX_VALUE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelViewTypeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(buttonDrawing)
|
||||
.addComponent(buttonCamera))
|
||||
.addContainerGap(8, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelViewTypeLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonCamera, buttonDrawing});
|
||||
@@ -1191,9 +1191,9 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelDevicesLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
|
||||
.addComponent(panelExpert, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(31, Short.MAX_VALUE))
|
||||
);
|
||||
panelDevicesLayout.setVerticalGroup(
|
||||
panelDevicesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -1202,7 +1202,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelDevicesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelExpert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE))
|
||||
.addContainerGap(8, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout panelRightLayout = new javax.swing.GroupLayout(panelRight);
|
||||
@@ -1221,7 +1221,7 @@ public class MainPanel extends Panel {
|
||||
panelRightLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelRightLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(panelDetail, javax.swing.GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
|
||||
.addComponent(panelDetail, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(panelDevices, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
@@ -1392,7 +1392,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addComponent(panelTop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(panelBottom, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
|
||||
.addComponent(panelBottom, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
|
||||
.addGap(1, 1, 1))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
@@ -1543,7 +1543,7 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JCheckBox checkExpert;
|
||||
private ch.psi.mxsc.DevicesPanel devicesPanel;
|
||||
private javax.swing.Box.Filler filler1;
|
||||
private ch.psi.mxsc.HexiposiPanel hexiposiPanel;
|
||||
ch.psi.mxsc.HexiposiPanel hexiposiPanel;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel13;
|
||||
private javax.swing.JLabel jLabel15;
|
||||
|
||||
@@ -14,23 +14,24 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class Puck extends DeviceBase {
|
||||
|
||||
final static int signalX = -1;
|
||||
final static PointDouble[] samplesPosition = new PointDouble[]{
|
||||
new PointDouble(0, 24.24),
|
||||
new PointDouble(23.05360995, 7.490571944),
|
||||
new PointDouble(14.24791452, -19.61057194),
|
||||
new PointDouble(-14.24791452, -19.61057194),
|
||||
new PointDouble(-23.05360995, 7.490571944),
|
||||
new PointDouble(0, 52.52),
|
||||
new PointDouble(28.39445573, 44.18263554),
|
||||
new PointDouble(47.7738724, 21.81759648),
|
||||
new PointDouble(51.98542213, -7.474375306),
|
||||
new PointDouble(39.69196765, -34.39328575),
|
||||
new PointDouble(14.79659389, -50.39257097),
|
||||
new PointDouble(-14.79659389, -50.39257097),
|
||||
new PointDouble(-39.69196765, -34.39328575),
|
||||
new PointDouble(-51.98542213, -7.474375306),
|
||||
new PointDouble(-47.7738724, 21.81759648),
|
||||
new PointDouble(-28.39445573, 44.18263554)
|
||||
new PointDouble(0 * signalX, 24.24),
|
||||
new PointDouble(23.05360995 * signalX, 7.490571944),
|
||||
new PointDouble(14.24791452* signalX, -19.61057194),
|
||||
new PointDouble(-14.24791452 * signalX, -19.61057194),
|
||||
new PointDouble(-23.05360995 * signalX, 7.490571944),
|
||||
new PointDouble(0 * signalX, 52.52),
|
||||
new PointDouble(28.39445573 * signalX, 44.18263554),
|
||||
new PointDouble(47.7738724 * signalX, 21.81759648),
|
||||
new PointDouble(51.98542213 * signalX, -7.474375306),
|
||||
new PointDouble(39.69196765 * signalX, -34.39328575),
|
||||
new PointDouble(14.79659389 * signalX, -50.39257097),
|
||||
new PointDouble(-14.79659389 * signalX, -50.39257097),
|
||||
new PointDouble(-39.69196765 * signalX, -34.39328575),
|
||||
new PointDouble(-51.98542213 * signalX, -7.474375306),
|
||||
new PointDouble(-47.7738724 * signalX, 21.81759648),
|
||||
new PointDouble(-28.39445573 * signalX, 44.18263554)
|
||||
};
|
||||
|
||||
static final Character[] SEGMENTS = new Character[]{'A', 'A',
|
||||
|
||||
@@ -253,7 +253,7 @@ public class PuckGraphics {
|
||||
g.setColor(getBorderColor(drawBackground));
|
||||
//size-=1;
|
||||
g.setStroke(new BasicStroke(getBorderWidth(drawBackground)));
|
||||
g.drawArc(position.x - size / 2, position.y - size / 2 , size, size, (int) (194 + (rotated ? puck.angle : 0)), 152);
|
||||
g.drawArc(position.x - size / 2, position.y - size / 2 , size, size, (int) (190 + (rotated ? puck.angle : 0)), 154);
|
||||
g.setStroke(new BasicStroke(1f));
|
||||
} else {
|
||||
Point pu = getDrawUnipuckLedPosition();
|
||||
|
||||
Reference in New Issue
Block a user