Package javax.swing.event

Examples of javax.swing.event.ListSelectionListener


          TextureChoiceComponent.class, "availableTexturesLabel.text"));
      this.availableTexturesList = new JList(createListModel(preferences.getTexturesCatalog()));
      this.availableTexturesList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      this.availableTexturesList.setCellRenderer(new TextureListCellRenderer());
      this.availableTexturesList.getSelectionModel().addListSelectionListener(
          new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent ev) {
              CatalogTexture selectedTexture = (CatalogTexture)availableTexturesList.getSelectedValue();
              setPreviewTexture(selectedTexture);
              if (modifyTextureButton != null) {
                modifyTextureButton.setEnabled(selectedTexture != null && selectedTexture.isModifiable());
View Full Code Here


    final SelectionListener modelSelectionListener = new SelectionListener() {
        public void selectionChanged(SelectionEvent selectionEvent) {
          updateListSelectedFurniture(catalog, controller);       
        }
      };
    this.listSelectionListener = new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent ev) {         
          // Updates selected furniture in catalog from selected nodes in tree.
          controller.removeSelectionListener(modelSelectionListener);
          controller.setSelectedFurniture(getSelectedFurniture());
          controller.addSelectionListener(modelSelectionListener);
View Full Code Here

        pluginsListPanel.setBorder(new EmptyBorder(3, 3, 3, 3));

        pluginListModel = new PluginListModel();
        pluginsList = new WHList(pluginListModel);
        pluginsList.setCellRenderer(new PluginListCellRenderer());
        pluginsList.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                updateControls();
            }
        });
        pluginsList.addMouseListener(new MouseAdapter() {
View Full Code Here

    this.add("Center", splitPanel);

    splitPanel.setDividerLocation(Integer.parseInt(Pooka.getProperty("Pooka.contentPanel.dividerLocation", "200")));

    selectionListener = new ListSelectionListener() {
        public void valueChanged(javax.swing.event.ListSelectionEvent e) {
          if (! e.getValueIsAdjusting())
            selectedMessageChanged();
        }
      };
View Full Code Here

        };

        outlineTable.addMouseListener(new PopupAdapter());
        prepareRenderers();
        //Add listener of table selection to refresh edit window when the selection changes (and if the table is not being refreshed):
        outlineTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            public void valueChanged(ListSelectionEvent e) {
                if (!refreshingTable) {
                    EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.class);
                    if (edc.isOpen()) {
View Full Code Here

        m_table.setAutoCreateColumnsFromModel(false);
        m_table.setModel(m_tableData);
        m_table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        m_table.setRowSelectionAllowed(true);
        m_table.setColumnSelectionAllowed(false);
        m_table.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent ev)
            {
                if (!ev.getValueIsAdjusting())
                {
View Full Code Here

                    return NbBundle.getMessage(EdgeDataTable.class, "EdgeDataTable.type.column.undirected");
                }
            }
        };
        //Add listener of table selection to refresh edit window when the selection changes (and if the table is not being refreshed):
        table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {

            public void valueChanged(ListSelectionEvent e) {
                if (!refreshingTable) {
                    EditWindowController edc = Lookup.getDefault().lookup(EditWindowController.class);
                    if (edc.isOpen()) {
View Full Code Here

                    JCheckListData data = (JCheckListData)m_listModel.get(index);
                    downButton.setEnabled(index < m_listModel.getSize() - 2 || data.isSeparator() ? true : false);
                }
            }
        });
        list.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                int index = list.getSelectedIndex();
                if (index >= 0)
View Full Code Here

        parameterNameCol.setPreferredWidth(190);
        scrollPane.setViewportView(tblParameters);
        ListSelectionModel selectionModel = tblParameters.getSelectionModel();
        selectionModel.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);

        selectionModel.addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                btnDeleteParameter.setEnabled(tblParameters.getSelectedRows().length > 0);
            }
View Full Code Here

          getDeployments().remove(hostName);
        }
      }
    });
       
        selectionModel.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
              btnEditDeployment.setEnabled(tblHosts.getSelectedRows().length > 0);
              btnDeleteDeployment.setEnabled(tblHosts.getSelectedRows().length > 0);
            }
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.