Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Drag and Drop TransferType issue?(Is getConfiguredDropType taken into account at SwingUtility.createScoutTransferable)
Drag and Drop TransferType issue? [message #1065263] Tue, 25 June 2013 07:38 Go to next message
Karsten Merkle is currently offline Karsten MerkleFriend
Messages: 1
Registered: June 2013
Junior Member
Hi,

with SWING I wonder why I always get an empty FileListTransferObject for a droped URL.
Even when I set getConfiguredDropType only to TYPE_TEXT_TRANSFER.

So actually I've got two problems here:
- Empty File in FileListTransferObject for an droped URL
- Always FileListTransferObject, even if not requested

regards,
Karsten
Re: Drag and Drop TransferType issue? [message #1069628 is a reply to message #1065263] Tue, 16 July 2013 09:11 Go to previous message
Andreas Hoegger is currently offline Andreas HoeggerFriend
Messages: 174
Registered: February 2010
Senior Member
Having a table overriding the two methods 'execDrop' and getConfiguredDropType as followed. I get either a list of dnd files or the dnd plain text.
        @Override
        protected void execDrop(ITableRow row, TransferObject t) throws ProcessingException {
          if (t.isFileList()) {
            File[] files = ((FileListTransferObject) t).getFiles();
            for (int i = 0; i < files.length; i++) {
              addRowByArray(new Object[]{m_id++, files[i].getName()});
            }
          }
          if (t.isText()) {
            addRowByArray(new Object[]{m_id++, ((TextTransferObject) t).getPlainText()});
          }
        }

        @Override
        protected int getConfiguredDropType() {
          return IDNDSupport.TYPE_FILE_TRANSFER | IDNDSupport.TYPE_TEXT_TRANSFER;
        }


Probably I do not understand the problem correctly - please give a description of your goal.

-andreas
Previous Topic:DataSourceSecurityFilter
Next Topic:Multiline Text Table for Images with RAP
Goto Forum:
  


Current Time: Fri Nov 28 08:55:35 GMT 2014

Powered by FUDForum. Page generated in 0.01999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software