Is it possible to verify if a window map is open?

I have a module where some pieces are sent to another window, and I would like to make sure the window is open after the piece is sent.

I can send the command to toggle the window, but if the window is already opened it will close it.

Is there a way to check the window status? Or to send a command to open a window regardless of it being open or closed.

As far as I know, a window simply uses a toggle switch to open and close so if that command is used it will open when closed and vice versa.

If you go into File → Preferences and uncheck the “used combined window” option, each window will open separately and, as a result, you’ll get a task bar button for each window (at least on Windows systems) so you can visually see on the task bar if a window is open or not and manually select it, close it, etc. I don’t know if that helps you any or not but I thought I’d mention it.

Not really, what I need is a way to programmatically check if it is open. Or else, a simple Open command that isn’t a toggle Open/Close.

Thus spake luizborges:

Not really, what I need is a way to programmatically check if it is
open. Or else, a simple Open command that isn’t a toggle Open/Close.

You could check whether a window is open from a custom Java class.


J.

Any tips on how to go about doing just that?

Thus spake luizborges:

Any tips on how to go about doing just that?

It’s going to be complicated. You’d need to find the top-level parent
of the Map.View for the Map you care about and ensure that JWindow or
JDialog was visible, but then also check whether the Map.View is in
a tab and make sure that tab is the active one.


J.