コード例 #1
0
 def word_corrections(event):
     words_string = ""
     for word in self.word_classifier.words:
         words_string = words_string + word.upper() + "\n"
     text = "The words that can be corrected are:\n\n" + words_string
     dialog = JOptionPane(text, JOptionPane.INFORMATION_MESSAGE)
     dialog_wrapper = JDialog(self, "Available Words", False)
     dialog_wrapper.setContentPane(dialog)
     dialog_wrapper.pack()
     dialog_wrapper.setVisible(True)
コード例 #2
0
ファイル: hand_reco_writer.py プロジェクト: Yinhai/HandReco
 def word_corrections(event):
     words_string = ""
     for word in self.word_classifier.words:
         words_string = words_string + word.upper() + "\n"
     text = "The words that can be corrected are:\n\n" +words_string
     dialog = JOptionPane(text, 
                          JOptionPane.INFORMATION_MESSAGE)
     dialog_wrapper = JDialog(self,"Available Words",False)
     dialog_wrapper.setContentPane(dialog)
     dialog_wrapper.pack()
     dialog_wrapper.setVisible(True)
コード例 #3
0
def __showModal(params=None):
    from javax.swing import JDialog
    windowName = 'GWFileBrowser'
    if windowName in system.gui.getWindowNames():
        window = system.nav.openWindowInstance(windowName, params)
        system.nav.centerWindow(window)
        rc = window.getRootContainer()
        #rc.load()
        cp = window.getContentPane()
        window.setVisible(False)
        dlg = JDialog(None, True)
        dlg.setContentPane(cp)
        dlg.setSize(window.getWidth(), window.getHeight())
        dlg.setMinimumSize(window.getMinimumSize())
        dlg.setMaximumSize(window.getMaximumSize())
        dlg.setLocation(window.getX(), window.getY())
        #dlg.setLocationRelativeTo(None)
        dlg.setTitle(window.getTitle())
        dlg.setVisible(True)
        system.nav.closeWindow(window)
        return rc.Result
    return None