Blocking a drag operation

I have a bunch of tree nodes that I want to perform drag/drop on. I would like to prevent some of these tree nodes from being draggable. So, I need a way to grab the object attempting to be dragged and interrogate it to see if it's a draggable node.
I am using a TransferHandler, and a DropTargetAdapter.
How do i grab the object attempting to be dragged, and 'block' it from being dragged if I determine it is not a draggable node?

That's what I'm doing now, but it isn't the ideal
solution. I don't want the user to be able to drag
the object in the first place.A DropAdapter isn't going to help you here. You need something on the Drag side for that. I'm using either the DragGestureRecognizer or the DragSourceListener interface (can't remember which, the code's on my home computer). DragGestureRecognizer sounds more like it based on the documentation. Don't call startDrag() unless you're over a draggable component.

Similar Messages

  • Socket blocking on read operation while uploading zip file to the server

    I am trying to upload a zip file to the server
    Client thread creates the zip file ( of the modified files) and it even completes writing the data to the socket stream.
    Now if the server thread tries to read the same data from the stream, it blocks on read operation.
    While downloding the zip file from the server works fine.
    Thanks in advance

    You can use the URL object to upload it as multipart/form-data.
    http://forum.java.sun.com/thread.jspa?threadID=579720&messageID=3997264
    Or check out some of the file uploaders out there.
    http://www.google.nl/search?hl=nl&q=site%3Asun.com+upload+applet&btnG=Zoeken&meta=

  • Origin of a Drag Operation

    I have a JTable and a JTree which are both Drag and Drop enabled. When moving items from table cell to table cell I want to do different processing than moving items from the tree to the table. Is there anyway to determine the origin of the Drag operation? I tried the getSource() method for the event, but it returns a DropTargetDropEvent and not the Component where the Drag originated.
    Thanks,
    Jeremy

    Have you tried getting the class type (instanceof) of the transfered object?
    Maybe they are different for tree and table.
    Or if its a DragSourceContext object, you could get the originating component using the getComponent() method.
    Object sourceObj = dropTargetDropEvent.getTransferable().getTransferData( supportedFlavors[0] );
    System.out.println("Type is: "+sourceObj.getClass().getName());
    if (sourceObj instanceof DragSourceContext)
      DragSourceContext dsc = (DragSourceContext)sourceObj;
      // at least the source component of the transfered object should be different for tree and table...
      Component sourceComponent = dsc.getComponent();
    }

  • [svn:fx-3.x] 5713: User-submitted patch to fix DividedBox numDividers during divider drag operation

    Revision: 5713
    Author: [email protected]
    Date: 2009-03-28 16:31:33 -0700 (Sat, 28 Mar 2009)
    Log Message:
    User-submitted patch to fix DividedBox numDividers during divider drag operation
    QE Notes: None
    Doc Notes: None
    Bugs: sdk-15199
    Reviewer: alex
    tests: checkintests, mustella/dividedBox
    Ticket Links:
    http://bugs.adobe.com/jira/browse/sdk-15199
    Modified Paths:
    flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/containers/DividedBox.as

  • Adding an ad block filter for Opera Mobile 10 with...

    I just got my new N8!
    i installed the opera mobile 10 browser. now i want to ad an ad block filter. from blogs, i read that this is possible by just copying a filter file into the installation folder of opera.
    my problem is just that i do not find the installation order for opera!!!
    where does the N8 install programs?
    any help?
    or does someone know another method of using an ad block? is there maybe an app for the nokia browser to block ads?

    Yes, I do have the songs with the m3u file.
    I tried your solution and it worked. It's not as simple as using an m3u file, but I'll take what I can get. Hurrah, my road trip and other playlists can be updated without gnashing of teeth!
    Thank you so much!
    ed2345 wrote:
    eastercat, Do I understand correctly that you have the song files in a folder along with the M3U file? 
    If so, do as follows:  In iTunes, File > New Playlist.  Rename the new playlist to correspond to your compilation, and open it.  Now go into the folder, delete the M3U, and drag all the songs into the open iTunes playlist window.

  • IN PROCESS INSPECTION, QM operation blocking next PP Operation

    Evening dear members.
    It is possible to create a QM operation which could block the next PP operation on a PP recipe/route, until the QM one is released/confirmed/finished.?
    Example:
    10 PP operation CLEANING
    20 QM operation MICROBIOLOGY TESTS
    **if results of 20 are A-OK,,,,release/open/allow**
    30 PP operation 1st PP OPERATION
    40 QM operation DOESNT BLOCK next operation
    50 PP....... and so on
    If yes, what do I have to mantain to do so?
    Appreciate your feedback

    hi,
    Create one new Control key for Inspection operations in:
    QCC0>Quality Planning>Inspection Planning>Operation>Define Control Keys for Insp. Operations.
    If it is for QM operation, do not forget to flag "insp char. required".
    And in "Confirmation" field, Select "1" Milestone Confirmation.
    now, if you assign this key (With Milestone Confirmation) for Operation 0020,0030, 0040;
    System will not allow to Confirm 0030,0040 unless 0020 is not confirmed.
    Check this in your Case. i hope it will solve your problem.
    Regards,
    Amol

  • Nokia 500 Blocked - not permitted operation

    so when you choose video call form the calling menu on the screen appears "not permitted operation" and the phone is blocked
    Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.

    Thanks, but you can really associate a "video call" number in theaddress list, then if I push video call the phone blockes.Moreover in the menu "video call" appears but in the operating manual this operating is not mentioned. Then the front facing camera is not necessary if you call a 3G surveillance camera. You can implementing the operating SW on the phone anyway.

  • Oracle's block size and operative system cluster

    hallo,
    I would like to move our oracle's database 10.2g from server in a datacenter with Vmware environment, where the net admin will install windows 2008 with 64 bit.
    Now, the net admin strong believe that if oracle's block size is near at size of cluster of the cooked filesystem, oracle perfomance will increase, and he wants to set oracle's block size to 64 K
    It's a right idea or a mistake?
    thanks' in advance anyone answers.

    Dan_58 wrote:
    hallo,
    I would like to move our oracle's database 10.2g from server in a datacenter with Vmware environment, where the net admin will install windows 2008 with 64 bit.
    Now, the net admin strong believe that if oracle's block size is near at size of cluster of the cooked filesystem, oracle perfomance will increase, and he wants to set oracle's block size to 64 K
    It's a right idea or a mistake?
    I think he's probably had more experience with SQL Server - which is more closely integrated with the operating system, which means this type of thinking can be of some help. SQL Server has a fixed extent size of 64K (8 x 8KB pages) and an algorithm that allows it to use readahead on extents, so it's fairly common practice to synchronise the SQL Server extents with the operating system allocation unit - which is why, historically, SQL Server admins would set up the O/S with a 64KB allocation unit and fuss about aligning the allocation unit properly on the hardware.
    This type of thinking is not quite so important in Oracle systems.
    Regards
    Jonathan Lewis

  • LabVIEW VI For CANopen SDO Segmented and BLOCK Transfer Write operation needed

    Currently , i have VI which supports for upto 4 bytes write operation for CANopen SDO.
    I need VI which supports for beyond 4 bytes ie. Segmented AND bLOCK trasnfer.
    Please provide me.
    Thanks in Advance.

    Hi Nilya, 
    Did you create a service request about this? The Industrial Communications for Canopen should support segmented SDO
    Jesse Dennis
    Design Engineer
    Erdos Miller

  • Mouse drag operation failed. Editing is not allowed for this DataSet..

    Hello,
    I am using Visual Studio 2008 and SQL SERVER Management Studio Express 2005.
    I am getting this error when I try to drag a dataset. Please help me to resolve this problem as soon as possible.
    Regards,
    Developer051

    Really quick solution (VS2005) - check the "ZOrder" attribute of the DataSets in the underlying .xss file.
    I had the same problem, but only when I opened one of the XSD designers in Visual Studio. All the others worked fine.
    I found out that 2 of my DataSet Shapes had the same "ZOrder" value ("2") when I opened the XSS file:-
    <DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="7" ViewPortY="15" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
      <Shapes>
        <Shape ID="DesignTable:DataTable1"ZOrder="2" X="26" Y="44" Height="827" Width="258" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0"
    SplitterPosition="823" />
        <Shape ID="DesignTable:DataTable2"
    ZOrder="2" X="704" Y="458" Height="130" Width="204" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="126" />
      </Shapes>
      <Connectors />
    </DiagramLayout>
    I made them different (set one of them to "1", kept the other one as "2") and the DataSet was immediately editable in the designer.
    Hurray!
    I was having the exact same issue and this fixed it right up for me!

  • Supress image in Drag operation from af:image Drag Source

    We have a image with client Attribute that is used as AttributeDrag Source
    jsff snipped looks like this
    <af:image id="image1" ....... source= ........
    <af:clientAttribute name="SymbolId"
    value= .......
    <af:attributeDragSource attribute="SymbolId"/>
    </af:image>
    When user does a drag from this image, by default, user sees the same image being dragged
    We need to suppress the image and just show a + icon while drag is in progress.
    Any pointers ?
    Thanks,
    Jaspal

    I understand this is the default behavior.
    To clarify the Use Case, we drag from adf image into a flex region. Once drag enters flex, flex fetches a different image for the object being dragged
    User sees 2 images when drag enters flex, a ghost image coming from adf and the correct scaled down image from flex. We need to suppress the ghost image from adf
    Looking for workaround (maybe javascript) to suppress the ghost image and just show a + icon while drag is in progress

  • In order to select multiple bookmarks and move then altogether into one folder in a single drag operations the use of the Library Folder was recommended. Where is the Library Folder?

    I don't see a folder with the title "Library Folder" Where does one find this in Firefox 4.01 for Macintosh? (OSX 10.6.7)
    thanks

    The names have changed. Try:
    Bookmarks > Show All Bookmarks
    Does that let you do what you want?

  • How can i turn off siri because it is blocking its normal operation?

    How can I turn off siri? my iphone 4s was still functioning perfectly but but when siri was accidentally turned on I can no longer access it.How can I solve this problem?

    Go to Settings > General > Siri > Turn Off.

  • Operations dispatch and employee capacity blocking

    Hi Gurus,
    I have some simple requirement on employee scheduling.
    Step 1: Create work center for production and assign employees to the same. Employees are from HR with schedule maintained (daily schedule, leave etc) in HR infotype. Capacity should be considered of employees.
    Step 2: Production order is created.
    Step 3: Check the graphical planning screen (CM30) and based on the employee availability drag n drop the operations of the order.
    Requirement:
    1. I do not want the automatic scheduling to happen.
    2. The operations have to be dispatched and the earliest start date, time, end date, time should get updated after we assign the employees using transaction code CM30.
    3. The employees capacity has to be blocked once the operations have been dispatched.
    How:
    1. How do we achieve this?
    2. What should be the work center category ...should it be 0003 - labor?
    3. How to dispatch the operations?
    4. In which SAP table can we find the link of employees capacity? We want to see employee wise time schedule during which he is blocked and when he is free.
    I know there are many questions.. But please help me out.
    Regards,
    Smart

    Hi,
    You can refer the link : PP - Work Centers - SAP Library, which explains linking logistics with different objects in HR.
    The below links also could be of help:
    Transferring Data from SAP Logistics - Personnel Time Management (PT) - SAP Library
    Work Center Integration - ALE/EDI Business Processes - SAP Library
    Thanks
    Prem

  • Help need in drag drop operation in AIR application

    I would like to know if there is a way to drag and drop an attachment file from an desktop mail client application(similar to MSoutlook)  into an AIR application and make it accessible to the AIR application.
    I did experiments with this the drag operation and its giving AIR a File Promise List format as its file type.
    But I'm not exactly sure how to make use of it once it is dropped. The examples in web explains how to manupilate File Promises list format from an AIR application to the desktop.
    There is not much explainations about droping a file promise list format into an AIR app. your valuable help will be greatly appreciated.

    Dear all,
    Is the above mentioned task feasible or not?.If not do mention any other way for implementing this functionality or close to it.
    Thanks

