Examples of ListSelectionListener


Examples of javax.swing.event.ListSelectionListener

   
    setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    ListSelectionModel rowSM = getSelectionModel();

    rowSM.addListSelectionListener(new ListSelectionListener() {
  public void valueChanged(ListSelectionEvent e) {

    if (e.getValueIsAdjusting()) {
      return;
    }
View Full Code Here

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
TOP
Copyright © 2018 www.massapi.com. 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.