Skip to content
Snippets Groups Projects
Commit 27ed10f2 authored by Katy Saintin's avatar Katy Saintin
Browse files

Launch connexion on Bean at start of Salsa

parent 5be9efd9
Branches
Tags
No related merge requests found
......@@ -61,30 +61,31 @@ public class AbstractTangoBoxView extends JPanel implements IView<AbstractTangoB
if (bean != null) {
bean.setVisible(visible);
if (visible) {
if (bean instanceof AbstractTangoBox) {
// System.out.println("SET MODEL AND START");
if (bean instanceof AbstractTangoBox && beanModel != null && !beanModel.isEmpty()) {
// System.out.println("START MODEL IN =" + beanModel +
// System.currentTimeMillis());
((AbstractTangoBox) bean).setModel(beanModel);
((AbstractTangoBox) bean).start();
}
}
}
else {
if (bean instanceof AbstractTangoBox) {
// System.out.println("STOP MODEL AND CLEAN");
((AbstractTangoBox) bean).stop();
// System.out.println("STOP MODEL IN" + beanModel +
// System.currentTimeMillis());
((AbstractTangoBox) bean).setModel(null);
((AbstractTangoBox) bean).stop();
// System.out.println("STOP MODEL OUT" + beanModel +
// System.currentTimeMillis());
}
}
}
}
public void setBeanModel(String model) {
beanModel = model;
if (bean != null) {
if (bean.isVisible()) {
if (bean instanceof AbstractTangoBox) {
((AbstractTangoBox) bean).setModel(beanModel);
}
}
if (model == null || !model.trim().isEmpty()) {
beanModel = model.trim();
updateBeanVisibility(true);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment