{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Windowevent","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"windowevent","__idx":0},"children":["Windowevent"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This type of event is generated when a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["window"]}," is created or deleted."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Event registration can be done as follows, where this is the class that implements ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IEventSubscriber<WindowEvent>"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    EventBroadcaster.getInstance().subscribe(WindowEvent.class, this);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the example below, we want to be notified if a certain layer is deleted. We do this in method onEvent which implements the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IEventSubscriber<WindowEvent>"]}," interface:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    private IWindow myWindow; // the window we want to keep track of\n    public void onEvent(WindowEvent event) {\n        if (event.getEventType().equals(WindowEvent.WINDOW_DELETED_EVENT_TYPE)) {\n                                   IWindow window = event.getWindow();\n                if (window == myWindow) {\n                   // do some cleanup\n                   EventBroadcaster.getInstance().unsubscribe(WindowEvent.class, this);\n                   myWindow = null;\n                   ....\n            }\n        }\n    }\n"},"children":[]}]},"headings":[{"value":"Windowevent","id":"windowevent","depth":1}],"frontmatter":{"title":"Windowevent","pageId":"events/windowevent","seo":{"title":"Windowevent"}},"lastModified":"2026-10-22T14:32:05.573Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/events/windowevent","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}