本文整理了Java中javax.swing.JTree.setMaximumSize()
方法的一些代码示例,展示了JTree.setMaximumSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.setMaximumSize()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:setMaximumSize
暂无
代码示例来源:origin: pl.touk/test-generator
private void createTree()
{
DefaultMutableTreeNode top = new DefaultMutableTreeNode("TestGenerator");
createNodes(top);
tree = new JTree(top);
tree.setCellRenderer(new AssertionTreeCellRenderer());
tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
tree.addTreeSelectionListener(new TreeChangeListener());
// tree.setSize(new Dimension(300, 400));
int height = (result.getTestCases().size())*(result.getTestCases().get(0).getTestSteps().size()*30);
tree.setPreferredSize(new Dimension(200, height));
tree.setMinimumSize(new Dimension(150, 500));
tree.setMaximumSize(new Dimension(800, Integer.MAX_VALUE));
treeView = new JScrollPane(tree);
treeView.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
treeView.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
}
代码示例来源:origin: ontop/ontop
treSavedQuery.setModel(queryControllerModel);
treSavedQuery.setCellRenderer(new SavedQueriesTreeCellRenderer());
treSavedQuery.setMaximumSize(new java.awt.Dimension(5000, 5000));
treSavedQuery.setRootVisible(false);
treSavedQuery.addMouseListener(new java.awt.event.MouseAdapter() {
代码示例来源:origin: gurkenlabs/litiengine
this.tree.setMaximumSize(new Dimension(0, 250));
内容来源于网络,如有侵权,请联系作者删除!