コード例 #1
0
ファイル: about.py プロジェクト: JoeLeclercq/jesWork
    def __init__(self):
        super(AboutDialog, self).__init__()

        # Open the files and build a tab pane
        self.tabbedPane = tabs = JTabbedPane()

        for title, path in self.INFO_FILES:
            textPane = JTextPane()
            textPane.editable = False
            scrollPane = JScrollPane(textPane)
            scrollPane.preferredSize = (32767, 32767)  # just a large number

            with open(path, 'r') as fd:
                infoText = fd.read().decode('utf8')
                textPane.text = infoText

            textPane.caretPosition = 0
            tabs.addTab(title, scrollPane)

        # Load this tabbed pane into the layout
        self.add(tabs, BorderLayout.CENTER)

        # Add a label at the top
        versionLabel = JLabel(JESVersion.TITLE + " version " +
                              JESVersion.RELEASE)
        versionLabel.alignmentX = Component.CENTER_ALIGNMENT

        versionPanel = JPanel()
        versionPanel.add(versionLabel)
        self.add(versionPanel, BorderLayout.PAGE_START)

        # Make an OK button
        self.okButton = JButton(self.ok)
        self.buttonPanel.add(self.okButton)
コード例 #2
0
ファイル: about.py プロジェクト: HenryStevens/jes
    def __init__(self):
        super(AboutDialog, self).__init__()

        # Open the files and build a tab pane
        self.tabbedPane = tabs = JTabbedPane()

        for title, path in self.INFO_FILES:
            textPane = JTextPane()
            textPane.editable = False
            scrollPane = JScrollPane(textPane)
            scrollPane.preferredSize = (32767, 32767)   # just a large number

            with open(path, 'r') as fd:
                infoText = fd.read().decode('utf8')
                textPane.text = infoText

            textPane.caretPosition = 0
            tabs.addTab(title, scrollPane)

        # Load this tabbed pane into the layout
        self.add(tabs, BorderLayout.CENTER)

        # Add a label at the top
        versionLabel = JLabel(JESVersion.TITLE + " version " + JESVersion.RELEASE)
        versionLabel.alignmentX = Component.CENTER_ALIGNMENT

        versionPanel = JPanel()
        versionPanel.add(versionLabel)
        self.add(versionPanel, BorderLayout.PAGE_START)

        # Make an OK button
        self.okButton = JButton(self.ok)
        self.buttonPanel.add(self.okButton)
コード例 #3
0
ファイル: intro.py プロジェクト: zackfuqua/jes
    def __init__(self):
        super(IntroDialog, self).__init__()

        # Open the text file and make a text pane
        textPane = JTextPane()
        textPane.editable = False

        scrollPane = JScrollPane(textPane)
        scrollPane.preferredSize = (32767, 32767)   # just a large number

        with open(self.INFO_FILE, 'r') as fd:
            infoText = fd.read().decode('utf8').replace(
                "@version@", JESVersion.VERSION
            )
            textPane.text = infoText

        # Load the scroll pane into the layout
        self.add(scrollPane, BorderLayout.CENTER)

        # Make an OK button
        self.okButton = JButton(self.ok)
        self.buttonPanel.add(self.okButton)
コード例 #4
0
ファイル: bugreport.py プロジェクト: HenryStevens/jes
    def __init__(self):
        super(BugReportDialog, self).__init__()

        # Add a message
        textPane = JTextPane()
        textPane.editable = False

        version = "\n".join("    " + line for line in JESVersion.getMessage().splitlines())
        textPane.text = MESSAGE % version

        scrollPane = JScrollPane(textPane)
        scrollPane.preferredSize = (32767, 32767)   # just a large number

        # Load it into the layout
        self.add(scrollPane, BorderLayout.CENTER)

        # Make buttons
        self.sendButton = JButton(self.send)
        self.buttonPanel.add(self.sendButton)

        self.closeButton = JButton(self.close)
        self.buttonPanel.add(self.closeButton)
コード例 #5
0
ファイル: bugreport.py プロジェクト: JoeLeclercq/jesWork
    def __init__(self):
        super(BugReportDialog, self).__init__()

        # Add a message
        textPane = JTextPane()
        textPane.editable = False

        version = "\n".join("    " + line
                            for line in JESVersion.getMessage().splitlines())
        textPane.text = MESSAGE % version

        scrollPane = JScrollPane(textPane)
        scrollPane.preferredSize = (32767, 32767)  # just a large number

        # Load it into the layout
        self.add(scrollPane, BorderLayout.CENTER)

        # Make buttons
        self.sendButton = JButton(self.send)
        self.buttonPanel.add(self.sendButton)

        self.closeButton = JButton(self.close)
        self.buttonPanel.add(self.closeButton)