This commit is contained in:
gac-S_Changer
2019-01-24 14:23:52 +01:00
parent d7b66eab3e
commit 1fd5b666e6
2 changed files with 22 additions and 3 deletions

View File

@@ -400,7 +400,7 @@ public class Controller {
return null;
}
}
public Boolean isRoomTemp() {
try {
return getMainFrame().eval("is_room_temp()", true).equals(true);
@@ -449,6 +449,23 @@ public class Controller {
}
}
public Boolean isRoomTempEnabled() {
try {
return getMainFrame().eval("is_room_temperature_enabled()", true).equals(true);
} catch (Exception ex) {
return null;
}
}
public Boolean isBeamlineStatusEnabled() {
try {
return getMainFrame().eval("is_beamline_status_enabled()", true).equals(true);
} catch (Exception ex) {
return null;
}
}
public void imageDetectPucks() throws Context.ContextStateException {
imageDetectPucks(null, null, null);
}

View File

@@ -122,7 +122,7 @@ public class MainPanel extends Panel {
showException(ex);
}
}
});
});
}
@Override
@@ -132,13 +132,15 @@ public class MainPanel extends Panel {
SwingUtils.getWindow(this).setIconImage(img);
}
basePlatePanel.setSelectionMode(SelectionMode.Pucks);
basePlatePanel.setDevice(Controller.getInstance().basePlate);
basePlatePanel.setDevice(Controller.getInstance().basePlate);
}
@Override
public void onInitialize(int runCount) {
stopTimer();
Controller.getInstance().onInitialize(runCount);
panelDisplayMode.setVisible(Controller.getInstance().isRoomTempEnabled());
panelBeamlineStatus.setVisible(Controller.getInstance().isBeamlineStatusEnabled());
if (basePlatePanel.getDevice() != (Device) getDevice("BasePlate")) {
basePlatePanel.setDevice((Device) getDevice("BasePlate"));
}