"locking" all UI objects but one...

I need my user to "draw" on a graph to get some information.
Ie, the user presses a button, then the graph goes into "drawing mode" and the user draws a line and I save this information.
The problem is, its going not going to be very obvious what to do. I thought it would be good to have the graph pop into a dialog box, but that would be a real pain because its pretty embedded into the frame... I was wondering if there would be some way to "lock" UI elements in a frame (much like when you open a dialog) but leave one "unlocked"
That way I can draw a bright border round the graph and lock everything untill the user draws on it. Otherwise they might just not touch the graph untill later and really not expect it to start drawing lines etc...
If anyone has a better idea than "locking" the rest of the objects I would be happy to take suggestions...
Thanks!
Edit - I'm really not sure how to approach this even if I didn't lock the UI.
I call a method in the graph (see below). For the behavior I want I would have to somehow wait for the user to finish adding the mouse events before returning?
public int[] getDragInformation()
          //here I need to wait for the user to trigger mouse events on teh graph
          return coordinates;
     }Would just having some kind of flag for when the mouse events were input work? Would I have to have a loop like this:
     public double[] getDragInformation()
          startGettingDragInformation();
          while (gettingDragInformation)
               try
                    Thread.sleep(100);
               } catch (InterruptedException e)
                    // TODO Auto-generated catch block
                    e.printStackTrace();
          return dragInformation;
     }Edited by: hanvyj on 25-Mar-2011 03:59

I'm trying to do the wait think in my first post but the events dont trigger, they just stack up and happen when the loop/wait ends. Is there any way to give them a chance while its waiting?
I have improved it to use wait and notify. stopGettingDragInformation is called in the mouseListener, which should be running off the event dispatch thread. My conclusion is that waitingDragThread is running off the EDT, which makes sense because it happens after a button press, but I'm unsure how to not run it off the EDT...
public int[] getDragInformation()
          startGettingDragInformation();
          waitingDragThread = Thread.currentThread();
          try
               synchronized(waitingDragThread)
                    waitingDragThread.wait();
          } catch (InterruptedException e)
               // TODO Auto-generated catch block
               e.printStackTrace();
          return dragInformation;
        private void stopGettingDragInformation()
          gettingDragInformation = false;
          synchronized(waitingDragThread)
               waitingDragThread.notify();
annotherEdit Well, that chucks my theory out of the window, you get a "Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread" if you run it from the EDT so i can't be...
Edited by: hanvyj on 25-Mar-2011 05:09
Edited by: hanvyj on 25-Mar-2011 05:16

