Package javax.swing.event

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


                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

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

        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

  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

                      handleRightClick( e );
                   }
            }
        });

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

    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

    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

    });
  }

  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

        JTable table = new JTable(model);
        JScrollPane pane = new JScrollPane(table);
        frame.getContentPane().add(pane, BorderLayout.CENTER);

        ListSelectionModel lsm = table.getSelectionModel();
        lsm.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                //Ignore extra messages.
                if (e.getValueIsAdjusting()) {
                    return;
                }
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.