Interacting with sine graph

HI all Im new to java and was wondering if anyone could help me with this problem.
Im trying to draw a sine wave that also allows me to click on aont point withing the graph and mark it with a dot or cross of some kind and in a text box display the coordinates of that position. Can anyone help me on what i need and how it can be done please.
Thank you very much

hi, here is one way you can get this to work...
I'm assuming that you'ore drawing the sine points as some sort of Shape object. In that case all you need is to add a MouseMotionListener to your Container (probably a JPanel) where you draw your graph. Shape objects have a contains() method which will tell you if a point (i.e. the cords of the mouse pointer) are within the shape or not. So, in you motion listener, you just need to compare the cords of the pointer with the cords of all the Shapes that you drew. If there is a match, then use some Popup element to display the data values for that point on your graph.
There are more complicated (and faster) ways of doing this, but this should give you a good start.
If you trying to draw an image (graph) then look at the java2d tutorials which show you how to draw shapes and lines.

Similar Messages

  • User interaction with Waveform Graph

    My application uses a Waveform Graph to plot data acquired from a
    scope. The application does some analysis of the waveform data
    and then uses features within the waveform as the basis for
    controlling some external devices. The features (peaks) that
    are to be used must be selected by a human operator. Ideally,
    this would be done by having the user click on/near the peaks
    of interest.
    I haven't seen anything in Labview that looks like I can trap
    mouse clicks within a screen widget. Have I missed that level
    of functionality, or is there no feasible way of implementing
    such an interface?
    I am presently using a system of tables and sliders to allow
    the users to select peaks, but the users are not totally happy
    with the method.
    I
    am using Labview 5.1 on Sun Solaris.
    Thanks.
    --- Rod

    One approach would be to enable graph cursors and have the user click and
    drag the cursor to the peak of interest. Cursors can also be set to lock to
    the graph data You could also add another graph trace which only contains
    peak points and then the cursor will only land on a actual peak point.
    Mike Sachs
    Intelligent Systems
    "Rod B. Nussbaumer" wrote in message
    news:afal8d$37q$[email protected]..
    > My application uses a Waveform Graph to plot data acquired from a
    > scope. The application does some analysis of the waveform data
    > and then uses features within the waveform as the basis for
    > controlling some external devices. The features (peaks) that
    > are to be used must be selected by a human operator. Ideally,
    > this would be d
    one by having the user click on/near the peaks
    > of interest.
    >
    > I haven't seen anything in Labview that looks like I can trap
    > mouse clicks within a screen widget. Have I missed that level
    > of functionality, or is there no feasible way of implementing
    > such an interface?
    >
    > I am presently using a system of tables and sliders to allow
    > the users to select peaks, but the users are not totally happy
    > with the method.
    >
    > I am using Labview 5.1 on Sun Solaris.
    >
    > Thanks.
    >
    > --- Rod
    >
    >

  • HT4907 I am able to connect to my Mac Mini on Back to My Mac through iCloud but the keyboard/trackpad on the MBAir or MBP with which I access does not register on the Mini.  So I can see the screen but cannot interact with it. Mini works accessing MBP/Air

    I am able to connect to my Mac Mini on Back to My Mac through iCloud but the keyboard/trackpad on the MBAir or MBP with which I access does not register on the Mini.  So I can see the screen but cannot interact with it. Mini works accessing MBP/Air and I can use Mini to input data or interact with screens of those computers.

    Regarding your first question about bookmarks, I think you discovered the answer in when you pressed the address bar. The second tab there has your bookmarks.
    As for the keyboard, I'm not sure why your Firefox is reacting so slowly; mine seems to show keyboards even when I don't want them. If you have accumulated a lot of history, perhaps that's an issue?
    Did you use any third party software to move your Firefox data from internal memory to the storage card?

  • I am having much trouble with the new reminders in IOS7 and how it interacts with Outlook Exchange. Many features lost in the new version.

    When I downloaded IOS7, I found that the reminders/task app and how it interacts with Outlook Exchange is much more difficult to use. Some of the issues that I am having are...
    1. Trying to edit my task on my phone is not possible, if the notes are lengthy. When you click on the text to edit data near the top, it will scroll to the bottom and not allow you to edit the text because you cant see it.
    2. Now all of my task are in one long list. I can not move from day to day like we could in previous version IOS6
    3. When I do edit a short task reminder and click done, it crashes and completly goes away. It does save the edit though
    4. You can only add task at the bottom of each days reminders. This is very inconvient and much more difficult than IOS6
    5. There is a major delay or latency when interacting inside of reminders in this version. Much more than IOS6. It is very unstable and quirky.
    I have never seen Apple take a step back with a product until now. I am a huge Apple fan and always will be, so I am hoping they make enhancements to fix these issue. It is a big time prodcutivity killer.
    Thanks for any and all help you can give.
    Troy Meachum

    Some power supplies or designed so that if there is a short or overload they shut them selfs off and some will not turn back on. Some have a relay that will click back on and work, some you have to  cycle the power switch. Those that won't come back on will have to be replaced. I'm not saying that yours is that type as I have no way of telling. But if you have a friend who will loan you a good power supply you might try it. As someone else said just turning off the power will not darn all the power from some motherboards. To test this turn off your power supply than turn on the computer with the start botton. Mine will flash the lights and fans will start to spin than die. So every time you turn off computer to work on it. After turning off PSU hit the start botton to drian any power left in it before working on it. Also do this after unplugging it just to make sure.

  • Display and interact with a vi front panel on remote C++ app

    Hello:
    I am new to LV and need a little advice.  I need to display a LabVIEW VI front panel in my C++ .Net application that users can interact with to view real-time spectrum data.  The C++ app (client) must reside on a separate computer(s) from the VI so that the client can connect from anywhere around the world and interact with the VI. 
    I am not sure about the basic architecture that should accompany a good solution.  We want to use TCP/IP but not DataSocket.  I do not have access to Measurement Studio but I do have access to LabVIEW Professional Development System v 8.2.  Can anyone provide suggestions on what I need to do in order to
    1.  Connect to my TCP server using my C++ client app - I have already written TCP client and server code which communicate but now I need to integrate LV
    2.  Get access to the VI sitting on that server
    3.  Send the VI front panel to the client for display
    4.  Allow the user to modify parameters on the front panel displayed on the C++ client, send those changes back to the server, and refresh the front panel displayed in the C++ client given the new parameters (I would like a real-time display of the spectrum to always be available)
    Is this possible?  Has anyone done this using C++ .NET in VS2005?  Are there examples I can mimic or references that will help direct me?  I have searched and searched through NI's help and found a lot of good stuff but I'm still feeling confused about the best way to utilize LV.
    Thank you in advance!

    One more question ... what if I could use Measurement Studio?  The documentation seems to indicate that it's easy to create network applications and therefore it would be easy for me to re-create our VI's front panel using Measurement Studio components in my C++ app and then simply connect those components to the networked hardware (TCP/IP or DataSocket) that could be located anywhere in the world.
    Depending on what components you are using in your LabVIEW panel, it is probably pretty easy to build a Measurment Studio application to look like a LV panel.
    Given that, you could use network shared variables to move data across the network, no TCP programming necessary -- I think that this is pretty easy to do, but I don't know the specifics about variable programming in that environment.  Also, you will probably need to add some smarts to the server side to make sure that it is reading to and writing from variables in an appropriate manner.
    Question: why can't you just use LabVIEW for the client application also?

  • I have a G5 which I intend to keep.  Now that I have updated my iphone 4s to iOS 7.0.  I cannot add music to my iphone or upload photos to iphoto.  I have the last itunes 10.6.3. which was supported by apple.  itunes will not interact with my iphone on an

    I have a G5 which I intend to keep.
    Now that I have updated my iphone 4s to iOS 7.0.
    I cannot add music to my iphone or upload photos to iphoto.
    I have the last itunes 10.6.3. which was supported by apple.
    itunes will not interact with my iphone on any level.
    Apple made all the equipment I use.
    Bentley and Ferrari etc do not stop making parts for their cars?
    The least Apple could is.
    A. Update itunes to run on a G5
    Regarding iOS 7.0 you have totally lost the plot.
    We buy apple why?
    Quality.
    Intuitive interface.
    Stable software.
    Design.
    All that Steve Jobs consider sacrosanct.
    Quality is about ongoing support longevity of product.
    Its not about trying to sell to every person on the planet, others are way ahead of you.
    So try respective the customers you have, it wont be long before theirs a better operating system and your lead in hardware is marginal. 
    Regards
    Glyn Evans
    My post on facebook this morning.
    If you have an iPhone or iPad do not update to ISO 7 unless you want an operating system that looks like windows 8. The graphics looks like it was designed by a artistically challenged mongoose and the operating system is not intuitive something apple users expect. Overly complicated ugly and generally change for the sake of apples paranoia since the death of Steve Jobs.

    You need to update iTunes to 11.1 on your PC

  • My firefox is not responding, i get a message (firefox is not interacting with windows) I have tried cleaning up cookies, catch etc nothing works. i have unenstalled and reenstalled, as soon as i type a letter firefox wont respond. Help.

    As soon as i type a letter in fire fox it stops working, i get (FIRE FOX IS NOT RESPONDING, WINDOWS IS NOT INTERACTING WITH FIREFOX) I have tried all i can and now give up. Ive cleared all cookies and catch, etc i have gone in to help and tried out instructions for the not responding but no luck. I have windows 7 and have not had problems in the past with firefox. I have uninstalled and reinstalled still no luck.

    go to '''TOOLS '''then '''OPTIONS''' then '''ADVANCED''' then '''NETWORK tab''' then '''SETTINGS tab''' and select the options '''NO PROXY''' click '''OK''' and '''OK '''again in the next screen. With that you have disabled the proxy settings.
    ''if you like to not disable the proxy settings choose'' : '''Auto-detect proxy settings for this network''' (it is in the same session)
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • My safari is dark and I cannot interact with it. How can I get it to light up and be interactive?

    I was using safari to open multiple pages and now it is dark . Pages come up but I cannot interact with it . Help!

    I rebooted according to directions in another post . Thank you it is working now

  • Firefox has trouble initiating, and when it finally does, every time I attempt to interact with the application it stops responding.

    Firefox won’t initialize: I can open any program on my computer except for Firefox so it isn't that my computer is slow. It doesn't open at all no matter how long I wait. I've left the room and let the computer run before and it still wasn’t running when I came back. After a few clicks it finally it comes up, and I have to wait because I’ve clicked multiple times so of course it's going to open multiple times. When I'm online after successfully closing all but one Firefox window so that I don't crash my poor laptop, every time I attempt to interact with the program via clicking a link, opening a new tab, or typing something into the URL bar, the program freezes and goes into the not responding stage. Rarely, an unresponsive script message will pop up.

    See:
    * http://kb.mozillazine.org/Preferences_not_saved
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Cannot click or interact with a certain part of my screen in most apps

    This is a weird one that's stumping me. Since probably Tuesday or Wednesday, I've had trouble clicking on certain portions of the screen on my MacBook. I noticed it first in Safari, and I thought that it was just a Safari problem, but now I realize it applies to the whole OS.
    When I am in an app, I cannot click on anything or scroll when my mouse is on a certain portion of the screen. The weirdest part to me is that this portion of the screen is standard for every app. It's probably about the middle 50 or 60 percent of my screen in the lower third portion. Imagine cutting my MacBook screen into a Tic-Tac-Toe board... the lower middle box is where I'm having trouble.
    This seems to apply to most apps, but for example in iTunes I can still click on items in this portion of the screen but only about every third click will it be responsive. With Safari and Finder and most other apps, I get nothing at all. It's not my mouse itself because it does the same thing if I'm using my Mighty Mouse or my Logitech mouse or just my trackpad. Also, if I navigate using the keyboard, I can interact with that portion of the screen just fine.
    I can't recall installing or removing or changing anything significant within the past week that could have caused this, though it's entirely possible. I'm pretty good with my Mac on most things, but as I said, this one is stumping me and I can't find any similar issues by searching.
    Thanks in advance for any help.

    Got the exact same problem aswell, finally fed up with it now as i just started up firefox and 14 new windows opened because of this bug, luckily my computer can handle them but someone with a slower processor it would have been a nightmare, needs fixing ASAP.
    Reverting back to 3.6.3 until this issue is solved. (link for anyone wanting to do the same below)
    http://www.filehippo.com/download_firefox/7345/

  • How do I create an app to interact with my Web ? like skype or msn ?

    I need to create a downloadable interface like Skype or Msn which will interact with my website that is created on PHP and MySQL...
    What will be the best practices for this ? thanks in advance...

    You might take a look at Adobe's AIR platform which can use HTML, JavaScript, and Flash to develop applications that work on the desktop like a regular app but can also connect/interact with a web service. But that question is more in line with the Dreamweaver Application Development forum.

  • How to convert an array collection instance to a complex object for interaction with webservice

    Hi there,
    I have a stubborn problem that I am trying to work out the best way to solve the problem.  I am interacting with a WebService via HTTPService calling a method called find(String name) and this returns me a List of ComplexObjects that contain general string and int params and also lists of other Complex Objects.  Now using the code:
    ArrayCollection newOriginalResultsArray = new ArrayCollection(event.result as Array)
    flex converts my complex objects results to an arraycollection so that I can use it in datagrids etc.  Now up until this part is all good.  My problem is when getting a single instance from the results list, updating it by moving data around in a new datagrid for example - I want to interact with the webservice again to do an create/update.  This is where I am having problems - because these webservice methods require the complex object as a parameter - I am struggling to understand how I can convert the array collection instance back to my complex object without iterating over it and casting it back (maybe this is the only way - but I am hoping not).
    I am hoping that there is a simple solution that I am missing and that there is some smart cookie out there that could provide me with an answer - or at least somewhere to start looking. I guess if I have no other alternative - maybe I need to get the people who built the service to change it to accept an array - and let them do the conversion.
    Any help would be greatly appreciated.
    Bert

    Hi Bert,
    According to my knowledge you can use describeType(Object) method which will return an XML... That XML will contain Properties and values just iterate through the XML and create a new Object..   Probably u can use this method...
    public function getObject(reqObj:Object,obj:Object,instanceName:String,name:String=null,index:int=-1):Obj ect
                if(!reqObj)
                    reqObj = new Object();
                var classInfo:XML = describeType(obj);
                var className:String = instanceName;
                if(name!=null)
                    className=name+"."+className;
                if(index!=-1)
                    className=className+"["+index+"]";
                for each (var v:XML in classInfo..accessor)
                    var attributeName:String=v.@name;
                    var value:* = obj[attributeName]
                    var type:String = v.@type;
                    if(!value)
                        reqObj[className+"."+attributeName] = value; 
                    else if(type == "mx.collections::ArrayCollection")
                        for(var i:int=0;i<value.length;i++)
                            var temp:Object=value.getItemAt(i);
                            getReqObject(reqObj,temp,attributeName,className,i);
                    else if(type == "String" || type == "Number" || type == "int" || type == "Boolean")
                        reqObj[ className+"."+attributeName] = value; 
                    else if (type == "Object")
                        for (var p:String in value)
                            reqObj[ className+"."+attributeName+"."+p] = value[p];
                    else
                        getReqObject(reqObj,value,attributeName,className);
                return reqObj;
    Thanks,
    Pradeep

  • HT5706 I have not used my apple tv in a few years, and just got it out of the bag. I connected it up, and it cannot set date, time.  it also does not interact with the remote.  Could it be as simple as a new batter is needed for remote?

    I have not used my Apple TV in a few years, and just got it out of the bag to use on a new TV.  I connected it up to power and with an HDMI cable toTV.  It attempts to set date and time and cannot.  I cannot get the remote to interact with the box also.  Could it be something as simple as needing a new battery?

    Hi kybriar,
    Thanks for using Apple Support Communities.  This article has steps you can take to troubleshoot the remote itself:
    Troubleshooting the Apple Remote
    http://support.apple.com/kb/ht1722
    For the issue of setting the date and time, these articles may help:
    Apple TV: Basic troubleshooting
    http://support.apple.com/kb/ht1551
    Reset Apple TV by unplugging it from the power outlet, waiting about five seconds, then plugging it in again.
    Power off your TV, wait five seconds, then power it back on.
    Apple TV (2nd and 3rd generation): Troubleshooting Wi-Fi networks and connectionshttp://support.apple.com/kb/TS4546
    Ensure that Apple TV is within range of your Wi-Fi router or base station.
    Confirm that your Wi-Fi router and cable/DSL modem are connected to power and turned on.
    Make sure other devices (computers, iPhone, iPad, for example) are able to connect to the Wi-Fi network and access the Internet.
    Check your Wi-Fi network settings on Apple TV:
    Select Settings > General > Network > Wi-Fi and press the center button on the remote to display nearby networks.
    Choose your Wi-Fi network from the list.
    If your Wi-Fi network uses a password, make sure you are entering it correctly.
    Restart your Apple TV by selecting Settings > General > Restart.
    Try restarting your Wi-Fi router or modem by turning it off and then on again.
    If possible, connect an Ethernet cable and verify your Internet connection. If you can connect to the Internet using an Ethernet connection, verify that your Apple TV is using the latest software by selecting Settings > General > Software Update. If your Apple TV can be updated, install the update and then try the steps again.
    Cheers,
    - Ari

  • Outlook 2010 Contact Card (View more options to interact with this person)

    When I double click on a contact, and hover over their email address to "View more ways to interact with this person" - the box shows nothing. This is consistent with all of my contacts, and this is happening to every user at our site - I think
    it might be GPO related?
    Thanks for the help!
    -Jerad

    Hi Jerad,
    I'm not sure if this issue is related to GPO, please try to open Outlook in safe mode to check if the problem is related to third-party add-in. To do this, press Windows key + R to open the Run box, type
    outlook.exe /safe and press Enter.
    If problem persists in Outlook safe mode, we can try to run a repair of your Office installation to check if it helps:
    http://office.microsoft.com/en-us/project-help/repair-office-programs-HA010357402.aspx
    Please let me know the result.
    Best Regards,
    Steve Fan
    TechNet Community Support

  • Only using Quick Edit to interact with a list/view in Sharepoint 2013

    Hello All,
    I would like users to only interact with a view in Quick Edit mode as it has all the functions I need (Edit,add and delete) without having to open Web Forms. Is there a way to hide the "New Item" link on all current and future views for a list?  
    Thanks
    MM

    Lobo,
    If you want to hide "+ New Item" which come as web part top left corner, then edit web part
    Select "Data Sheet view" as default view from "Selected view" drop down of "edit web part property"
    - "Data Sheet view" as web part don't show " + New Item" link.
    If that list is display as web part in any of the page not as data sheet view as default then below steps will help.
    Make "Toolbar type" as No toolbar just below selected view
    Change view style to default to "Basic table" from "Edit the current view" of "edit web part property"
    If you want to remove "new item" from file tab of ribbon, then permission need to be removed as contributor to read only. 
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for

  • How can I use PowerPivot tables like Excel tables -- printing, etc.?

    I can't seem to find any information on this anywhere, and even more surprisingly, no one else seems to have even asked this question... How can I use tables I create in the Excel PowerPivot window in the same ways I use tables that are in ordinary E

  • Windows 8 Product key back

    Hi I bought few years ago HP p6 2490eo desktop pc. It had Windows 8 preinstalled, but on box it didnt have any cd for windows 8 key. Then i installed WIndows 10, but i thought its stupid so i uninstalled it.  And now i have installed windows 8.1 prev

  • Group membership redirect with AD LDS

    I have my LDS instance synchronized with my AD environment. I am only synchronizing objectClass=user. I am creating userProxyFull objects on the LDS side. Authentication is working as I have tested authenticating with an AD user to LDS. My applicatio

  • Storedge 3310 read error

    I've just installed 5 new Sun 146GB 10K drives in my SE3310, attached to a Sun 280R. The install and LUN setup went fine, format went fine, but I'm getting this error on the console and in /var/adm with some frequency: Sep 10 08:59:12 onestop scsi: [

  • I get an error message when I try to convert a PowerPoint program from PDF to Word.

    I get an error message when I try to convert a PDF Power Point Program to word.  I need to  convert the PPP since I must edit the slides.