Package javax.swing.tree

Examples of javax.swing.tree.DefaultTreeCellRenderer


    this.indexTree.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2));
    // Only one node can be selected at any one time.
    this.indexTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    this.indexTree.addTreeSelectionListener(new IndexTreeSelectionListener(this));
    // No icons.
    DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer();
    cellRenderer.setLeafIcon(null);
    // cellRenderer.setIcon(null);
    cellRenderer.setClosedIcon(null);
    cellRenderer.setOpenIcon(null);
    this.indexTree.setCellRenderer(cellRenderer);
  }
View Full Code Here


    this.fsTree.setBorder(BorderFactory.createEmptyBorder(2, 4, 2, 2));
    this.fsTree.setLargeModel(true);
    // Only one node can be selected at any one time.
    this.fsTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    this.fsTree.addTreeSelectionListener(new FSTreeSelectionListener(this));
    DefaultTreeCellRenderer cellRenderer = new DefaultTreeCellRenderer();
    cellRenderer.setLeafIcon(null);
    // cellRenderer.setIcon(null);
    cellRenderer.setClosedIcon(null);
    cellRenderer.setOpenIcon(null);
    this.fsTree.setCellRenderer(cellRenderer);
  }
View Full Code Here

     * Create the tree cell renderer used to draw the nodes in the test tree.
     *
     * @return a renderer to draw the test tree nodes
     */
    private TreeCellRenderer getCellRenderer() {
        DefaultTreeCellRenderer rend = new JMeterCellRenderer();
        rend.setFont(new Font("Dialog", Font.PLAIN, 11));
        return rend;
    }
View Full Code Here

        else {
          tree.collapseRow(0);
        }
        tree.setOpaque(false);
        tree.setRowHeight(table.getRowHeight());
        tree.setCellRenderer(new DefaultTreeCellRenderer() {
          @Override
          public Color getBackground() {
            return null;
          }
          @Override
View Full Code Here

        else {
          tree.collapseRow(0);
        }
        tree.setOpaque(false);
        tree.setRowHeight(table.getRowHeight());
        tree.setCellRenderer(new DefaultTreeCellRenderer() {
          @Override
          public Color getBackground() {
            return null;
          }
          @Override
View Full Code Here

    private OutlineFieldJLabel[] cachedJLabels;

    public OutlineFieldCellRenderer(OutlineField pParent) {
        this.parent = pParent;
        this.hasRowHighlights = true;
        this.defaultTreeRenderer = new DefaultTreeCellRenderer();
        this.panel = new JPanel();
        this.panel.setLayout(new GridBagLayout());
        this.cachedJLabels = null;
    }
View Full Code Here

     * Create the tree cell renderer used to draw the nodes in the test tree.
     *
     * @return a renderer to draw the test tree nodes
     */
    private TreeCellRenderer getCellRenderer() {
        DefaultTreeCellRenderer rend = new JMeterCellRenderer();
        rend.setFont(new Font("Dialog", Font.PLAIN, 11));
        return rend;
    }
View Full Code Here

    private OutlineFieldJLabel[] cachedJLabels;

    public OutlineFieldCellRenderer(OutlineField pParent) {
        this.parent = pParent;
        this.hasRowHighlights = true;
        this.defaultTreeRenderer = new DefaultTreeCellRenderer();
        this.panel = new JPanel();
        this.panel.setLayout(new GridBagLayout());
        this.cachedJLabels = null;
    }
View Full Code Here

   * This method initializes this
   *
   */
  private void initialize() {
    // Graphic settings
    renderer = new DefaultTreeCellRenderer();
    renderer.setLeafIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/item.png")));
      renderer.setClosedIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/folder_blue.png")));
      renderer.setOpenIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/folder_blue_open.png")));
     
    this.setLayout(new BorderLayout());
View Full Code Here

   * This method initializes this
   *
   */
  private void initialize() {
    // Graphic settings
    renderer = new DefaultTreeCellRenderer();
      renderer.setLeafIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/creation.png")));
      renderer.setClosedIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/folder_blue.png")));
      renderer.setOpenIcon(new ImageIcon(this.getClass().getClassLoader().getResource("images/folder_blue_open.png")));
   
    this.setLayout(new BorderLayout());
View Full Code Here

TOP

Related Classes of javax.swing.tree.DefaultTreeCellRenderer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.