Package javax.swing.event

Examples of javax.swing.event.ListSelectionListener


    for (Exclusion exclusion : exclusions) {
      listModel.addElement(exclusion);
    }
    mExclusionsList.setCellRenderer(new ExclusionListCellRenderer());
   
    mExclusionsList.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        if (!e.getValueIsAdjusting()) {
          updateExclusionListButtons();
        }
      }
View Full Code Here


    final SelectionListener controllerSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent ev) {
          setSelectedFurniture(controller.getSelectedFurniture());       
        }
      };
    this.tableSelectionListener = new ListSelectionListener () {
        public void valueChanged(ListSelectionEvent ev) {
          if (!ev.getValueIsAdjusting()) {
            controller.removeSelectionListener(controllerSelectionListener);
            int [] selectedRows = getSelectedRows();
            // Build the list of selected furniture
View Full Code Here

  public void actionPerformed(ActionEvent e) {
    applyFilter((Filter) m_FilterEditor.getValue());
  }
      });
    m_AttPanel.getSelectionModel()
      .addListSelectionListener(new ListSelectionListener() {
  public void valueChanged(ListSelectionEvent e) {
    if (!e.getValueIsAdjusting()) {   
      ListSelectionModel lm = (ListSelectionModel) e.getSource();
      for (int i = e.getFirstIndex(); i <= e.getLastIndex(); i++) {
        if (lm.isSelectedIndex(i)) {
View Full Code Here

    ListDragAndDropHandler dnDHandler = new ListDragAndDropHandler(mList,
        mList, this);
    new DragAndDropMouseListener(mList, mList, this, dnDHandler);

    mList.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        if (!disableSync) {
          showChannel();
        }
        disableSync  = false;
View Full Code Here

          mList.removeElement(item);
        }
      };
    });

    mList.getList().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(javax.swing.event.ListSelectionEvent e) {
        Object[] items = mList.getList().getSelectedValues();
        if (items.length == 0) {
          garbage.setEnabled(false);
          return;
View Full Code Here

      buttonPanel.add(mDelete, cc.xy(5,1));

      pb.add(buttonPanel, cc.xy(2,5));
      pb.addLabel(mLocalizer.msg("help","<html>This list of formating can be used by several plugins. So a formating don't have to be entered in every plugin that should use the formating. The selection of the formating can be done in the settings of the plugin.</html>"), cc.xy(2,7));

      mConfigurations.getList().addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
          if(!e.getValueIsAdjusting()) {
            mEdit.setEnabled(mConfigurations.getList().getSelectedIndex() != -1);
            mDelete.setEnabled(mConfigurations.getList().getSelectedIndex() != -1);
          }
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        configChannels();
      }
    });

    mSubscribedChannels.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        if (mSubscribedChannels.getSelectedValues().length > 0) {
          configureChannels.setEnabled(true);
        } else {
          configureChannels.setEnabled(false);
View Full Code Here

    tabbedPane.add(mLocalizer.msg("datalevel", "data level"), levelList.getPanel());
    tabbedPane.add(mLocalizer.msg("channelgroups", "channel groups"), groupListPanel.getPanel());

    add(tabbedPane, cc.xy(1,1));

    mGroupList.addListSelectionListener(new ListSelectionListener() {

      public void valueChanged(ListSelectionEvent arg0) {
        mRemoveBtn.setEnabled(mGroupList.getSelectedIndex() >= 0);
        mInfoBtn.setEnabled(mGroupList.getSelectedIndex() >= 0);
        TvBrowserDataServiceChannelGroup group = (TvBrowserDataServiceChannelGroup) mGroupList.getSelectedValue();
View Full Code Here

    mLeftListModel = new DefaultListModel();
    mLeftList = new JList(mLeftListModel);
    mLeftList.setVisibleRowCount(10);
    mLeftList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    mLeftList.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent evt) {
        updateEnabled();
      }
    });

    mRightListModel = new DefaultListModel();
    mRightList = new JList(mRightListModel);
    mRightList.setVisibleRowCount(10);
    mRightList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    mRightList.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent evt) {
        updateEnabled();
      }
    });

    mLeftList.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        fireLeftListSelectionChanged(e);
      }
    }
    );

    mRightList.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        fireRightListSelectionChanged(e);
      }
    }
    );
View Full Code Here

   
    for (Object object : objects) {
      mListModel.addElement(object);
    }
   
    mList.addListSelectionListener(new ListSelectionListener(){
      public void valueChanged(ListSelectionEvent e) {
        updateBtns();
      }
    });
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.