How to locate top level dialog

Hi
I have a problem. I have implemented an JPanel based component that is displayed on some mouse events. It also implements AWTEventListener. It was implemented because, this component should close whenever mouse is pressed outside of this component. That is the business rule.
So here is the sample code in AWTEventListener.eventDispatched()
if (event.getID() == MouseEvent.MOUSE_PRESSED) {
     MouseEvent evt = (MouseEvent) event;
               Component p = getParent();
Point point = evt.getPoint();
SwingUtilities.convertPointToScreen(point, evt.getComponent());
Rectangle r = c.getBounds();
Point temp = r.getLocation();
SwingUtilities.convertPointToScreen(temp, this);
// Check if point is outside of JPanel, if outside, close the panel logic is added below....
Now the problem is If a model dialog is displayed elsewhere and user clicks on the dialog, I should not close the component. Currently, JPanel is getting closed if user clicks anywhere on the dialog.
Now, application is so huge that I cannot know if a dialog is displayed or not using current code. So I want to know if anybody knows if Swing offers anyway to know if a dialog is displayed or not in an application.

I finally found one, it seems to do the job. Thanks everyone for trying.
               Window activeWindow = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
               if (activeWindow instanceof JDialog){
                    return;
               }

Similar Messages

  • How to enable "top level navigation " in portal

    Hi all,
    I am unable to see the "top level Navigation" once I logged on to portal
    Previously I was able to see that
    I performed the following steps thats the reason why I am unable to see "top level navigation"
    1 Logged on to portal
    2 Content administration
    3 Expanded Poratl Content
    4 Expanded Content Provided by SAP
    5 Expanded End User Content
    6 Expanded Standard Poratl Users
    7 Selected "Default Frame work Page"
    8 In that selected Top Level navigation Iview and the iveiw properties I changed the property "Number of Display Levels " to "0" and choose save
    As I have set "Number of Display Levels" to "0" I am unable to see "top level Navigation" Now,I want to change it to 2 for that I need to see the Content Administration role in the "Top Level navigation" Can anyone help me out how to enable "Top level Navigation"
    Thanks in advance

    undo the changes what you have done.
    after you logon to the portal try the url below...this should take you to content admin directly from there modify the framework page and reset the property of TLN
    http://yourserver:port/irj/servlet/prt/portal/prtroot/com.sap.portal.pagebuilder.IviewModeProxy?iview_id=pcd%3Aportal_content%2Fadministrator%2Fsuper_admin%2Fsuper_admin_role%2Fcom.sap.portal.content_administration%2Fcom.sap.portal.content_admin_ws%2Fcom.sap.portal.portal_content&iview_mode=default
    Thanks
    GLM

  • How to make top level navigation not refresh

    Hello Guys,
    I have a question concerning on my External Facing Portal, my boss wants that when I click on a tab or a link in the Top Level Navigation , to load the content in the Content Area without refreshing the whole page, What I want is that when I click on a tab or link of the Top Level Navigation , the Top Level Navigation and the MasterHead not to refresh and that the content be loaded and refreshed only in the Content Area. The only way I know to do this is by making a frameset of my page and to make the masterhead and toplevel navigation a frame and the detalied navigation a frame and the content area a frame, and in the links to put the target property to the name of the content area frame, but I don't know if this is possible to do in the portal, I see that all is embedded and I don't know how to make a frameset like this in the portal.
    Any highlights to solve this will sure be appreciated.
    Thanks
    Rewarding points will be given.
    Luis

    Hi,
       When you are implementing External Facing Portal, i think you have used Light Framework Page.  In Light Framework Page, only one Framework has been used, so when you click on the top level navigation, the whole page will get refresh, so there is no otherway as of my knowledge.  If you use standard framework page in portal, it is possible to do (i.e. the content area only get refresh)  and the concept of your External Facing Portal is eliminated here.
    Regards,
    Venkatesh. K
    /* Points are Welcome */

  • How to start Top-Level Navigation on Level two?

    Hi,
    does anyone known a trick how i can start the top-level navigation at Level two?
    I make an own frameworkpage and try to set it in the iview properties, but there is not an property for this. it is only for the detailed-navigation iView there.
    For what:
    I need this, because i would open an pop-up with an other portal window. I link to the popup with navigation-target=... In this pop-up should only be the content of one role. This folder i have set to "invisible in the navigation area". So the User always see him in a popup. when i start at the default Top-navigation level 1, the user see all the other navigation folders.
    Best regards,
    Patrick

    Hi Patrick,
    up to SPS13, this needs some hands on on different parts of the TLN. What I've done this spring was showing all top-level nav targets within a select box in the masthead and then, after having selected one of these entries, the TLN shows just the content of this top level entry. So this is more or less the same. As said, some work to do.
    As of SPS14, with the new navigation taglib, I expect this to be much less work; anyhow, I didn't convert the results into SPS14, so I cannot say if this is really as easy as I expect.
    Hope it helps
    Detlev

  • How to exclude top-level keywords from export?

    Hi,
    I have keywords organised into a hierarchical structure; I never want the top-level keywords to appear in the exported image but can't find a quick way to do it.
    I can make it work by going to one of it's children and editing that keyword tag, unchecking the "export containing keywords" however I can't see a way of batch performing this action and the number of keywords I have make it impractical to do one by one.
    I tried clicking on the top-level keyword and unchecking the export option. It still exports and is even listed when I make the keyword tags dropdown "Will Export".
    If any of your gurus know the answer or can explain how I am misunderstanding the export terminology, please let me know...
    Thanks,
    Steve
    PS I have tried exporting with & without option "Write Keywords as Lightroom Hierachy"

    Thanks for that - its nearly right but I had tried doing that already and it didn't work.
    The reason why is when simply unchecked the Export Containing Keywords and Export Synonyms remain ticked but greyed out. I assumed that having been greyed out they are no longer effecting the output in any way but I was wrong.
    So, simply uncheck ALL the items in that dialogue box for top-level terms.
    Thanks again!

  • How to Delete Top Level Folder

    I have a number of files in a hierarchy of folders and I wish to delete the top level folder but leave in place all the sub folders and files contained therein. There are only folders (no files) under the top level folder. Specifically, I do not want to just select and drag and drop all the subfolders.
    Any help on how to do this appreciated.

    First, to clarify the term - there are traditional VS projects (C# project, VB project, etc.) and with Team Foundation there are now Team Projects. Given the question, I take it you mean team projects (as created with the "New Team Project" option and going through the Project Creation Wizard).
    When you create a team project called "foo", the folder for that project (assuming you had it create a folder during the Project Creation Wizard, which is the default) will be called $/foo. Based on your question, I take it you're referring to a folder called "bar" that would be at server path $/foo/bar since it's part of the "foo" team project.
    The easiest way to rename or delete such a folder would be to bring up the Source Control Explorer (View | Other Windows | Source Control Explorer) and navigate to that folder. You'll want to make sure that you have the folder in your local workspace (this is a limitation when have in V1) so you may want to right-click on "bar" and do a "get latest version" first. If you don't already have it mapped, you'll be prompt to pick a local path to map it to.
    When you right-click on the folder "bar" (once you have it in your workspace), among the entries in the context menu will be Delete, Rename (for the "rename to oranges" case), and Move (for "move it to another folder"). Note that each of these pends the operation on the workspace, and you'll need to check in before the change is committed to source control.
    tiny screen shot: http://static.flickr.com/29/55040912_e3190835e6.jpg

  • How to connect top level domain database to subdomains

    Created subdomains for the top level domains. Need to learn
    how can we connect centralized database in the top level domain
    with the subdomains code in coldfusion.

    If you're using EOP and your goal is to block stuff coming from a certain geographic area then you need to go to your exchange admin center select Protection>content filter>Default Policy>International Spam>Filter email messages sent from the
    following countries or regions

  • How to block top-level domain names in rules for EOP?

    Using EOP for email filtering to/from our on-premise Exchange server.  How do I block entire top-level domains in the rules section under mail flow?  For example, w need everything ending with .link blocked.  Right now I
    have only been able to block email addresses and full domain names.  I know I can setup a transport rule in our exchange, but I'd prefer EOP handle this before like it should. Thanks in advance.

    If you're using EOP and your goal is to block stuff coming from a certain geographic area then you need to go to your exchange admin center select Protection>content filter>Default Policy>International Spam>Filter email messages sent from the
    following countries or regions

  • How to hide Top Level Navigation?

    Hi,
    I created a quicklink for an iview.
    I am able to call the iview from IE window using the quicklink.
    But it displays the top level navigation (Company Logo, Welcome message, Logoff, Role tabs,...).
    How do I hide this?
    Thanks
    Sundar

    Hi Vinit,
    Your solution is working when I clicked the preview button in iview edit window.
    But when I try to open the iview using Quicklink with external IE window, it shows the MastHead, TLN.
    It is not hiding the MastHead and TLN.
    Thanks
    Sundar

  • How to change Top-Level navigation design bar into an image?

    Hi guru's,
    is there anybody who knows how i can change the Top-Level navigation design bar into an image?
    thanks in advance
    greets
    Kurt

    Hi
    Check this....
    http://help.sap.com/bp_epv260/EP_JA/documentation/EP/N08_BB_ConfigGuide_EN_JP.doc
    Regards

  • How to create top level classes

    what is the meaning of top level classes. and how to create toplevel classes.

    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000188.html

  • How to release top-level VI (only) source code?

    Hello,
    I am developing an addon to an application I already have. The application is large (over 1,500 VI's) and the VIs are set up to compile with mostly default settings (there's a top-level VI, a few with Front Panel visible, most of them are not visible).
    The customer wants the source code to the work I'm going to do, and it's going to use many existing sub-VI's. The addon itself will be a sub-VI (I have a Main.vi that basically opens 'screens', and this is a new screen). The existing sub-VI's basically do the data collection and processing, and the new code will do some additional processing and have a nice GUI to the existing code. The customer wants the source so they can make modifications as needed.
    Is there any easy way to provide just the source for the top-level VI? Basically, I want to give them M.vi, where M.vi calls n.vi, o.vi... etc, but o-z.vi need to remain closed-source. Also, M.vi is called by Main.vi, which opens screens A-M.vi
    One option is do copy the entire application, then open every sub-VI and save it without Source Code. But with so many files, this seems like a bad idea. I also then have to maintain two applications.
    Any good ideas out there? It seems so easy in other languages (use object files) that it seems like there should be a solution here I'm not seeing.... Thanks!
    Message Edited by rnelsonee on 06-02-2010 08:28 AM
    Message Edited by rnelsonee on 06-02-2010 08:31 AM
    Solved!
    Go to Solution.

    Dont know if this is the best solution for you, but you can create a "virtual folder" in the LabVIEW project with all the sub-VIs that you want to keep closed-source. Then create Source Distribution build specifications in the project and remove the block diagrams assign passwords to all VIs in the virtual folder. See attached pics.
    Attachments:
    Project.JPG ‏23 KB
    SrcDist.JPG ‏62 KB

  • How to find top level object on a given layer?

    I need to assign it to a var...
    var topLevelObj = app.activeDocument.layers.name("foo")... whatever is on top of that stack...
    ...this is probably not correct but you know what I mean

    Jump_Over wrote:
    Hi,
    top level object is the first in a collection:
    var fooLayerTopObj = app.activeDocument.layers.item("foo").pageItems[0]
    Jarek
    I'm not very good in ID-scripting, but I think this isn't good enough to find topmost item of a layer.
    Why?
    - create a new document
    create a polygon
    create a rectangle
    create an ellipse
    create a line
    Run this script snippet:
    var pI = app.activeDocument.layers.item(0).pageItems;
    for (i=0; i<=pI.length-1; i++) {
    pI[i].select();
    alert (i);
    pI[i].locked = true;
    Do you see, which element pageItems[0] is?

  • How make the Top-level Navigation and Content Area in one page as a whole?

    I want to make the Top-level Navigation and the Content Area in the one page as a whole displayed in user interface.In the default framework,the Top-level Navigation and the Content Area were contained  in 2 pages, So the vertical scroll bar could only control the Content Area. I want to control the full page with  one vertical bar like the page of "www.sdn.sap.com" Web.

    Hi Jianguo,
    One advantage of the external facing portal solution (SP14) is that the framework page is displayed in a single frame. Perhaps this could be of use to you.
    Hope this helps.
    Daniel

  • How to merge top level navigation into detail navigation panel.

    Hi All,
    I want to add all the contents of top level navigation into detail navigation panel and  remove top level navigation.I am looking for the code with which i can shift the top level navigation to detail level navigation.

    You could edit the top-level navigation iview and set the <b>Number of Display levels</b> property's value to 0.
    you can reach the Top-level navigation iview by going through the following path
    1) <b>Content Administration --> Portal Content --> Content Provided by SAP --> Admin Interfaces --> Top-level navigation</b>
    However, note that once you do this the whatever menus that are available in the top level will not be available anymore.
    Maybe, you could copy the standard Top-level navigation into a framework page that you have created and then make the change. After doing so, you can assign it to groups/roles you want. This will ensure that the CONTENT/SYSTEM/USER administrators see the normal portal framework and specific user groups alone dont see the Top level navigation..
    Pradeep.

Maybe you are looking for