Package javax.swing.event

Examples of javax.swing.event.ListSelectionListener


        TableColumn parameterNameCol = tblParameters.getColumnModel().getColumn(1);
        parameterNameCol.setPreferredWidth(190);
        ListSelectionModel selectionModel = tblParameters.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        selectionModel.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                btnDeleteParameter.setEnabled(tblParameters.getSelectedRows().length > 0);
            }

        });
View Full Code Here


              engine.getGUI().getErrorWindow().error("Error while creating descriptors", e1);
              e1.printStackTrace();
            }
            }
        });
        descriptorList.addListSelectionListener(new ListSelectionListener(){
      public void valueChanged(ListSelectionEvent e) {
        boolean isSelected=descriptorList.getSelectedIndex()!=-1;
        editButton.setEnabled(isSelected);
        removeButton.setEnabled(isSelected);
      }
View Full Code Here

  {
    if (contentPane == null)
    {
      jList = new JList();

      jList.addListSelectionListener(new ListSelectionListener()
      {
        public void valueChanged(ListSelectionEvent e)
        {
          fireValueChanged(e, jList.getSelectedValue());
        }
View Full Code Here

  private JList mList; /*instantiated by swixml when rendering the UI */

  private HelloList() throws Exception {
    new SwingEngine( this ).render( "./xml/hellolist.xml" ).setVisible( true );
    System.out.println( mList.size() )
    mList.addListSelectionListener( new ListSelectionListener() {
      public void valueChanged( final ListSelectionEvent e) {
          System.out.println( mList.getSelectedValue() )
      }
    });
  }
View Full Code Here

    }

    private void registerSelectionListener(Searchable searchable) {
        if (searchable.getComponent() instanceof JList) {
            final JList list = (JList) getSearchable().getComponent();
            list.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    int index = list.getSelectedIndex();
                    if (index != -1) {
                        getTextComponent().setText(getSearchable().convertElementToString(list.getModel().getElementAt(index)));
                        highlightCompletedText(0);
View Full Code Here

            new JButton(LOCALE.get("ImageSelectorSearchOption"));
        final JButton cancel =
            new JButton(LOCALE.get("ImageSelectorCancelOption"));

        list.addListSelectionListener(
            new ListSelectionListener() {
                public void valueChanged(ListSelectionEvent event) {
                    Object selection = list.getSelectedValue();
                    useThis.setEnabled(selection != null);
                }
            }
View Full Code Here

        selection.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

        undo.addUndoableEditListener(this);

        selection.addListSelectionListener(
            new ListSelectionListener() {
                public void valueChanged(ListSelectionEvent e) {
                    if (! isSelecting) {
                        if (! e.getValueIsAdjusting()) {
                            getComboFrame().getEditor().setMode( EditorMode.ARROW );
                            isEditing = true;
View Full Code Here

      actionTable.getSelectionModel().removeListSelectionListener(
          listener);
      listener = null;
    }
    actionTable.setModel(new ActionTableModel());
    listener = new ListSelectionListener() {
      @Override
      public void valueChanged(ListSelectionEvent e) {
        revertScriptAction();
      }
    };
View Full Code Here

    panel.add(connect = new JButton("Connect"));

    connect.addActionListener(this);

    mudListSelector.setVisibleRowCount(3);
    mudListSelector.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent evt) {
        JList list = (JList) evt.getSource();
  list.ensureIndexIsVisible(list.getSelectedIndex());
        String item = (String) list.getSelectedValue();
        mudName.setText(item);
View Full Code Here

    super(bus, id);

    urlPanel = new JPanel(new BorderLayout());
    urlList.setVisibleRowCount(4);
    urlList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    urlList.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        showURL((String) ((JList) e.getSource()).getSelectedValue());
      }
    });
    urlPanel.add("Center", urlList);
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.