Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1874

Re: Drag N Drop with virt

From "bcr666" <bcr666@THRWHITE.remove-dii-this>
Subject Re: Drag N Drop with virt
Message-ID <1182438149.934036.74900@c77g2000hse.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
References <ouZ1q2mVZnDBMZuudbhomers@becker-print-soft.com>
Date 2011-04-27 15:35 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
On Jun 20, 4:03 pm, "Dirk Becker" <dbhom...@becker-print-soft.com>
wrote:
> Hi, i need to drop a virtual File (it doesnt exist cause its a part from
> an archive) to the local File-System.
> This must only be work under Windows, other platforms are irrelevant.
>
> In C# you can create an temporary File with 0 Bytes, after the
> Mouse-Button is released you can fill the temp Files with Data and then
> the System can move the Files from temp to Drop-Location.
>
> In Java I cant find any solution to do this, i only can extract the
> files when the User starts dragging. If i had to extract an 10 MB file
> the user must wait a minute until he can release the Button ;)
>
> Or is there a way to do the same like in c++ with CFSTR_FILECONTENTS and
> CFSTR_FILEDESCRIPTOR.
> Extracting on the fly .. but i think this is not possible :(

You could just create a java.io.File object at the location the user
drops the virtual file.  There will actually be nothing there on the
disk, but you can use the File object to get a stream, to dump your
data to.  After you write, flush and close the stream, you can rename
the File object.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Drag N Drop with virtual "Dirk Becker" <dirk.becker@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: Drag N Drop with virt "bcr666" <bcr666@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
  Re: Drag N Drop with virt "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
    Re: Drag N Drop with virt "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
      Re: Drag N Drop with virt "dbhomers" <dbhomers@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
        Re: Drag N Drop with virt "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
          Re: Drag N Drop with virt "dbhomers" <dbhomers@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
            Re: Drag N Drop with virt "Larry Barowski" <larry.barowski@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000

csiph-web