javax.swing.JTree.setMaximumSize()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中javax.swing.JTree.setMaximumSize()方法的一些代码示例,展示了JTree.setMaximumSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.setMaximumSize()方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:setMaximumSize

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));

相关文章

JTree类方法