Similar Messages

  • Listing all Ogranisation Objects under one org model

    Hi
    I would like to create a list of organization(s) created under one org model.  I had searched for Organization model related tables , I could get all organization objects in table HRP1000 , but here I am having Ogr Objects other then my Organization Model as well.
    What I am looking for
    For Example : If I am having following ORG structure
    ORG Root
         ORG Region 1
         ORG Region 2
              Position 1
         ORG Region 3
              Org Region 3.1
                   Position 1
    My objective is to find a way (Table/ Report program ) to create a list of all O Org objects under ORG Root

    Olaf, JJordheim,
    Thank you for quick response. Some users will have Content Manager and possibly System Administrator, User roles.  I was wanting to know if there is a method we can prevent  these Super users from  making changes by setting
    some folder parameter value. 
    Are you stating I should remove the Content Manager and Publisher for the Super users?
    Thanks
    Joe

  • How can i access all the objects of one schema from another schema

    Dear All,
    How can i access all the objects(Tables,Views,Triggers,Procedures,Functions,Packages etc..) and do the modifications of one schema from another schema (Without using synonyms concept).
    Thanks in advance,
    Mahi

    First of all, synonyms only help you easy reference the object. It doesn't have any implication of object privilege.
    As long as you have proper privilege on target object. You can access it with or without synonyms.
    Assuming you have proper privilege of objects, you can use following command to assume schema owner.
    ALTER SESSION SET CURRENT_SCHEMA = Schema_owner

  • I want to copy all the objects from one user to another... Please help

    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    Please Explain me in detailed way
    Thank you

    SowmyRaj wrote:
    Hii Experts.... I have a problem here. Please give me solution for this...
    I am using Oracle 11g on my windows XP system.
    I created a new user named "some"
    I want to copy all the objects from scott user to some user... Please help me
    If all what you are interested is Scott schema than no need to use the datapump or CTAS. Run demobld.sql in your schema and it would have all the objects of Scott.
    http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html
    HTH
    Aman....

  • Activate all inactive objects at one go....

    Hi Abappers,
               IS there any way or transaction to actiavte al inactive objects at one go...
    Regards,
    mansi.

    hi mansi,
    just rigth click on the transaction name in se80,
    select activate.
    then entire trasaction get activated,
    regards,
    seshu.

  • I purchased an album on iTunes and all songs downloaded, but one song is not associated with my Apple ID (I can't play it).

    I bought an album from iTunes. All of the songs play except one. When I double click on it, a message comes up saying this computer is not authorized to play it, asking me if I want to authorize the computer. Yet when I log in with my ID, the response is that the computer is already authorized.  Then it skips to the next song. I have updated iTunes through software update and am using 11.0.4 (4). I have tried to reboot the computer but the situation stays the same.
    I also deleted the file from iTunes to try re-downloading it. The song appears in my list of purchased songs, but when I try to download it again, I get an error message that says "This computer is already associated with an Apple ID. If you download past purchases with your Apple ID, you cannot auto download or download past purchases with a different Apple ID for 90 days." My options at this point are a "Transfer" button or a "Cancel" button. Transfer what? What is it talking about?? I purchased and downloaded the complete album at once, obviously with the same Apple ID---the ONLY Apple ID I have ever had and the ONLY Apple ID ever used on this computer! How is one song mysteriously associated with a different account? What is the point of purchasing music legally if it doesn't work? Can anyone help me get this song to play in iTunes? The other strange thing is that it plays just fine in finder.
    Any suggestions would be appreciated!

    If only one track on the album is throwing that message, that suggests the track is damaged.
    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copy of the track and try redownloading a fresh one. See the following document for instructions:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • Why do all my photos (but one!) not take up the entire touch screen?

    I've been trying to figure this out for some time with no luck.
    I have a very nice DSLR camera but I tend to use all the preset buttons. My photos always show up as a "square" shape when using things like the Apple TV photo display and on the ipod touch.
    Recently we spent 3 weeks at the beach and I changed no settings on the camera during that trip. One photo out of almost 400 taken is more "rectangular" such that when I flip my ipod touch, this photo will change and take up the entire screen with no black edges. All of the other photos have blank edges/square shape.
    My old cheap Kodak digital camera takes up the entire screen with all photos on the touch and the ATV. A friend shot some photos and his takes up the entire screen as well. Mine are always square, except for this odd one.
    When I "get info" in iphoto, a sample of about 10 photos from this bunch from the beach show size 2032 x 1354, if that matters.
    Any info?
    Thanks.
    More info: Looking through the photos, I noticed there was a change in the settings during the trip as there is a point where all the photos take up the entire screen. I don't know how to check the settings that were in place but the difference is:
    Square shape: size: 3200 x 2400, and about 1.1 MB per photo.
    Rectangular shape: size 2032 x 1354 at about 446 KB per photo.
    I'm a novice at the particulars behind the photos but I'd like a good quality picture that isn't square but rather takes up the entire screen.
    Message was edited by: Clayton Rhoades

    David,
    Thanks for the note. I looked up online and you are correct...the aspect ratio for my camera is indeed 4:3. I see in my camera settings where I can change the size of the photos but I've played around with that stuff and seen no difference in the aspect ratio.
    I guess I'm stuck with what I've got?
    I tried converting some of them with iphoto to a different aspect ratio and I don't think that's possible either.
    Thx.

  • All artists missing but one when leaving coverflow view

    I think this is a bug, but I wanted to see if anyone else sees this behavior as desireable.
    I start by viewing artists in the "list" mode (ipod held vertically). Then I switch to coverflow by rotating the ipod. Next I select an album and then a track. Now, occasionally if I navigate back to the artist list view, the only artist listed is the one for the album I had selected in coverflow.
    The only way I've found to get the entire list back is to go into the "songs" list and then switch back to artist.
    Is this behavior by design?

    Well, LION 10.7.1 is here....informing us the "Missing plug-in" issue is fixed....
    And its NOT...  no change at all.
    Not sure what kind of UAT testing they conduct....but its obviously not that extensive...
    And no options to re-install LION Safari yourself....
    So we all have to just hope someone at Apple....does something...as this is embarrassing as we cant even watch there own promo movies on there own web site...on their own software..   FAIL!

  • I'm using the same font in all my pages but one particular page is blurring and substituting other text.

    I'm using Handwriting-Dakota font, which I found out is quite temperamental. I did what someone on here suggested and went to Preferences>Show text imaging indicator. and that fixed all my problems. Now I added a page and the text is all messed up, blurred and stretched sometimes and other times substitutes other text on the page for that box.
    I haven't done anything different on this page and even deleted it and started over again but now it's worse than before. This is the only page that is doing this so I'm not sure what to do.
    The messed up page is the media page at http://www.intimateopera.org/intimate_opera/Media.html
    The main page is http://www.intimateopera.org/intimate_opera/Intimate_Opera.html and from there, once you click the picture all the other pages are fine.
    Does anyone know what I can do?

    Do a Command A on the page to make sure that the text images and the other images are not overlapping or touching.
    You do realize that by turning all your text into images the search engines will see your website as having virtualy zero content with nothing for them to index?
    Try to use web safe fonts for the descriptive text and save the images for special occasions like one heading per page or the header.

  • All the table objects in one transport request..?

    Hi Friends,
    I do have more than 10 tables and each table is having more than 30 fields.
    All these Tables, Data elements and Domains are created by me.... means name start with 'Z'.
    My task is i need to save all these objects in one transport request number.
    How can I do that...?
    All the eariler transports are released to higher system....
    As of my knowledge, going to each table & data element and domain... changing some text and then it will ask for new requestr and saving....
    Can i do that in a single step for table and its fields (DEs Domains).
    Thanks,
    Naveen.I

    Hello Naveen,
    In SE03 transaction ,execute the merge object list. ( if u are not authorized to SE03. Goto SE10 transaction and click the transport organizer tool in the tool bar (shift+F6))
    Input all the transport request  you want to merge and select the release check button ( as you says that your transport requests are already released ). and the execute and click the merger button in the top left corner. it will be asking new transport request. Create a new workbench request. finally  you will be getting the popup message. select any option as ur convenient ( either online or background). then all the development you have done in different transport request will merge into one TR.
    Hopes this will helps
    Regards
    Laxman

  • How to lock all else?

    Hi
    Many moons ago -- back in Illustrator 6 -- you used to be able to lock everything *except* your current selection with a simple command (I believe it used to be opt-command-2). Very useful.
    Now i'm using Illustrator CS5, and I can't find this command anymore. I see you can achieve this result as a two-step process (select inverse, lock). But I wonder if the one-step operation still exists somewhere. The 'lock' command has some options ('other layers' 'all artwork above'). But it doesn't seem to have an 'lock all other objects' option.
    Am I missing something? Tried searching archive, perhaps I am feeble, but i didn't find the answer thus far, perhaps someone could toss me a clue.
    kurt

    "Shift-Option-Cmd-2" to lock all but selected artwork.
    "Option-Cmd-2" to unlock all artwork.
    "Shift-Option-Cmd-3" to hide all but selected artwork.
    "Option-Cmd-3" to un-hide all artwork.
    Thankfully it's still around. Don't know why they aren't in the pull-down menus. Of course I don't look at the menus very often anyway.

  • How to give select prvileges on objects in ONE schema only.

    hi.. i wanna to do gve a select on tables only privilege to all objects in one schema only,
    is there any single command that enable me to do so ?
    or do i have to allocate priviledge to each and every schema objects available ?

    I think there is no command that will give permission on all the objects in one go.
    but u can do it in some tricky way.
    some thing like this
    spool permission.sql
    SELECT 'grant select on '||TABLE_NAME|| ' to abc; ' FROM USER_TABLES
    spool off
    change the abc user with the real schema name
    then run the permission.sql file connected with the user containing the tables.
    first try this on some test db and check if it works
    regards
    Ansh

  • Thread waiting to lock on an object that it has already locked

    I have a thread in my thread dump where it is "waiting to lock" on an object, but it already has acquired the lock. How can this be possible?
    "TP-Processor778" daemon prio=1 tid=0x230dde38 nid=0x1168 waiting for monitor entry [0x0f184000..0x0f185fa0]
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:63)
    - waiting to lock <0x40fbf128> (a sun.net.www.protocol.file.Handler)
    at sun.net.www.protocol.file.Handler.openConnection(Handler.java:55)
    - locked <0x40fbf128> (a sun.net.www.protocol.file.Handler)
    at java.net.URL.openConnection(URL.java:943)
    at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

    If object.wait() is called, an existing lock is released so another thead can lock the object.
    If you object.notify() but hold the lock in another thread, the first thread will not resume until it has required the lock.

  • Script to copy all the objects within a Stored Procedure

    I am trying to copy all the objects from one database to another using Scripts. Now I need to put that script inside a Stored Procedure.
    Thanks.

    Refer this vbscript to generate all object scripts programatically,
    http://www.codeproject.com/Articles/16195/How-to-Script-Out-SQL-Server-Objects
    or
    Using SSMS
    http://msdn.microsoft.com/en-IN/library/hh245282.aspx#GenPubScriptWiz
    Regards, RSingh

  • New itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari HELP

    new itouch user here, We had a wireless connection with a password all set up but we couldn't remember the password meanwhile there are other connections around us but locked. So i decided to make a new one yet it still will not allow to go on safari after i type in the password PLEASE HELP ive turned on and off etc

    My guess is that the security settings on your router and iPod do not match.
    For a test, change your router so there is no security.  See if you can connect and get to the Internet. If that works, set up the router with security and use the same settings for the iPod.

Maybe you are looking for