Menu

#75 drop-down menus in Preferences window not working

1.6pre
open-accepted
None
5
2017-10-06
2013-11-04
siccis
No

Drop-down menus in all tabs of Preferences window don't work i.e. menus can be dropped down but there's no way to select any item

Discussion

  • Vincent Belaïche

    • status: open --> open-accepted
     
  • Vincent Belaïche

    I can reproduce the problem : items cannot be selected with mouse, however it works if you select them with keybord arrow-up/down + enter. I am more of a keyboard user than a mouse user, so I had never noticed that.

     
  • Vincent Belaïche

    The bug does not show when I hack jPicEdt so that the Preferences pannel is no longer modal. This is a problem connected with modality implementation in jPicEdt.

    Well, the preferences dialog is implemented with javax.swing.JInternalFrame, not javax.swing.JDialog. JDialog implements modality right off the box. JInternalFrame does not, so modality is “home-made” implemented in jpicedt.widgets.PEInternalDialog class.

     
  • Vincent Belaïche

    To be checked : feature req 22 seems to have the same root cause.

     
  • Vincent Belaïche

    Hello,
    Just for your information, if you configure jPicEdt to use Gimp-like windowing, then you won't have the problem because the dialogs will use PEDiagog class instead of PEInternalDiagog.
    To do that, open the preferences pannel, General Tab, and select Gimp-like for the 1st item (Multiple Document Interface). Do the selection with the keyboard, as the mouse is not working. Then exit jPicEdt for the configuration to take effect.
    You can also edit the preference file ~/.jpicedt/preferences and replace in it line ui.mdimgr=child-frames by ui.mdimgr=child-frames by ui.mdimgr=Gimp-like.
    OK, this does not solve the problem, but at least, hopefully, this can make it less annoying.

     
  • Vincent Belaïche

    • assigned_to: Vincent Belaïche
     
  • Vincent Belaïche

    OK, I have made some progress, and I think that I have found some possible work-around to make a javax.swing.JInternalFrame modal.

    • One way is described in this article. It consists in emulating modality by placing the content pane of the JInternalFrame on a glass pane when the JInternalFrame is constructed. This way seems futureproof because we use only the public methods documented in the Java API, however I need to think it over again, to understand whether it suits our case.
    • The second way it that java.awt.Container has private methods called startLWModal and stopLWModal. These methods are called using reflexivity by javax.swing.JOptionPane.showInternalOptionDialog method in order to make a modal javax.swing.JInternalFrame. This way is certainly more robust to corner cases, because it would do the same thing as java source code does. However, it is probably also less futureproof because we do some tirck in order to get access to private undocumented methods.
     

Log in to post a comment.