if (!isSimpleMotorBeanGUI) {
propertyValue = deviceBundle
.getString("UserMotorBean.command.defineposition");
// - Define Position Command
tangoKey = generateCommandKey(propertyValue);
IDataSourceProducer producer = getProducer();
if (producer != null) {
boolean isCreatable = producer.isSourceCreatable(tangoKey);
// System.out.println("isCreatable=" + isCreatable);
if (isCreatable) {
setWidgetModel(getDefinePositionViewer(), stringBox, tangoKey);
getDefinePositionViewer().setText("<-|->");
}
getDefinePositionViewer().setVisible(isCreatable);
}
}
// SetModel for StateViewer
tangoKey = generateAttributeKey("State");
setStateModel();
propertyValue = deviceBundle.getString("UserMotorBean.command.backward");
tangoKey = generateCommandKey(propertyValue);
IDataSourceProducer producer = getProducer();
try {
if (producer != null) {
// Backward Command
backwardCmd = producer.createDataSource(tangoKey);
}
}
catch (Exception e) {
// TODO: handle exception
}
propertyValue = deviceBundle.getString("UserMotorBean.command.forward");
tangoKey = generateCommandKey(propertyValue);
producer = getProducer();
if (producer != null) {
try {
// Forward Command
forwardCmd = producer.createDataSource(tangoKey);
}
catch (Exception e) {
// TODO: handle exception
}
}