if(isChoosableEntity){
btnChooseEntity = formFactory.createButton(box, null, SWT.PUSH);
addControl(btnChooseEntity);
-
+
btnChooseEntity.setLayoutData(LayoutConstants.RIGHT());
btnChooseEntity.setImage(ImageResources.getImage(ImageResources.BROWSE_ICON));
btnChooseEntity.setToolTipText("Browse");
((AbstractEntityCollectionSection)getParentElement()).addElement(entity);
((AbstractEntityCollectionSection)getParentElement()).firePropertyChangeEvent(getParentElement());
}
-
+
}
}
});
/** {@inheritDoc} */
@Override
public void setBackground(Color color) {
+ if(box.isDisposed() || container.isDisposed()){
+ return;
+ }
backgroundColor = color;
super.setBackground(color);
box.setBackground(color);
super.setEntity(entity);
selection_typeSpecimen.setEntity(entity.getTypeSpecimen());
- SpecimenTypeDesignationStatus typeStatus = (SpecimenTypeDesignationStatus) HibernateProxyHelper
- .deproxy(entity.getTypeStatus());
+ SpecimenTypeDesignationStatus typeStatus = HibernateProxyHelper
+ .deproxy(entity.getTypeStatus(), SpecimenTypeDesignationStatus.class);
combo_typeStatus.setSelection(typeStatus);
checkbox_notDesignated.setSelection(entity.isNotDesignated());
}