At runtime, can it be determined if multiple overlapping objects/layers exist beneath a mouse click?

Hi folks - total nube here. I am trying to find out whether I can determine if multiple objects exist beneath a usr's mouse click coordinates. The objects will be either shaded areas under a LineSeries in a chart or possibly overlayed images representing such areas (not sure which approach would be better). I know that I can probably determine alebraically whether the coordinates selected b a mouse click belong under one series or another or multiple and if this is the best option, then I will proceed with it. But possibly, there is a way for me to determine whether a shaded area under a series or a grpahical element exists under those coordinates. Any hints? Thanks in advance.

Yes, export it for your reference first. make it delete and create new one.
hope it should work fine.
thx
Deep

Similar Messages

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • Multiple Smart Objects into existing photoshop file

    I need to somehow get bridge to---
    Import multiple files into an existing photoshop file (with a predetermined size ) as smart object layers in photoshop.
    The options that Bridge currently offers falls short in 2 area
    Load Files into Photoshop Layers-- does not import smart objects and creates a new photoshop file that ends up being as large as the largest imported file
    Place into Photoshop--only lets you do one at a time
    I need "Place into Photoshop" with multiple files
    Is there a way to do this?
    Thanks!!

    I don't think it is possible, but to be sure drop this question also in the
    PS forum if you already have not done so.
    Is there a way to do this?
    Thanks!!

  • In a DPS Article, can you link to a multiple state object form a web content overlay?

    The reason we ask this is because we use web conntent overlays for our buttons as they are sharp on retina and and have a better touch responce.
    Thanks

    It would be fantastic if buttons could simply render in the correct resolution. One trick that I've been playing with is creating an up and down state for each button. Then when you tap your invisible button you set it to go to the down state.
    It gets hairy when you have multiple buttons on the same page. Say you have (button one) working and you want to click (button two) and reset the first button to it's original state. Do this:
    button two, on tap or release:
    + go to state two (button two)
    + go to state one (button one)
    +then whatever other actions you have linked to your button.
    This is the only way i've found that works. Only problem is that button events have to play through their entire "fade in/out" nonsense one after another (unless you turn them off), so you end up with a glorious lag between button clicks and any actions that you might have tied to it.
    I hope this helps.

  • CAN NOT write text on some webpages like googlemail if use right mouse click, last copied text gets pasted in against my will Macbook pro: OSX 10.6.8 Firefox,

    I would like to use right mouse click for spelling translate but when I click it pastes the last copied text in instead of opening the menu it happens on many webpages.
    thanks for help
    Elkan

    still having same problems.
    is this the only way to get support from firefox? where are the developers that write the code? or someone directly responsible for the product? i don't expect an end user to help but this is ridiculous. the windows version works fine but the mac version doesn't. i'm running both on the same machine so it's not the hardware (running windows as a virtual guest in parallels).

  • Pressing cntrl+left mouse click doesn't select multiple rows.

    Hi,
    I've got this problem after i migrated my form from 6i to 10g.
    In 6i version, cntrl+left mouse click used to work in order to select multiple rows on the screen. But, it's not working in 10g.
    Instead, Shit + left mouse click is working to select multiple rows in 10g.
    Please can someone help me out with this. I want cntrl + left mouse click to work.
    Any help will be appreciated.
    Regards
    Navnit

    Hi Pradeep,
    Thanks for your reply.
    Do you mean fmrweb.res file?
    This is the content of my res file
    9 : 0 : "Tab" : 1 : "Next Field"
    9 : 1 : "Shift+Tab" : 2 : "Previous Field"
    116 : 0 : "F5" : 3 : "Clear Field"
    38 : 0 : "Up" : 6 : "Up"
    40 : 0 : "Down" : 7 : "Down"
    33 : 0 : "PageUp" : 12 : "Scroll Up"
    34 : 0 : "PageDown" : 13 : "Scroll Down"
    69 : 2 : "Ctrl+E" : 22 : "Edit"
    10 : 0 : "Return" : 27 : "Return"
    76 : 2 : "Ctrl+L" : 29 : "List of Values"
    115 : 0 : "F4" : 32 : "Exit"
    75 : 2 : "Ctrl+K" : 35 : "Show Keys"
    83 : 2 : "Ctrl+S" : 36 : "Commit"
    118 : 1 : "Shift+F7" : 61 : "Next Primary Key"
    117 : 0 : "F6" : 62 : "Clear Record"
    38 : 2 : "Ctrl+Up" : 63 : "Delete Record"
    117 : 1 : "Shift+F6" : 64 : "Duplicate Record"
    40 : 2 : "Ctrl+Down" : 65 : "Insert Record"
    119 : 1 : "Shift+F8" : 66 : "Next Set of Records"
    1005 : 0 : "Down" : 67 : "Next Record"
    1004 : 0 : "Up" : 68 : "Previous Record"
    118 : 0 : "F7" : 69 : "Clear Block"
    66 : 2 : "Ctrl+B" : 70 : "Block Menu"
    34 : 1 : "Shift+PageDown" : 71 : "Next Block"
    33 : 1 : "Shift+PageUp" : 72 : "Previous Block"
    116 : 1 : "Shift+F5" : 73 : "Duplicate Field"
    119 : 0 : "F8" : 74 : "Clear Form"
    122 : 0 : "F11" : 76 : "Enter Query"
    122 : 2 : "Ctrl+F11" : 77 : "Execute Query"
    69 : 3 : "Shift+Ctrl+E" : 78 : "Display Error"
    80 : 2 : "Ctrl+P" : 79 : "Print"
    123 : 0 : "F12" : 80 : "Count Query"
    85 : 2 : "Ctrl+U" : 81 : "Update Record"
    121 : 3 : "Shift+Ctrl+F10" : 82 : "Function 0"
    112 : 3 : "Shift+Ctrl+F1" : 83 : "Function 1"
    113 : 3 : "Shift+Ctrl+F2" : 84 : "Function 2"
    114 : 3 : "Shift+Ctrl+F3" : 85 : "Function 3"
    115 : 3 : "Shift+Ctrl+F4" : 86 : "Function 4"
    116 : 3 : "Shift+Ctrl+F5" : 87 : "Function 5"
    117 : 3 : "Shift+Ctrl+F6" : 88 : "Function 6"
    118 : 3 : "Shift+Ctrl+F7" : 89 : "Function 7"
    119 : 3 : "Shift+Ctrl+F8" : 90 : "Function 8"
    120 : 3 : "Shift+Ctrl+F9" : 91 : "Function 9"
    113 : 0 : "F2" : 95 : "List Tab Pages"
    72 : 2 : "Ctrl+H" : 30 : "Help"
    112 : 0 : "F1" : 30 : "Help"
    I don't know what value should i enter for cntrl + left mouse click ?
    Even for shift + left mouse click, row is not there but it's working.
    Please tell if you know what row should i enter for cntrl + left mouse click in order for it to select mutliple rows?
    Regards
    Navnit

  • Can we merge data from multiple sources in Hyperion Interactive Reporting ?

    Hi Experts,
    Can we merge data from multiple sources in Hyperion Interactive Reporting ?Example can we have a report based on DB2
    Oracle,
    Informix and Multidiemnsional Databases like DB2,MSOLAP,ESSBASE?
    Thanks,
    V

    Yes, Each have their own Query and have some common dimension for the Results Sections to be joined together in a final query.
    look in help for Creating Local Joins

  • In ADF how can i insert data in multiple table if they have foreign key

    I have started working on ADF and can anybody inform me in ADF how can i insert data in multiple table if they have foreign key,please?
    Thnak you very much.

    Hello,
    Still no luck.I am surely doing silly mistakes.Anyway,Here are my workings-
    1> student_mst (id(pk),studentname) and student_guard_mst(id(fk),guardianname)
    2> created EO from both of the tables,made id in both EO as DBSequence and an association was also generated.
    3> i made that association composite by clicking the checkbox
    4> i created 2 VO from 2 EO.
    5> put those VO in Application Module.
    6> dragged and dropped 2 VO on my jspx page and dropped them as ADF Form.
    Now what to do please?

  • Is there a way to select MULTIPLE tabs and then copy ALL of the the URLs and titles/or URLs+titles+HTML links? This can be done with the Multiple Tab Handler add on; However, I prefer to use a Firefox feature rather than download an add on. Thanks.

    Currently, I can copy ONE tab's url and nothing else (not its name). Or I can bookmark all tabs that are open. However, I'd like to have the ability to select multiple tabs and then copy ALL of the the URLs AND their titles/or copy ALL of the URLs+titles+HTML links? This can be done with the Multiple Tab Handler add on; when I download the add on, I get a message saying that using the add on will disable Firefox's tab features. I prefer to use Firefox features rather than download and use an add on. Is there a way to do this without an add on?

    Hi LRagsdale517,
    You should definitely be able to upload multiple files by Shift-clicking or Ctrl-clicking the files you want to upload. Just to make sure you don't have an old version of the service cached, please clear the browser cache and then log in to https://cloud.acrobat.com/files. After clicking the File Upload icon in the upper-right corner, you should be able so select multiple files for upload.
    Please let us know how it goes.
    Best,
    Sara

  • Hi, I activated my CS6 in 2012 under my student licence and still using it. I've heard that you can't run CS6 on multiple computers. How do I transfer it from one computer to another as I am switching computers?

    Hi, I activated my CS6 in 2012 under my student licence and still using it. I've heard that you can't run CS6 on multiple computers. How do I transfer it from one computer to another as I am switching computers?

    Hi,
    first, I'm not Adobe's "slave" as you might to accuse me. Most of the posters here are users like me.
    I only can repeat that what I found in Adobe's help sites, as I wrote above. You are free to figure out the "real" truth and - the best would be - you may contact Adobe directly, here are - I'm sure you know them -  the links I would use: http://helpx.adobe.com/support.html  and http://helpx.adobe.com/contact.html.
    Hans-Günter

  • Using home sharing, can you sync libraries between multiple users in a household?

    Using home sharing, can you sync libraries between multiple users in a household?

    Hey lindsay146,
    Home Sharing lets you to stream or transfer music, movies, and more with up to five authorized computers in your household. You can learn more about it in this link:
    Understanding Home Sharing
    http://support.apple.com/kb/HT3819
    Welcome to Apple Support Communities!
    All the best,
    Delgadoh

  • How can I get rid of multiple pictures at the same time?

    how can I get rid of multiple pictures at the same time?

    Adobe Bridge, lightroom and your file browser (windows explorer or Mac Finder) can select multiple pictures at once and then delete. If you are looking for more than that for information, you will need to be more specific at what your doing, what OS you have, and version of software your using. If necessary post screen shots so we can see what your doing. The more information we have the more detailed of an explaination can can give back to you.

  • Can I access music from multiple accounts on one cpu?

    Can I access music from multiple accounts on one cpu

    Here's one option: http://support.apple.com/kb/PH12366
    But frankly you'd be better off creating unique user accounts on the computer and having seperate iTunes libraries for each user as described here: http://support.apple.com/kb/ht1495

  • Can I sign in with multiple apple IDs in a single apple device without deleting my previous one?

    can I sign in with multiple apple IDs in a single apple device without deleting my previous one?

    Hi swagyoloswag,
    Welcome to the Apple Support Communities!
    There are several different services that require signing into an Apple ID to use on your iOS device. You can sign into different Apple IDs for different services on your iPhone. For example, Apple ID #1 for iCloud and Apple ID #2 for iTunes & App Store. You cannot sign into the same service with two different Apple IDs at the same time. The attached article has a list of services that are accessible with your Apple ID. 
    Where can I use my Apple ID? - Apple Support
    Cheers,
    Joe

  • Satellite L-50 can't play audio from multiple sources

    I can't play audio from multiple sources. This is very annoying when I have 2 youtube videos playing, if I start playing something on the media player, there is no sound on media player, it's the same when I have 2 media players open and 1 youtube video playing, youtube video doesn't have sound..
    I already have all the latest drivers, last DTS driver update was in 2014, sound update this year's february..
    25/02/14
    DTS Studio Sound
    DTS Inc.
    Windows 8.1 - 64 Bit
    1.01.2700
     I don't know if this makes sense, but I got newer DTS sound driver which I found, It's not my laptop model, but they all seem to be the same - v1.1.88.0 
    I uninstalled DTS software and still had the same problem, so it's not affecting sound driver in any way..
    10/02/15
    Sound Driver
    Integrated Device Technology Inc.
    Windows 8.1 - 64 Bit
    6.10.6491.0
    IDT audio driver has newer release date, but the driver version is the same as the 2013 one..
    Why are toshiba releaseing old driver as 'NEW' ?
    2nd is my speakers advanced settings, nothing changed when I disabled "Allow applications to take exclusive control of this device"
    Attachments:
    audio.png ‏6 KB
    test2.png ‏7 KB
    specs.png ‏16 KB

    Can you check the full model and part number from the laptop?
    - Peter

Maybe you are looking for