How to create a modeless ( non modal) dialog

I want to create a non modal Uno dialog in my java extension for Libre Office.
I came across the UnoDialogSample.java file given in the examples section but this creates only modal dialog.
Searched in many forums but didnt manage to get any solution.
Please help me on How to Create Non Modal (modeless) Uno Dialog through Java extension.

I came across the UnoDialogSample.java file given in the examples section

… where? (I think everyone should have a muscle memory to provide a link whenever one types something “I found …”, “I have read …”, etc.)

(Supposedly here.)

XDialog’s execute method is modal. You need to use XWindow’s setVisible method to control the dialog’s visibility, making it non-modal.

Only a tiny bit of Java experience, but in doing this in Python or Basic have set as non-modal with model property of DesktopAsParent = True (Python). Appears that adding DesktopAsParent, for sample mentioned, to:

oUnoDialogSample.initialize

and setting it as Boolean.TRUE will allow it to be non-modal.

Note setVisible is also utilized in my Python routine but do not see it in my Basic code.

@Ratslinger:

Note setVisible is also utilized in my Python routine but do not see it in my Basic code.

Possibly it’s something like this?

Dialog.Visible = True

… which is Basic shorthand for the same.

@mikekaganski,

No. In Basic simply use the execute method. In fact, removed the setVisible in the Python code (which also has self.DialogContainer.execute()) and it works without a problem.

execute does actually make the dialog visible. The setVisible, as I have seen, is utilized in making an IDE created Dialog non-modal. It is a looping routine which allows this. Please see this post → How to make non-modal dialog?.

When creating the dialog entirely from code you only need to set DesktopAsParent.