This commit is contained in:
@@ -270,6 +270,14 @@ public class Controller {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Boolean isPuckLoading() {
|
||||
try {
|
||||
return getMainFrame().eval("is_puck_loading()", true).equals(true);
|
||||
} catch (Exception ex) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getWorkingMode() {
|
||||
try {
|
||||
|
||||
@@ -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="75" max="32767" attributes="0"/>
|
||||
<Component id="panelBottom" pref="74" 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>
|
||||
@@ -384,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>
|
||||
@@ -882,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="109" max="32767" attributes="0"/>
|
||||
<Component id="panelDetail" pref="107" 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"/>
|
||||
@@ -990,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>
|
||||
@@ -1004,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>
|
||||
|
||||
@@ -12,6 +12,7 @@ import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.imaging.Renderer;
|
||||
import ch.psi.pshell.imaging.RendererMode;
|
||||
import ch.psi.pshell.imaging.Source;
|
||||
import ch.psi.pshell.scripting.ViewPreference;
|
||||
import ch.psi.pshell.ui.App;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
@@ -46,6 +47,9 @@ public class MainPanel extends Panel {
|
||||
*/
|
||||
Boolean manualMode;
|
||||
Boolean roomTemperature;
|
||||
Boolean puckLoading;
|
||||
|
||||
public final String PUCK_LOADING_STATUS = "Puck loading";
|
||||
|
||||
public MainPanel() {
|
||||
initComponents();
|
||||
@@ -168,7 +172,7 @@ public class MainPanel extends Panel {
|
||||
this.getLogger().log(Level.SEVERE, null, ex);
|
||||
}
|
||||
Controller.getInstance().updatePuckTypes();
|
||||
startTimer(10000, 1000);
|
||||
startTimer(3000, 1000);
|
||||
updateCameraView();
|
||||
refreshSamplesTable();
|
||||
|
||||
@@ -197,6 +201,21 @@ public class MainPanel extends Panel {
|
||||
ledRoomTemperature.setColor(Color.BLACK);
|
||||
labelRoomTemperature.setText("Room Temperature");
|
||||
}
|
||||
|
||||
try {
|
||||
puckLoading = Controller.getInstance().isPuckLoading();
|
||||
} catch (Exception ex) {
|
||||
puckLoading = null;
|
||||
}
|
||||
if (getState()==State.Ready){
|
||||
if (Boolean.TRUE.equals(puckLoading)){
|
||||
getView().getStatusBar().setStatusMessage(PUCK_LOADING_STATUS);
|
||||
} else {
|
||||
if (PUCK_LOADING_STATUS.equals(getView().getStatusBar().getStatusLabel().getText())){
|
||||
getView().getStatusBar().setApplicationState(getState());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user