Package javax.swing.event

Examples of javax.swing.event.TreeSelectionListener


    // create the popup
    final JPopupMenu popup = new JTreePopupMenu(tree);

    // respond when the user chooses a class
    tree.addTreeSelectionListener(new TreeSelectionListener() {
  public void valueChanged(TreeSelectionEvent e) {
    GOETreeNode node = (GOETreeNode) tree.getLastSelectedPathComponent();
   
    if (node == null)
      return;
View Full Code Here


            public void projectInvoked(ProjectView project) {
                executeDefaultTasksInProject(project);
            }
        });

        treeComponent.getTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                enableThingsAppropriately();
            }
        });
View Full Code Here

  public Tree(Widget parent, String name) throws GUIException {
    super(parent, name);

    tree = new JTree(rootNode);
    tree.addTreeSelectionListener(new TreeSelectionListener() {
      public void valueChanged(TreeSelectionEvent e) {
        if (sendEvents) {
          try {
            sendEvents = false;
            processEvents = false;
View Full Code Here

        tree.getSelectionModel()
                .setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        tree.setVisibleRowCount(10);

        // Listen for when the selection changes.
        tree.addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                DefaultMutableTreeNode node = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();

                if (node == null)
                    return;
View Full Code Here

                    }
                }
            }
        });
       
        filteredSourceTree.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                Object o =  filteredSourceTree.getSelectedSourceOrCollection();
                filteredSourceTree.getSourceTree().removeTreeSelectionListener(this);
                if ((o instanceof DataSource) && e.isAddedPath()) {
                    tfAlias.setEnabled(true);
View Full Code Here

            }
        });
*/
       
        // Now set the correct button states
        sourceTree.addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                Object o = ExpressionPanel.this.sourceTree.getSelectedSourceOrCollection();
                if ((o!=null) && (o instanceof ExpressionDataSource)) {
                    //delExp.setEnabled(true);
                    tfNewSourceName.setText(DataInfo.getLabel(o));
View Full Code Here

                        }
                        TreeNode tn = (TreeNode) (st.getSelectionPath().getLastPathComponent());
                        ((DefaultTreeModel) (st.getModel())).nodeChanged(tn);
                    }
                });
                st.addTreeSelectionListener(new TreeSelectionListener() {
                    public void valueChanged(TreeSelectionEvent e) {
                        Object o = st.getSelectedSourceOrCollection();
                        if ((o instanceof DataSource) && e.isAddedPath()) {
                            VariableConflict vc = (VariableConflict) list.getSelectedValue();
                            vc.ds = (DataSource) o;
View Full Code Here

        cmDelete = new JButton(resources.getString("Delete"));
        cmDuplicate = new JButton(resources.getString("Duplicate"));
        dsLabel = new JLabel(resources.getString("ChooseADataSource"));
        lds = new JLabel();
        dstree = FilteredSourceTree.getFromPool("PropertiesPanel0");
        dstree.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
                if (((dstree.getSelectedSourceOrCollection()) instanceof DataSource)
                        && canSetDataSource((DataSource) dstree.getSelectedSourceOrCollection())) {
                    lds.setText(DataInfo.getId(dstree.getSelectedSourceOrCollection()));
View Full Code Here

        cmlist = new JList();
        cmlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        cmlist.setVisibleRowCount(5);

        dstree = FilteredSourceTree.getFromPool("PropertiesPanel0");
        dstree.getSourceTree().addTreeSelectionListener(new TreeSelectionListener() {
            public void valueChanged(TreeSelectionEvent e) {
                updateWarnings();
                if (((dstree.getSelectedSourceOrCollection()) instanceof DataSource)
                        && canSetDataSource((DataSource) dstree.getSelectedSourceOrCollection())) {
                    ldynamicDsId.setText(DataInfo.getId(dstree.getSelectedSourceOrCollection()));
View Full Code Here

      panel.add(dslistScrollPane);
      panel.setBorder(BorderFactory.createTitledBorder(resources.getString("DataSource")));
      box.add(panel);
      dstree.setSelectedValue(sourceCopy);
      dstree.removeAllTreeSelectionListeners();
      dstree.addTreeSelectionListener(new TreeSelectionListener() {
        public void valueChanged(TreeSelectionEvent e) {
          if (!e.isAddedPath()) return;
          Object o = dstree.getSelectedSourceOrCollection();
          if (o instanceof DataSource) sourceCopy = (DataSource)o;
        }
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.