コード例 #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 makeDialog(self, event):
     cmd = event.getActionCommand()
     isModal = (cmd == 'Modal')
     dialog = JDialog(
         self.frame,  # Try None as owner...
         #           None,                      # owner
         title='%d: %s' % (self.boxNum, cmd),
         modal=isModal,
         size=(200, 100),
         locationRelativeTo=self.frame)
     self.boxNum += 1
     dialog.add(JLabel(cmd))
     dialog.setVisible(1)
コード例 #4
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
コード例 #5
0
ファイル: help.py プロジェクト: christinapanto/project
jB2 = JButton("Exit", actionPerformed=exitme)

 
lowerPanel.add(jB2);
topPanel.setLayout(BorderLayout());

# comments
jScrollPane1 = JScrollPane();
jScrollPane1.getViewport().add( jDescription );
topPanel.add(jScrollPane1,BorderLayout.CENTER);


jDescription.setLineWrap(1);
jDescription.setWrapStyleWord(1);
jDescription.setCaretColor(Color.red);
frame.add( topPanel,  BorderLayout.CENTER );
frame.add( lowerPanel, BorderLayout.SOUTH );


bounds = view.getBounds()
ww = bounds.width
hh=  bounds.height
xx = bounds.x
yy = bounds.y
  
frame.setLocation(xx+(int)(0.4*ww), yy+(int)(0.1*hh))
frame.pack()
frame.setSize( (int)(0.5*ww),(int)(0.8*hh) );
frame.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE)
frame.setVisible(1)