Examples of ListSelectionListener


Examples of javax.swing.event.ListSelectionListener

   
    for (Object object : objects) {
      mListModel.addElement(object);
    }
   
    mList.addListSelectionListener(new ListSelectionListener(){
      public void valueChanged(ListSelectionEvent e) {
        updateBtns();
      }
    });
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

        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

Examples of javax.swing.event.ListSelectionListener

                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

Examples of javax.swing.event.ListSelectionListener

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

Examples of javax.swing.event.ListSelectionListener

        model = new DefaultListModel();
        list = new JList(model);

        list.setCellRenderer(new FilterRenderer());

        list.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                    enableAppropriately();
                }
            }
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

  public List(Widget parent, String name) throws GUIException {
    super(parent, name);
    list = new JList();
    list.setCellRenderer(new ListCellRenderer());
    scrollPane = new JScrollPane(list);
    list.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        try {
          MapDataModel model = getDataModel();
          if (sendEvents && model != null && !e.getValueIsAdjusting()) {
            try {
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

                      handleRightClick( e );
                   }
            }
        });

        list.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if (!e.getValueIsAdjusting()) {
                   enableThingsAppropriately();
                }
            }
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

    scrollPane = new JScrollPane(table);
    columnKeys = new ArrayList();
    columnLabels = new ArrayList();
    columnSizes = new ArrayList();

    table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        try {
          if (sendEvents && !e.getValueIsAdjusting()) {
            synchronizeDataModel();
          }
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

    super(parent, name);
    JIconView.initialize();
    iconView = new JIconView();
    iconView.setBackground(Color.white);
    scrollPane = new JScrollPane(iconView);
    iconView.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
        int index = e.getFirstIndex();
        MapDataModel model = getDataModel();
        try {
          if (!e.getValueIsAdjusting() && sendEvents) {
View Full Code Here

Examples of javax.swing.event.ListSelectionListener

    });
  }

  public void addListener(String event, final String name, final GUIEventListener listener) throws GUIException {
    if ("selected".equals(event)) {
      iconView.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent e) {
          int index = e.getFirstIndex();
          listener.eventOccured(new GUIEvent(IconView.this, name, e));
        }
      });
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.