本文整理汇总了Java中org.jdesktop.swingx.JXTreeTable.setName方法的典型用法代码示例。如果您正苦于以下问题:Java JXTreeTable.setName方法的具体用法?Java JXTreeTable.setName怎么用?Java JXTreeTable.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXTreeTable
的用法示例。
在下文中一共展示了JXTreeTable.setName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startViewer
import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
protected void startViewer(final ViewProcessor viewProcessor) {
final UserPrincipal user = UserPrincipal.getLocalUser();
final ViewClient viewClient = viewProcessor.createViewClient(user);
final PortfolioTreeTableModel treeTableModel = buildTreeTableModel();
viewClient.setResultListener(treeTableModel);
viewClient.attachToViewProcess(viewProcessor.getConfigSource().getSingle(ViewDefinition.class, "Equity Portfolio View", VersionCorrection.LATEST).getUniqueId(),
ExecutionOptions.infinite(MarketData.live()));
getMainFrame().setTitle("OpenGamma Viewer");
final JXTreeTable treeTable = new JXTreeTable(treeTableModel);
treeTable.setName("table");
treeTable.setRootVisible(true);
treeTable.setFillsViewportHeight(true);
treeTable.setAutoResizeMode(JXTreeTable.AUTO_RESIZE_ALL_COLUMNS);
treeTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
final JScrollPane scrollPane = new JScrollPane(treeTable);
final JPanel panel = new JPanel(new BorderLayout());
panel.add(scrollPane, BorderLayout.CENTER);
final JPanel topLevelPanel = new JPanel(new BorderLayout());
topLevelPanel.add(panel, BorderLayout.CENTER);
show(topLevelPanel);
}
示例2: initComponents
import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
private void initComponents() {
treeTable = new JXTreeTable();
treeTable.setName("componentTreeTable");
add(new JScrollPane(treeTable));
JComponent control = new JXPanel();
refreshButton = new JButton();
refreshButton.setName("refreshButton");
expandButton = new JButton();
expandButton.setName("expandTreeTableButton");
collapseButton = new JButton();
collapseButton.setName("collapseTreeTableButton");
// control.add(refreshButton);
control.add(expandButton);
control.add(collapseButton);
add(control, BorderLayout.SOUTH);
}
示例3: initComponents
import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
private void initComponents() {
setTitle("Component Tree");
// add treeTable
treeTable = new JXTreeTable();
treeTable.setName("componentTreeTable");
JScrollPane treeScrollPane = new JScrollPane(treeTable);
treeScrollPane.setPreferredSize(new Dimension(300, 300));
add(treeScrollPane);
// add control buttons
JPanel control = new JPanel();
refreshButton = new JButton("Refresh");
expandButton = new JButton("Expand tree");
collapseButton = new JButton("Collapse tree");
highlight = new JToggleButton("Highlight");
showOnlyEvent = new JToggleButton("Show only events");
commandField = new JTextField(8);
runCommandButton = new JButton("Run CMD");
control.add(refreshButton);
control.add(expandButton);
control.add(collapseButton);
control.add(highlight);
control.add(showOnlyEvent);
control.add(commandField);
control.add(runCommandButton);
add(control, BorderLayout.SOUTH);
}