Maybe you are looking for

  • 2013.03-4 archboot "2k13-R1" ISO hybrid images released

    Hi Arch community, Arch Linux (archboot creation tool) 2013.03-4, "2k13-R1" has been released. Homepage and for more information on archboot: http://wiki.archlinux.org/index.php/Archboot Summary: - major update/cleanup on all components Hybrid image

  • HT1352 After Accepting Update On 32-bit Mac Mini Running Snow Leopard 10.6.8, The Mac Won't Boot

    About a month ago, I was using my older Mac-Mini which was running 10.6.8, a screen came up from the Mac App Store, telling me that an update to OS X was available so I took the update. I regret it now.  When the Mac restarted itself, it went down, b

  • Startup from previous system?

    I installed OS 10.4.2 over a newer version (10.4.6? on my iMac G5). I have the "Previous System" folder. I want to get back to where I was before I stupidly installed an older OS. How can I start up from the previous system? Thanks!

  • Preformance tuning

    Hi All, Could you please tell me why this query is taking more time in a package where it is define under a item procedure, but when I not using this in my package which is a outbound taking data from oracle to staging table, this query execute fast

  • Account Code & Name in XL Reporter

    Dear, I want to fetch the Account Code & Account Name in XL Reporter. So please help me for this issue. i use  =ixDimGet("FIG", "BatchNum_0") formula but it's give me the 0 as Account Code.