Skip to content
Snippets Groups Projects
Commit 620f062d authored by Tassadit Leroul's avatar Tassadit Leroul Committed by Patrick MADELA
Browse files

CTRLDIFFRA-213: Add status bar

parent 14b4576e
Branches
Tags
No related merge requests found
......@@ -35,6 +35,10 @@ import fr.soleil.gui.capoeira.model.CapoeiraModel;
*/
public class ControlBean extends AbstractTangoBox {
private static final String STATE = "State";
private static final String STATUS = "Status";
private static final long serialVersionUID = 1L;
private static final Dimension MINIMUM_SIZE_BEAN = new Dimension(100, 200);
......@@ -178,6 +182,7 @@ public class ControlBean extends AbstractTangoBox {
private void initialize() {
this.setLayout(new BorderLayout());
this.add(this.getDeviceStatusLabel(), BorderLayout.SOUTH);
this.setPreferredSize(new Dimension(600, 500));
// Build object
......@@ -430,8 +435,26 @@ public class ControlBean extends AbstractTangoBox {
this.updateDetectorRealAxisBeans(this.model.getDetectorRealAxis());
this.add(this.getKappaPanel());
}
// this.repaint();
this.setStatusModel();
this.setStateModel();
this.repaint();
}
@Override
protected void setStatusModel() {
getDeviceStatusLabel().setDeviceName(this.model.getDiffractometer());
TangoKey statusKey = new TangoKey();
TangoKeyTool.registerAttribute(statusKey, this.model.getDiffractometer(), STATUS);
stringBox.connectWidget(statusLabel, statusKey);
stringBox.connectWidget(getDeviceStatusLabel(), statusKey);
}
@Override
protected void setStateModel() {
TangoKey stateKey = new TangoKey();
TangoKeyTool.registerAttribute(stateKey, this.model.getDiffractometer(), STATE);
stringBox.connectWidget(this.getStateLabel(), stateKey);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment