use of com.haulmont.cuba.gui.components.BoxLayout in project cuba by cuba-platform.
the class CustomOperationEditor method createComponent.
@Override
protected Component createComponent() {
ComponentsFactory componentsFactory = AppBeans.get(ComponentsFactory.class);
BoxLayout layout = componentsFactory.createComponent(VBoxLayout.class);
return layout;
}
use of com.haulmont.cuba.gui.components.BoxLayout in project cuba by cuba-platform.
the class AbstractUploadFieldLoader method loadDropZone.
protected void loadDropZone(UploadField uploadField, Element element) {
String dropZoneId = element.attributeValue("dropZone");
if (StringUtils.isNotEmpty(dropZoneId)) {
Component dropZone = findComponent(dropZoneId);
if (dropZone instanceof BoxLayout) {
uploadField.setDropZone(new UploadField.DropZone((BoxLayout) dropZone));
} else if (dropZone != null) {
throw new GuiDevelopmentException("Unsupported dropZone class " + dropZone.getClass().getName(), context);
} else {
throw new GuiDevelopmentException("Unable to find dropZone component with id: " + dropZoneId, context);
}
}
String dropZonePrompt = element.attributeValue("dropZonePrompt");
if (StringUtils.isNotEmpty(dropZonePrompt)) {
uploadField.setDropZonePrompt(loadResourceString(dropZonePrompt));
}
}
Aggregations