Changing the name of a Display Window in MM2

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Changing the name of a Display Window in MM2

Douglas S. Martin
Hi -

I’d like to ask if anyone is willing to share an example of how to change the name of a Display Window from the beanshell script in MM2.

That’s enough, but I’m writing more below, in case someone has a ton of extra time (haha) to help me move towards better programming:

My request comes from a deep lack of knowledge of something - maybe object oriented programming - related to how MM2 can be scripted.  

For example, following a post from centswu, I can see how to get the window name using
mm.displays().getCurrentWindow().getName()
And I’m working to understand how this call takes me from the org.micromanager.display package to the DisplayManager interface to the DisplayWindow class, in which the getName() method is implemented.

Great.  But trying to understand how to change the name - well, since this isn’t in DisplaySettings, I can’t seem to access it via the DisplaySettingsBuilder.

Yet I feel like I’m misunderstanding something fundamental:  “name” must be a thing associated with a DisplayWindow.  It must be generated somewhere, right? Presumably when I call mm.displays().createDisplay(store), though I don’t see how, explicitly.  In the ControlsFactory?? Is it in the mm.data().createRamDatastore() call?  That doesn’t accept any arguments, though.

Whew - ok, if you’ve read this far, thanks for reading my therapeutic ramblings.  My hope is that an example of how to change the Display Window name will help me disentangle my mental model of what’s happening in the background of MM2.

-Doug


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general