{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Customizing The Window Locator","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":"customizing-the-window-locator","__idx":0},"children":["Customizing The Window Locator"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The window locator is the bar displayed at the bottom of 2D windows, showing the INLINE/XLINE/X/Y/Time coordinates of the cursor."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you need to modify the behavior of a window locator for an existing window, you can implement your own locator class."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["XSECTIONWINDOWLOCATOR.JAVA"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"package com.interactive.intviewer.view2d;\nimport com.interactive.intviewer.view2d.util.WindowLocator2DUtil;\nimport com.interactive.intviewerapi.IVisual;\nimport com.interactive.intviewerapi.windows.AbstractWindowLocator;\nimport java.util.Map;\npublic class XSectionWindowLocator extends AbstractWindowLocator {\n    public XSectionWindowLocator() {\n    }\n    @Override\n    public String getHorizontalText(IVisual layer, Map<String, Double> pmap, int viewportX, int viewportY) {\n        return \"MyHorizontalText\";\n    }\n    @Override\n    public String getVerticalText(IVisual layer, Map<String, Double> pmap, int viewportX, int viewportY) {\n        return  \"MyVerticalText\";\n    }\n    @Override\n    public String getContextualText(IVisual visual, Map<String, Double> pmap, int viewportX, int viewportY) {\n        return \"MyContextualText\";\n    }\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Register your class in the layer.xml file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["LAYER.XML"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<filesystem>\n    <folder name=\"WindowLocators\">\n        <folder name=\"ViewerPlotXV\">\n            <file name=\"com-interactive-intviewer-view2d-XSectionWindowLocator.instance\"/>                \n        </folder>\n    </folder>\n</filesystem>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The getContextualText method of the window locator class controls the string at the bottom of the contextual menu displayed when right-clicking in a window. This contextual string is shown in yellow in the snapshot below:"]}]},"headings":[{"value":"Customizing The Window Locator","id":"customizing-the-window-locator","depth":1}],"frontmatter":{"title":"Customizing The Window Locator","pageId":"intviewer-apis-for-windows/customizing-the-window-locator","seo":{"title":"Customizing The Window Locator"}},"lastModified":"2026-10-22T14:32:05.576Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-apis-for-windows/customizing-the-window-locator","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}