use of org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject in project scout.rt by eclipse.
the class JsonTree method consumeBinaryResource.
@Override
public void consumeBinaryResource(List<BinaryResource> binaryResources, Map<String, String> uploadProperties) {
if ((getModel().getDropType() & IDNDSupport.TYPE_FILE_TRANSFER) == IDNDSupport.TYPE_FILE_TRANSFER) {
ResourceListTransferObject transferObject = new ResourceListTransferObject(binaryResources);
ITreeNode node = null;
if (uploadProperties != null && uploadProperties.containsKey("nodeId")) {
String nodeId = uploadProperties.get("nodeId");
if (!StringUtility.isNullOrEmpty(nodeId)) {
node = getTreeNodeForNodeId(nodeId);
}
}
getModel().getUIFacade().fireNodeDropActionFromUI(node, transferObject);
}
}
use of org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject in project scout.rt by eclipse.
the class JsonTable method consumeBinaryResource.
@Override
public void consumeBinaryResource(List<BinaryResource> binaryResources, Map<String, String> uploadProperties) {
if ((getModel().getDropType() & IDNDSupport.TYPE_FILE_TRANSFER) == IDNDSupport.TYPE_FILE_TRANSFER) {
ResourceListTransferObject transferObject = new ResourceListTransferObject(binaryResources);
ITableRow row = null;
if (uploadProperties != null && uploadProperties.containsKey("rowId")) {
String rowId = uploadProperties.get("rowId");
if (!StringUtility.isNullOrEmpty(rowId)) {
row = getTableRow(rowId);
}
}
getModel().getUIFacade().fireRowDropActionFromUI(row, transferObject);
}
}
use of org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject in project scout.rt by eclipse.
the class JsonStringField method consumeBinaryResource.
@Override
public void consumeBinaryResource(List<BinaryResource> binaryResources, Map<String, String> uploadProperties) {
if ((getModel().getDropType() & IDNDSupport.TYPE_FILE_TRANSFER) == IDNDSupport.TYPE_FILE_TRANSFER) {
ResourceListTransferObject transferObject = new ResourceListTransferObject(binaryResources);
getModel().getUIFacade().fireDropActionFromUi(transferObject);
}
}
use of org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject in project scout.rt by eclipse.
the class AbstractClipboardField method execDropRequest.
@ConfigOperation
@Order(80)
protected void execDropRequest(TransferObject transferObject) {
if (transferObject instanceof ResourceListTransferObject) {
ResourceListTransferObject resourceListTransferObject = (ResourceListTransferObject) transferObject;
setValue(resourceListTransferObject.getResources());
}
}
use of org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject in project scout.rt by eclipse.
the class JsonImageField method consumeBinaryResource.
@Override
public void consumeBinaryResource(List<BinaryResource> binaryResources, Map<String, String> uploadProperties) {
if ((getModel().getDropType() & IDNDSupport.TYPE_FILE_TRANSFER) == IDNDSupport.TYPE_FILE_TRANSFER) {
ResourceListTransferObject transferObject = new ResourceListTransferObject(binaryResources);
getModel().getUIFacade().fireDropActionFromUi(transferObject);
}
}
Aggregations