Package javax.swing.event

Examples of javax.swing.event.ListSelectionListener


  }

  private JList getAnnotationTypeList() {
    if (_annotationTypeList == null) {
      _annotationTypeList = ListFacade.createList(AnnotationType.values());
      _annotationTypeList.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(final ListSelectionEvent e) {
          if (!e.getValueIsAdjusting()) {
            getAnnotationTypePanel().setAnnotationType((AnnotationType) _annotationTypeList.getSelectedValue());
          }
        }
View Full Code Here


        public void mouseMoved(final MouseEvent e) {
          locationToListIndex(e);
        }
      });

      _list.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(final ListSelectionEvent e) {
          if (e.getValueIsAdjusting()) {
            return;
          }
View Full Code Here

          }
        }
      });

      final ListSelectionModel selectionModel = _detectorsTable.getSelectionModel();
      selectionModel.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(final ListSelectionEvent e) {
          if (!e.getValueIsAdjusting() && _detectorsTable.getSelectedRow() > -1) {
            final int modelIndex = _tableSorter.modelIndex(_detectorsTable.getSelectedRow());
            final DetectorFactory detectorFactory = _bugPatternModel.getEntries().get(modelIndex);
            final String description = getDetailedText(detectorFactory);
View Full Code Here

                if (e.getClickCount() == 2) {
                    select();
                }
            }
        });
        workItemsList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                selectButton.setEnabled(getSelectedWorkItem() != null);
            }
        });
        reloadWorkItemsList();
View Full Code Here

        c.insets = new Insets(5, 5, 5, 5);
        resultPanel.add(addResultButton, c);
       
        resultList = new JList();
        resultList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        resultList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                removeResultButton.setEnabled(resultList.getSelectedIndex() != -1);
            }
        });
        c = new GridBagConstraints();
View Full Code Here

                if (e.getClickCount() == 2) {
                    select();
                }
            }
        });
        workItemsList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                selectButton.setEnabled(getSelectedWorkItem() != null);
            }
        });
        c = new GridBagConstraints();
View Full Code Here

      String disp = getDisplayString(row);
      model.addElement(disp);
      dataMap.put(disp, row);
    }

    jl.addListSelectionListener(new ListSelectionListener() {
      @Override
      public void valueChanged(ListSelectionEvent e) {
        if(changesMade()) {
          int option = JOptionPane.showConfirmDialog(
              jf,
View Full Code Here

       
        lm = new DefaultListModel();
        rebuildAccounts();
       
        lstAccounts = new JList(lm);
        lstAccounts.addListSelectionListener(new ListSelectionListener() {
          public void valueChanged(ListSelectionEvent e) {
            String s = (String)lstAccounts.getSelectedValue();
            if(s == null)
              return;
           
View Full Code Here

       
        lm = new DefaultListModel();
        rebuildRanks();
       
        lstRanks = new JList(lm);
        lstRanks.addListSelectionListener(new ListSelectionListener() {
          public void valueChanged(ListSelectionEvent e) {
            String s = (String)lstRanks.getSelectedValue();
            if(s == null)
              return;
           
View Full Code Here

        if (mainTable.getColumnSelectionAllowed()) {

            mainTable.setColumnSelectionAllowed(true);
            ListSelectionModel colSM =
                    mainTable.getColumnModel().getSelectionModel();
            colSM.addListSelectionListener(new ListSelectionListener() {

                @Override
                public void valueChanged(ListSelectionEvent e) {
                    //Ignore extra messages.
                    if (e.getValueIsAdjusting()) {
View Full Code Here

TOP

Related Classes of javax.swing.event.ListSelectionListener

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.