Search in sources :

Example 1 with ResourceListTransferObject

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);
    }
}
Also used : ITreeNode(org.eclipse.scout.rt.client.ui.basic.tree.ITreeNode) ResourceListTransferObject(org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject)

Example 2 with ResourceListTransferObject

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);
    }
}
Also used : ResourceListTransferObject(org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject) ITableRow(org.eclipse.scout.rt.client.ui.basic.table.ITableRow)

Example 3 with ResourceListTransferObject

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);
    }
}
Also used : ResourceListTransferObject(org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject)

Example 4 with ResourceListTransferObject

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());
    }
}
Also used : ResourceListTransferObject(org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject) Order(org.eclipse.scout.rt.platform.Order) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Example 5 with ResourceListTransferObject

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);
    }
}
Also used : ResourceListTransferObject(org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject)

Aggregations

ResourceListTransferObject (org.eclipse.scout.rt.client.ui.dnd.ResourceListTransferObject)5 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1 ITreeNode (org.eclipse.scout.rt.client.ui.basic.tree.ITreeNode)1 Order (org.eclipse.scout.rt.platform.Order)1 ConfigOperation (org.eclipse.scout.rt.platform.annotations.ConfigOperation)1