public void createControls(ICdmFormElement formElement, int style) {
super.createControls(formElement, style);
- text_height = formFactory.createIntegerTextWithLabelElement(formElement, "Height", null, style);
+ text_height = formFactory.createNumberTextWithLabelElement(formElement, "Height", null, style);
text_height.setEnabled(false);
- text_width = formFactory.createIntegerTextWithLabelElement(formElement, "Width", null, style);
+ text_width = formFactory.createNumberTextWithLabelElement(formElement, "Width", null, style);
text_width.setEnabled(false);
element_image = formFactory.createImageElement(formElement, null, style);
element_keyValue = formFactory.createKeyValueViewerElement(formElement, "Key", "Value", null);
@Override
public void setEntity(ImageFile entity) {
super.setEntity(entity);
- text_height.setInteger(entity.getHeight());
- text_width.setInteger(entity.getWidth());
+ text_height.setNumber(entity.getHeight());
+ text_width.setNumber(entity.getWidth());
try {
loadImage(entity.getUri(), false);
} catch (Exception e) {
// But then, I don't think we will handle such large files in the near future
getEntity().setSize((int) imageInfo.getLength());
- text_height.setInteger(imageInfo.getHeight());
+ text_height.setNumber(imageInfo.getHeight());
getEntity().setHeight(imageInfo.getHeight());
- text_width.setInteger(imageInfo.getWidth());
+ text_width.setNumber(imageInfo.getWidth());
getEntity().setWidth(imageInfo.getWidth());
}
protected void handleException(Exception e) {
super.handleException(e);
element_image.unloadImage(postRunnable);
- text_height.setInteger(0);
- text_width.setInteger(0);
+ text_height.setNumber(0);
+ text_width.setNumber(0);
element_image.loadImage(new Runnable(){
public void run() {