Package javax.swing

Examples of javax.swing.JTree


    return scrollPane_6;
  }

  private JTree getGradientLibTree() {
    if (gradientLibTree == null) {
      gradientLibTree = new JTree();
      gradientLibTree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          if (tinaController != null) {
            tinaController.getGradientController().gradientTree_changed(e);
          }
View Full Code Here


    return flameBrowserTreeScrollPane;
  }

  private JTree getFlameBrowserTree() {
    if (flameBrowserTree == null) {
      flameBrowserTree = new JTree();
      flameBrowserTree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          if (tinaController != null) {
            tinaController.getFlameBrowserController().flamesTree_changed();
          }
View Full Code Here

    UIManager.put("Tree.leafIcon", empty);

    Tree parseTreeRoot = viewer.getTree().getRoot();
    TreeNodeWrapper nodeRoot = new TreeNodeWrapper(parseTreeRoot, viewer);
    fillTree(nodeRoot, parseTreeRoot, viewer);
    final JTree tree = new JTree(nodeRoot);
    tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

    tree.addTreeSelectionListener(new TreeSelectionListener() {
      @Override
      public void valueChanged(TreeSelectionEvent e) {

        JTree selectedTree = (JTree) e.getSource();
        TreePath path = selectedTree.getSelectionPath();
        TreeNodeWrapper treeNode = (TreeNodeWrapper) path.getLastPathComponent();

        // Set the clicked AST.
        viewer.setTree((Tree) treeNode.getUserObject());
      }
View Full Code Here

        }
    }

    private void initGUI() {
        this.treeModel = new ComponentTreeModel(new ComponentTreeNode("Components"));
        this.tree = new JTree(this.treeModel);

        // Add a tool tip.
        ToolTipManager.sharedInstance().registerComponent(this.tree);
        DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer() {
            @Override
View Full Code Here

        this.setLayout(new BorderLayout(0, 0));
        {
            JScrollPane scrollPane = new JScrollPane();
            this.add(scrollPane, BorderLayout.CENTER);
            {
                tree = new JTree(AiravataTreeNodeFactory.getTreeNode(getJCRRegistry() == null ? "No registry specified"
                         : getEngine(), null));
                tree.addKeyListener(new KeyAdapter() {
                    @Override
                    public void keyPressed(KeyEvent e) {
                        if (e.getKeyCode() == KeyEvent.VK_F5) {
View Full Code Here

        return TransferHandler.MOVE;
    }

    @Override
    protected Transferable createTransferable(JComponent c) {
        JTree tree = (JTree)c;
        DefaultMutableTreeNode selected =
                (DefaultMutableTreeNode )tree.getLastSelectedPathComponent();
        ResourceTransferable transferable = null;

        // check if the node is a lua script file or a resource
        if (selected.getUserObject() instanceof ResourceElement ||
                (selected.getUserObject() instanceof QuestTree.FileElement &&
View Full Code Here

     */
    public SpriteTree() {
        super(new GridBagLayout());

        // Left part: the tree.
        tree = new JTree();
        buildTree();
        tree.addTreeSelectionListener(this);

        JScrollPane scroller = new JScrollPane(tree);

View Full Code Here

    closeLogger.setVisible(false);
    topPanel.add(closeLogger, BorderLayout.EAST);
    add(topPanel, BorderLayout.NORTH);
    root = new DefaultMutableTreeNode();
    treeModel = new DefaultTreeModel(root);
    tree = new JTree(treeModel);
    tree.setRootVisible(false);
    tree.setEditable(false);
    tree.setExpandsSelectedPaths(true);
    tree.setShowsRootHandles(true);
    tree.setCellRenderer(new TreeRenderer());
View Full Code Here

    contentTable.getSelectionModel().addListSelectionListener(this);


    this.treeModel = typeSystem.getTreeModel();
        //  this.treeModel = typeSystem.createTreeModelRoot();
    treeView = new JTree(treeModel);
        //  treeView.addTreeExpansionListener(typeSystem.getTreeExpansionListener(this.treeModel));
    treeView.setRootVisible(true);
    treeView.setShowsRootHandles(true);
        //  treeView.setBackground(java.awt.Color.lightGray);
        //  treeView.setMinimumSize(new java.awt.Dimension(200,100));
View Full Code Here

    fetchImRInfo();

    m_top_node = new DefaultMutableTreeNode(m_imr_info);
    m_tree_model = new DefaultTreeModel(m_top_node, false);
    m_tree = new JTree(m_tree_model);

    m_server_model = new ImRServerTableModel(this);
    m_poa_model = new ImRPOATableModel();

    m_server_names = new Hashtable();
View Full Code Here

TOP

Related Classes of javax.swing.JTree

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.