Capturing events help

Im building a visual component where the user can drag node(s) from a palette to a main panel. These nodes can be connected to one another with links that one can create by gliding over the node and dragging it to the node that it needs to be connected to. My problem now is how do I determine which way the arrow is going i.e. what if the user is dragging to the left or right ot top or bottom of the node how can I capture this?
Thank you all for your time

My problem now is how do I determine which way the arrow
is going i.e. what if the user is dragging to the
left or right ot top or bottom of the node how can I
capture this? You'll need to have custom DnD code to handle mouse drag events (see MouseMotionListener.mouseDragged) when dragging within the main panel. You'll need to detect collisions with other nodes in your mouseDragged method. Collision detection is sometimes difficult to do depending on the shape of your nodes. Simplest way is to get the bounds of each node and use the Rectangle methods to calculate collision points with the dragged node as you're dragging. When you detect a mouse released event, you'll use the last known direction as an indicator on which way to point the arrow.

Similar Messages

  • Capturing events fired by ACtiveX control

    How can i capture events fired by ACtiveX control. i am using RegEventCallback vi, but that controls user driven events. i have an activeX control that fires events at unspecified time, now i want to know how to handle such events in LabView.
    Rubina

    Hi InformaticsComplex,
    Using the Register Event Callback VI is the correct method to capture events generated by an ActiveX control. Register Event Callback registers a VI to be called when the event occurs. I suggest checking out the LabVIEW Help articles Using ActiveX with LabVIEW and Register Event Callback as well as the following examples. I hope this helps!
    Examples (all found in NI Example Finder):
    ActiveX Event Callback for Excel VI: labview\examples\comm\axevent.llb
    ActiveX Event Callback for IE VI: labview\examples\comm\axevent.llb
    NET Event Callback for Calendar Control VI: labview\examples\comm\dotnet\Events.llb
    NET Event Callback for DataWatcher VI: labview\examples\comm\dotnet\Events.llb
    Mike Lyons
    National Instruments
    http://www.ni.com/devzone

  • IDS Sensor 4.1 doesn't capture events.

    My IDS Sensor 4.1 stops capturing events after some time. I don't know if maybe it is because there are a lot of VLANs in SPAN and the IDS doesn't support all this traffic. Am i wrong?
    Here is the show ver output:>
    # sh ver
    Application Partition:
    Cisco Systems Intrusion Detection Sensor, Version 4.1(4)S174
    OS Version 2.4.18-5-phoenix
    Platform: WS-SVC-IDSM2-BUN
    Sensor up-time is 20:49.
    Using 337403904 out of 1979682816 bytes of available memory (17% usage)
    Using 2.0G out of 17G bytes of available disk space (13% usage)
    MainApp 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    AnalysisEngine 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    Authentication 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    Logger 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    NetworkAccess 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    TransactionSource 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    WebServer 2005_Feb_15_10.32 (Eng4g) 2005-02-15T10:35:34-0600 Running
    CLI 2004_Apr_15_15.03 (Release) 2004-04-15T15:11:59-0500
    Upgrade History:
    * IDS-sig-4.1-4-S172 08:51:06 UTC Wed Jun 01 2005
    IDS-sig-4.1-4-S174.rpm.pkg 15:13:12 UTC Wed Jun 08 2005
    Maintenance Partition Version 2.1(1)
    And here is the "sh event" output:
    # sh event
    evError: eventId=1099377235773324837 severity=warning
    originator:
    hostId: CISCO-IDS
    appName: sensorApp
    appInstanceId: 1206
    time: 2005/06/10 08:43:21 2005/06/10 10:43:21 GMT
    errorMessage: name=errWarning Producer appears to be out of superblocks...consider configuring TCPReassemblyMode to loose FreeBlocks: 2155
    evError: eventId=1099377235773324838 severity=warning
    originator:
    hostId: CISCO-IDS
    appName: sensorApp
    appInstanceId: 1206
    time: 2005/06/10 08:43:23 2005/06/10 10:43:23 GMT
    errorMessage: name=errWarning Producer appears to be out of superblocks...consider configuring TCPReassemblyMode to loose FreeBlocks: 2155
    But i have already configured TCP Reassembly Mode to 'loose' and it does the same: after some time, it logs a few events and starts logging this event, but the Security Monitor stops showing me any Alarm. What can I do to solve this?
    Thank you very much.

    When the IDSM2 starts crashing (i mean, logging only this event), i clear the IDSM2 interface counters and i realize that no packet are processed and the "missed packet percentage" grows and grows.
    That means after this crashing it stops processing packets and loses every traffic it receives. The question is why? And how can i solve this?
    Thanks everybody.

  • I have an older Mac desktop, version 10.5.8. I need to reinstall Image Capture. Help, please.

    I have an older Mac desktop, version 10.5.8. I need to reinstall Image Capture. Help, please.

    Do you have the original gray system disks that came with the computer, or a full retail install disk set for 10.5? If so, you can use a utiltiy:
    http://charlessoft.com/pacifist_olderversions.html
    to extract just Image Capture from the disk and install it. Otherwise, you  would have to reinstall the entire OS

  • How to capture F4 help during bdc recording

    Hello All,
    I need one help to solve one of the requrimkents..
    In transaction Co02, user have to add the compoenents manually..but before user adds the components manually, i need to call the transaction co02, then i have do F4 help and fill the data for the user and then user will handle it manually...
    So till F4 help and filling the data in F4 help, i need to do through my program using bdc...when i try to do, F4 help is not captured in my recording..
    So please help me how to capture F4 help during BDC recording.
    Thanks in advance
    Sangeetha

    HI Sangeetha,
    I have one question for you!!!!
    Capturing F4 help  in BDC recording is secondary thing. First, If you want the user to select the value from the F4 help, then in that case user will have to run the BDC program in the foreground mode which is not possible and time consuming if your file is having more records (say >100). Then in that case will you prompt the user every time for selecting the component values, as many records there will be in the file to be uploaded??? I think it is not a way of handling or capturing the component values. I would prefer that pass the component values in the file which has to be uploaded.
    Please let me know if you still have some doubts on the same.
    Thanks
    VJ

  • Capture event c#

    Hi,
    Is it possible to capture event and trigger action? On closing document, message box say "Bye".
    Can I do it using SDK with c# if yes then please guide me how. If NO then  let me know how it can be possible.
    Thanks

    Please tell me more which C++ based plugin I can use?
    I can embed javascript with pdf using c#(like app.alert). But I cannot find example of capturing event. Can you please provide me example?
    Thanks

  • How to capture event in process chain....Please help...

    Hi All,
    Please tell me how can I capture any event triggred by ABAP program in process chain...The ABAP program is there in the process chain...ABAP prog is triggering one event based on some condition..Please tell me how can I capture that event in the process chain...
    Thanks in Advance...

    Also check this link...
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?documenturi=/help/sdn_nw04/saphelp_nw04/helpdata/en/8f/c08b3baaa59649e10000000a11402f/content.htm
    Hope this helps...
    Thanks,
    Raj

  • Capture event from job cancelled in SM37 by workflow, is not posible.

    Hi, i'm learning workflows and i want capture the event ABORT o CANCELLED form job in sm37 and send email to agent recipient but i dont know as to resolve this problem.
    Please , i need help.
    Thanks.

    Hi......
    Look Job : BI_PROCESS_LOADING.........is actually the background job.............in a process chain.......when the trigger come to a load process...........first this job will run........and after completion of this job...........the actual IP will start...............we don't schedule this job.......but u r saying ur loads are fine.........if this job fails......then the IP will not start......so how ur IP s are running........As already suggested............u deschedule the chain........then again schedule it back.......
    Now to check job that exactly fails at 12:00 a.m.....................
    Go to SM37 ............give this job name...............date......and in the time field give the time.........
    Regards,
    Debjnai......

  • Problem with capturing event in object

    I am developing the dreamweaver extension for our project. In
    that i have a requirement of loading the images from the server and
    showing the images as thumbnails. I am using the flash player
    embedded into the dreamweaver ui. I am directly loading the images
    from the server using the src attribute of the embed tag. I am not
    using any swf to load the images. I am not able to capture any
    events from the object tag. This is a very critical issue please
    help me in solving this issue. Attached is the code snippet
    document.forms[0].tile[y].src=gFilePath[y+(gMax*(pageNo-1))];
    document.forms[0].asset[y].innerHTML=gFileName[y+(gMax*(pageNo-1))].substring(0,12);
    document.forms[0].imageField[y].src=gFilePath[y+(gMax*(pageNo-1))];//document.forms[0].til e[y].src;
    <td width="22%"><object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    width="100" height="100">
    <param name="movie" value="comJava.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#d4d0c8" />
    <embed name="tile" src="comJava.swf" quality="high"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="100"
    height="100"></embed>
    </object></td>

    Hi Prawin,
    just try to change the code like this
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus)
    newwindow.focus()
    else{
    newwindow.close
    window.focus()
    </script>
    orelse u can find the code in some tutorials

  • Capture event in Modal form

    Hi Guys,
    How do we capture the event in "Do you want to save the changes" modal dialog?
    I can't see the FormType using debug information.
    I am using VB6 and 2004B. Help urgently needed. Thanks.

    Hi CK,
    That window is a standard message box and if I'm not mistaken the form type is 0 (zero), but this means that all messsage boxes are form type 0 and you have to build something very intelligent in there if you cannot solve the problem in another way.
    Hope it helps,
    Adele

  • IFrame eventing help

    Valery,
    Thanks for your help with IFrame. This message is in continution to the message Web Dynpro Java
    I opened seperate thread as the clarification required is different.
    Now the clock is running okay. However, I need to capture the time that is displayed when a user clicks button. Any code in WD, is getting server time which most of the time varies from the client side desktop.
    Is there any way I can code where I get the latest time from the client side desktop and pass this information back to the R/3.
    I know the portal eventing to get the time from IFrame is limited. It does not really matter if I read the time from IFrame or not. I think if I can get the client side time within the action of button click is okay.
    If you need more details, please do let me know.
    Thanks and Regards,
    Raju

    Raju,
    There is no way to pass any parameters to WD application except for portal eventing and start-up URL parameters.
    So it is impossible "to capture the time that is displayed when a user clicks button"
    But all you have to know is time shift in hours at application startup time. For this, create redirect HTML page that will get user time via JavaScript, append time as URL parameter to WD application URL and call
    window.navigate(<wd-app-url-with-param>);
    WD application may get this parameter and calculate time shift between user and server time. Calculate up to hours precision (time zones has only offset by hours). Store this shift value somewhere in component controller attributes.
    Now when you receive IWDButton.onAction event just add / remove shift from server time and pass this value to backend.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Capture Event

    Hi All,
    I am using class cl_gui_picture class inorder to display a picture on my screen. I am handling an event of Picture_Click. Following is the code for the same.
    CLASS c_reaction DEFINITION.
      PUBLIC SECTION.
        METHODS h1 FOR EVENT picture_click OF cl_gui_picture.
    ENDCLASS.                    "c_reaction DEFINITION
    Now when the picture is clicked, i want to import the parameters ( Coordinates of the mouse clicked ) from the method DISPATCH of CL_GUI_PICTURE.
    So i implemented the above class as below.
    CLass Implementations
    CLASS c_reaction IMPLEMENTATION.
      METHOD h1.
    HOW TO IMPORT the coordinates ??
      ENDMETHOD.                    "h1
    ENDCLASS.                    "c_reaction IMPLEMENTATION
    The method is exporting the parameters as follows :
    WHEN EVENTID_PICTURE_CLICK.                       
      RAISE EVENT PICTURE_CLICK                       
                  exporting mouse_pos_x = mouse_pos_x 
                            mouse_pos_y = mouse_pos_y.
    I am able to capture the event of picture click but along with it i want to capture the mouse coordinates which the event is exporting.
    Please help.
    Thanks,
    Best regards,
    Prashant

    CLASS c_reaction DEFINITION
    METHOD handle_picture_click
    for event PICTURE_CLICK OF CL_GUI_PICTURE
    IMPORTING  MOUSE_POS_X
        MOUSE_POS_Y .
    ENDMETHOD.
    ENDCLASS. "c_reaction IMPLEMENTATION
    CLASS c_reaction IMPLEMENTATION.
    METHOD handle_picture_click.
    ENDMETHOD
    HOW TO IMPORT the coordinates ??
    ENDMETHOD. "h1
    ENDCLASS. "c_reaction IMPLEMENTATION

  • Capturing events form wide !

    Ok , I'm not new to Java or Swing , be I actually can't figure out how to this :
    I have a GUI bean (JPanel) it has some buttons and a table, all I want to do is when the user click (focus) on the panel I show / hide some stuff.
    The problems is the other controls that in the way and my panel never received any focus event whatsoever , because most of them get capture by the JTable . I'm actually looking for "event bubbling"
    I hope this is simple . Any help ? ideas ?
    Edited by: nnaass on Apr 10, 2010 1:50 AM

    The problems is the other controls that in the wayWell thats the way it should work. If you click on a table, then a cell in the table should become selected.
    If you want to have special show/hide logic then you should have a button for showing/hiding. The user should not have to guess that clicking of a table will cause the panel to show/hide.
    You need a better design of the GUI.

  • Capturing events from UIImagePickerController

    I'm wondering if anybody knows of a way of capturing the event that the user has taken a picture with the camera.
    I'm able to be notified when the user has canceled or confirmed (through didCancel and didFinishPickingImage), but I'm interested in the stage in between, where there user has taken the picture, but hasn't yet confirmed it.
    It's not even clear to me whether or not this is possible. Any help would be greatly appreciated.
    Cheers.

    Yeah, I noticed that. It seems possible, however, as Phanfare's app does stuff once the picture has been taken, and before it is confirmed.

  • Video Capture Problems HELP!

    Ok i just bought a MSI GeForce4 Ti4200-VTD8X, Wich got Tv_Out + Video_in
    With the card i got a Tv_out/Video_in connecter to plug in the card, now the problem seems to come, i plug my S-video cable behind my Tv_out/Video_in connecter (wich of course is connectet to my graphics adapter) and the other end of the S-video cable into a SCART Adapter wich i plug into the scart output on my VCR, but when i start any video capture software, it just says no device connectet plz HELP me!  :(

    Never mind, got it working all by myself now

Maybe you are looking for

  • IPad 2 brand new camera doesn't "open"

    Hi everyone Just bought my iPad 2 today and what a surprise, the camera doesn't work Front camera it's ok. The problem is with the one in the back. It doesn't open. I've done a little research on the web and I can see this is a very common problem. ¿

  • Need help with completion and debugging...please

    import java.io.*; public class DeleteSpaces3      public static void main (String[] args)           FileReader inputFile = new File("Omerta.txt");           FileReader outputFile = new File("omertaEdited.txt");           FileReader in = new FileReade

  • I keep getting this message: "Before viewing PDF documents in this browser you must launch Adobe Rea

    I keep getting this message after the download: "Before viewing PDF documents in this browser you must launch Adobe Reader and accept the End User License Agreement, then Quit and relaunch the browser." I am not getting anything about accepting the E

  • I was scammed by a Verizon representitive into another 2yrs.

    My name is Larry Torres Sr. One year ago I signed up for Verizon Fios. I have my TV, Internet, home phone, and cell phone all in one package. In order to seal the deal they offered one year of certain movie channels for a great price and told us afte

  • Cross Company Code Reconcilation Account

    Hi Here are four company codes. Our MM guy upload stock in Company Code 1000 thru mvt 561. There are two FI document generated. a) Stock  Dr        Initial Stock upload Cr b) Initial Stock DR         ClearingCo.Code 1000 / 2000 CR Why this entery gen