本文整理汇总了Python中javax.swing.JScrollPane方法的典型用法代码示例。如果您正苦于以下问题:Python swing.JScrollPane方法的具体用法?Python swing.JScrollPane怎么用?Python swing.JScrollPane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing
的用法示例。
在下文中一共展示了swing.JScrollPane方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createLibraryTabs
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def createLibraryTabs(self):
self._libraryTabs = JTabbedPane()
self.LearningViewer = JTabbedPane()
self.DifferentialViewer = JTabbedPane()
self._libraryTabs.addTab("Learning", self.LearningViewer)
self._libraryTabs.addTab(
"Differential Learning",
self.DifferentialViewer)
TreesViewer = LibraryTable(
self, model=LibraryTableModel(
self._db, "Tree"))
ScrollTreesViewer = JScrollPane(TreesViewer)
TreesViewer.redrawTable()
self._libraryTabs.addTab("Tree", ScrollTreesViewer)
self._callbacks.customizeUiComponent(self._libraryTabs)
return self.LearningViewer, self.DifferentialViewer, TreesViewer
示例2: createLibrarySubSubTabs
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def createLibrarySubSubTabs(self, jtabbedpane, subcategory):
RegexesViewer = LibraryTable(
self, model=LibraryTableModel(
self._db, "Regex", subcategory))
# RegexesViewer.setAutoCreateRowSorter()
ScrollRegexesViewer = JScrollPane(RegexesViewer)
RegexesViewer.redrawTable()
GrammarsViewer = LibraryTable(
self, model=LibraryTableModel(
self._db, "Grammar", subcategory + 1))
# GrammarsViewer.setAutoCreateRowSorter()
ScrollGrammarsViewer = JScrollPane(GrammarsViewer)
GrammarsViewer.redrawTable()
jtabbedpane.addTab("Regex", ScrollRegexesViewer)
jtabbedpane.addTab("Grammar", ScrollGrammarsViewer)
self._callbacks.customizeUiComponent(jtabbedpane)
return RegexesViewer, GrammarsViewer
示例3: createSettingsTabs
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def createSettingsTabs(self):
settignsTabs = JTabbedPane()
self.ServerViewer = SettingsTable(
self, model=SettingsTableModel(
self._db, "Browser"))
ScrollServerViewer = JScrollPane(self.ServerViewer)
self.ServerViewer.redrawTable()
self.MysqlViewer = SettingsTable(
self, model=SettingsTableModel(
self._db, "MySQL"))
ScrollMysqlViewer = JScrollPane(self.MysqlViewer)
self.MysqlViewer.redrawTable()
self.LearningViewer = SettingsTable(
self, model=SettingsTableModel(
self._db, "Learning"))
ScrollLearningViewer = JScrollPane(self.LearningViewer)
self.LearningViewer.redrawTable()
settignsTabs.addTab("Web Browser", ScrollServerViewer)
settignsTabs.addTab("MySQL Client", ScrollMysqlViewer)
settignsTabs.addTab("Learning", ScrollLearningViewer)
self._callbacks.customizeUiComponent(settignsTabs)
# TODO: consider adding the results when clicking the tab (lazy
# instantiation) since it can get slow
return settignsTabs
示例4: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def __init__(self, extender):
# Initialize self
super(MainPanel, self).__init__()
self.extender = extender
self.setLayout(BorderLayout())
self.setBorder(BorderFactory.createLineBorder(Color.BLACK));
# Create children
self.tree = ResultTree(extender)
# Add children
self.add(JScrollPane(self.tree), BorderLayout.CENTER)
示例5: createLibrarySubSubTabs2
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def createLibrarySubSubTabs2(self, jtabbedpane, subcategory):
RegexesViewer = LibraryTable(
self, model=LibraryTableModel(
self._db, "Regex", subcategory))
ScrollRegexesViewer = JScrollPane(RegexesViewer)
RegexesViewer.redrawTable()
jtabbedpane.addTab("Regex", ScrollRegexesViewer)
self._callbacks.customizeUiComponent(jtabbedpane)
return RegexesViewer, None
示例6: createAnyTable
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def createAnyTable(self, table_model, table_number, min_size):
_table = JTable(table_model)
_table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS)
for i in range(2):
column = _table.getColumnModel().getColumn(i)
if i == 0:
column.setPreferredWidth(250)
else:
column.setPreferredWidth(50)
_scrolltable = JScrollPane(_table)
_scrolltable.setMinimumSize(min_size)
return _scrolltable
示例7: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def __init__(self, callbacks, bottom_pane, log):
self.logTable = UiLogTable(callbacks, bottom_pane, log.gui_log)
scrollPane = JScrollPane(self.logTable)
self.addTab("Repo", scrollPane)
callbacks.customizeUiComponent(self)
示例8: __init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def __init__(self, burp_callbacks):
self._burp_callbacks = burp_callbacks
self._type_list_component = JList(blackboxprotobuf.known_messages.keys())
self._type_list_component.setSelectionMode(ListSelectionModel.SINGLE_SELECTION)
self._component = JSplitPane(JSplitPane.HORIZONTAL_SPLIT)
self._component.setLeftComponent(JScrollPane(self._type_list_component))
self._component.setRightComponent(self.createButtonPane())
self._component.setResizeWeight(0.9)
示例9: initUI
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def initUI(self):
self.tab = swing.JPanel()
# UI for Output
self.outputLabel = swing.JLabel("LinkFinder Log:")
self.outputLabel.setFont(Font("Tahoma", Font.BOLD, 14))
self.outputLabel.setForeground(Color(255,102,52))
self.logPane = swing.JScrollPane()
self.outputTxtArea = swing.JTextArea()
self.outputTxtArea.setFont(Font("Consolas", Font.PLAIN, 12))
self.outputTxtArea.setLineWrap(True)
self.logPane.setViewportView(self.outputTxtArea)
self.clearBtn = swing.JButton("Clear Log", actionPerformed=self.clearLog)
self.exportBtn = swing.JButton("Export Log", actionPerformed=self.exportLog)
self.parentFrm = swing.JFileChooser()
# Layout
layout = swing.GroupLayout(self.tab)
layout.setAutoCreateGaps(True)
layout.setAutoCreateContainerGaps(True)
self.tab.setLayout(layout)
layout.setHorizontalGroup(
layout.createParallelGroup()
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup()
.addComponent(self.outputLabel)
.addComponent(self.logPane)
.addComponent(self.clearBtn)
.addComponent(self.exportBtn)
)
)
)
layout.setVerticalGroup(
layout.createParallelGroup()
.addGroup(layout.createParallelGroup()
.addGroup(layout.createSequentialGroup()
.addComponent(self.outputLabel)
.addComponent(self.logPane)
.addComponent(self.clearBtn)
.addComponent(self.exportBtn)
)
)
)
示例10: __private_init__
# 需要导入模块: from javax import swing [as 别名]
# 或者: from javax.swing import JScrollPane [as 别名]
def __private_init__(self, text="Property Editor", columns=None, data=None, empty=None, add_actions=True, actions=None):
if not actions: actions = []
if not columns: columns = []
if data == None: data = []
if not empty: empty = []
self._text = text
self.this = JFrame(text)
self._table = JTable()
self._dtm = DefaultTableModel(0, 0)
self._dtm.setColumnIdentifiers(columns)
self._table.setModel(self._dtm)
self._data = data
for d in data:
self._dtm.addRow(d)
self._pane = JScrollPane(self._table)
self.this.add(self._pane)
self._empty = empty
self.this.addWindowListener(self)
self._dtm.addTableModelListener(lambda _: self._update_model())
self.this.setLocation(PropertyEditor.NEW_WINDOW_OFFSET, PropertyEditor.NEW_WINDOW_OFFSET)
if add_actions:
self._popup = JPopupMenu()
self._pane.setComponentPopupMenu(self._popup)
inherits_popup_menu(self._pane)
self._actions = actions
self._actions.append(ExecutorAction('Remove Selected Rows', action=lambda e: self._remove_row()))
self._actions.append(ExecutorAction('Add New Row', action=lambda e: self._add_row()))
for action in self._actions:
self._popup.add(action.menuitem)
self.this.setForeground(Color.black)
self.this.setBackground(Color.lightGray)
self.this.pack()
self.this.setVisible(True)
self.this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE)
return self