Package javax.swing.event

Examples of javax.swing.event.TreeSelectionListener


        intPanel = new InterfacesPanel();
        underIntPanel.add(intPanel);
        underReflectionPanel.setLayout(new BorderLayout());
        reflectionPanel = new ReflectionPanel();
        underReflectionPanel.add(reflectionPanel, BorderLayout.CENTER);
        controlTree.addTreeSelectionListener(new TreeSelectionListener() {

            public void valueChanged(TreeSelectionEvent arg0) {
                try {
                    MyTreeNode selected = (MyTreeNode) arg0.getPath().getLastPathComponent();
                    propPanel.setWrap(selected.getWrap());
View Full Code Here


        }
      }).toArray(new HaxeNamedElementNode[candidates.size()]), false, true, project, false) {

      protected void init() {
        super.init();
        myTree.addTreeSelectionListener(new TreeSelectionListener() {
          public void valueChanged(final TreeSelectionEvent e) {
            setOKActionEnabled(myTree.getSelectionCount() > 0);
          }
        });
      }
View Full Code Here


  private Component generateComponent() {
    this.tree_documents = new Tree(this.documentContainer, this.that.visualRifEditor);

    this.tree_documents.addTreeSelectionListener(new TreeSelectionListener() {


      @Override
      public void valueChanged(final TreeSelectionEvent tse) {
View Full Code Here

  }


  private JPanel generateTopComponent() {
    this.tree_rulePackages = new Tree(this.rulePackageContainer, that.editor);
    this.tree_rulePackages.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent tse) {
        if(tse.isAddedPath()) {
          that.tree_unassigned.deSelect();
          that.currentTree = that.tree_rulePackages;
          that.ruleContainer.cancelModi();
View Full Code Here

  }


  private JPanel generateBottomComponent() {
    this.tree_unassigned = new Tree(this.ruleContainer, that.editor);
    this.tree_unassigned.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent tse) {
        if(tse.isAddedPath()) {
          that.tree_rulePackages.deSelect();
          that.moveRulePanel.disableButtons();
          that.currentTree = that.tree_unassigned;
View Full Code Here

        m_subtreeTreeModel=new SubtreeTreeModel(debugger,rootNode);
        m_tableauTree=new JTree(m_subtreeTreeModel);
        m_tableauTree.setLargeModel(true);
        m_tableauTree.setShowsRootHandles(true);
        m_tableauTree.setCellRenderer(new NodeCellRenderer(debugger));
        m_tableauTree.addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                TreePath selectionPath=m_tableauTree.getSelectionPath();
                if (selectionPath==null)
                    showNodeLabels(null);
                else
View Full Code Here

        return path == null
                ? null : ((DefaultMutableTreeNode) path.getLastPathComponent()).getUserObject();
    }

    private TreeSelectionListener createTreeSelectionListener() {
        return new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                fireSourceListItemSelected(getSelectedItem());
            }
        };
    }
View Full Code Here

    JScrollPane treePane = new JScrollPane(mainTree);
    leftPanel.add(treePane);
    leftPanel.setPreferredSize(MAIN_TREE_SIZE);
    content.add(leftPanel, BorderLayout.WEST);
    mainTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    mainTree.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent e) {
        nodeChangedAction();
      }
    });
    mainTree.setModel(inspectorModel.getMainTreeModel());
View Full Code Here

    public StructureTab() {
        this.setLayout(new BorderLayout());
        this.add(new JScrollPane(this.tree), BorderLayout.CENTER);
       
        this.tree.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent e) {
        splitSynchronize();
      }
        });
View Full Code Here

      final JideMenu addToSessionItem = new JideMenu("Add to");
      final JMenuItem createContextItem = new JMenuItem(ActionRegistry.getAction(CreateNewJNDIContextAction.class));
      final JMenuItem renameBindingItem = new JMenuItem(ActionRegistry.getAction(RenameJNDIBindingAction.class));
      final JMenuItem unbindItem = new JMenuItem(ActionRegistry.getAction(JNDIUnbindAction.class));

      contextTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener()
      {
         public void valueChanged(TreeSelectionEvent e)
         {
            if (e.getNewLeadSelectionPath() == null)
            {
               addToSessionItem.setEnabled(false);
            }
            else
            {
               final TreeNode node = (TreeNode) e.getNewLeadSelectionPath().getLastPathComponent();

               addToSessionItem.setEnabled(node instanceof QueueTreeNode || node instanceof TopicTreeNode || node instanceof QueueTopicTreeNode);
            }
         }
      });

      addToSessionItem.addMouseListener(new MouseAdapter()
      {
         public void mouseEntered(MouseEvent e)
         {
            addToSessionItem.removeAll();

            for (final String sessionId : HermesBrowser.getBrowser().getBrowserTree().getAllHermesIds())
            {
               final JMenuItem menuItem = new JMenuItem(sessionId);

               // Cascade the enabled state down to the menu items from the
               // addToSessionItem...

               addToSessionItem.addPropertyChangeListener("enabled", new PropertyChangeListener()
               {
                  public void propertyChange(PropertyChangeEvent evt)
                  {
                     menuItem.setEnabled((Boolean) evt.getNewValue());
                  }
               });

               addToSessionItem.add(menuItem);

               menuItem.addActionListener(new ActionListener()
               {
                  public void actionPerformed(ActionEvent e)
                  {
                     HermesBrowser.getBrowser().getBrowserTree().doTransfer(
                           new JMSAdministeredObjectTransferable(new HermesConfigGroup(sessionId, contextTree.getSelectedDestinations(), contextTree
                                 .getSelectedConnectionFactories())), TransferHandler.COPY);
                  }
               });

               contextTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener()
               {
                  public void valueChanged(TreeSelectionEvent e)
                  {
                     if (e.getNewLeadSelectionPath() != null)
                     {
View Full Code Here

TOP

Related Classes of javax.swing.event.TreeSelectionListener

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.