Display of cover position cache
This commit is contained in:
@@ -22,6 +22,7 @@ import javax.swing.table.DefaultTableModel;
|
||||
public class PuckLoadingDialog extends JDialog {
|
||||
Path dialogPersistPath;
|
||||
DefaultTableModel model;
|
||||
final boolean load;
|
||||
|
||||
final int INDEX_DEWAR = 0;
|
||||
final int INDEX_DATAMATRIX = 1;
|
||||
@@ -29,9 +30,10 @@ public class PuckLoadingDialog extends JDialog {
|
||||
/**
|
||||
* Creates new form PuckLoadingDialog
|
||||
*/
|
||||
public PuckLoadingDialog(java.awt.Frame parent, boolean modal) {
|
||||
super(parent, "Puck Loading", modal);
|
||||
public PuckLoadingDialog(java.awt.Frame parent, boolean load, boolean modal) {
|
||||
super(parent, load ? "Puck Loading" : "Puck Unloading", modal);
|
||||
initComponents();
|
||||
this.load = load;
|
||||
this.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
|
||||
this.setName("PuckLoadingDialog");
|
||||
dialogPersistPath = Paths.get(Context.getInstance().getSetup().getContextPath(), getClass().getSimpleName());
|
||||
@@ -91,8 +93,11 @@ public class PuckLoadingDialog extends JDialog {
|
||||
if ((datamatrix != null) && (!datamatrix.isEmpty())){
|
||||
setStatusLabel("Scanned puck " + datamatrix, 5000);
|
||||
makeVisible(datamatrix);
|
||||
Puck puck = Controller.getInstance().getFreePuck();
|
||||
Controller.getInstance().setLaserPos(puck.getName());
|
||||
} else {
|
||||
setStatusLabel(null, -1);
|
||||
setStatusLabel(null, -1);
|
||||
Controller.getInstance().setLaserPos((Puck)null);
|
||||
}
|
||||
setSugestionLabel(null, -1);
|
||||
buttonSet.setEnabled(false);
|
||||
@@ -103,6 +108,7 @@ public class PuckLoadingDialog extends JDialog {
|
||||
Puck detectedPuck;
|
||||
String detectedDatamatrix;
|
||||
void onPuckMounted(Puck puck, String datamatrix){
|
||||
Controller.getInstance().setLaserPos((Puck)null);
|
||||
if ((datamatrix != null) && (!datamatrix.isEmpty())) {
|
||||
Controller.getInstance().linkPuckDatamatrix(puck, datamatrix, false);
|
||||
setStatusLabel("Mounted puck " + datamatrix + " at " + puck.getName(), 5000);
|
||||
@@ -413,7 +419,7 @@ public class PuckLoadingDialog extends JDialog {
|
||||
/* Create and display the dialog */
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
PuckLoadingDialog dialog = new PuckLoadingDialog(new javax.swing.JFrame(), true);
|
||||
PuckLoadingDialog dialog = new PuckLoadingDialog(new javax.swing.JFrame(), true, true);
|
||||
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(java.awt.event.WindowEvent e) {
|
||||
|
||||
Reference in New Issue
Block a user