javax.swing.event

Interface ListDataListener

All Superinterfaces:
EventListener
Known Implementing Classes:
BasicComboBoxUI.ListDataHandler, BasicComboPopup.ListDataHandler, BasicListUI.ListDataHandler, GTKFileChooserUI.GTKDirectoryListModel, GTKFileChooserUI.GTKFileListModel, JComboBox, JList.AccessibleJList, MotifFileChooserUI.MotifDirectoryListModel, MotifFileChooserUI.MotifFileListModel

public interface ListDataListener
extends EventListener

ListDataListener

Method Summary

void
contentsChanged(ListDataEvent e)
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods.
void
intervalAdded(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been inserted in the data model.
void
intervalRemoved(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been removed from the data model.

Method Details

contentsChanged

public void contentsChanged(ListDataEvent e)
Sent when the contents of the list has changed in a way that's too complex to characterize with the previous methods. For example, this is sent when an item has been replaced. Index0 and index1 bracket the change.
Parameters:
e - a ListDataEvent encapsulating the event information
Usages and Demos :

View More Examples of contentsChanged(ListDataEvent e)
   1: import javax.swing.event.ListDataEvent;
   2: import javax.swing.event.ListDataListener;
   3: 
   4:         ...
   5: 
   6: public class WeakListDataListener<T extends ListDataListener> extends WeakEventListener<T>
   7: {
   8:         ...
   9:   {
  10:     ListDataListener ref = get();
  11:     if (ref != null)
  12:         ...
  13:       ref.contentsChanged(e);

View Full Code Here
   1:     protected List listeners;
   2:     public void addListDataListener(ListDataListener l) {
   3:         listeners.add(l);
   4:         ...
   5:     }
   6:     public void removeListDataListener(ListDataListener l) {
   7:         this.listeners.remove(l);
   8:         ...
   9:         for(int i=0; i<listeners.size(); i++) {
  10:             ListDataListener l = (ListDataListener)listeners.get(i);
  11:         ...
  12:             l.contentsChanged(le);

View Full Code Here
   1:     {
   2:         for(ListDataListener l : listenerList.getListeners(ListDataListener.class))
   3:         ...
   4:             l.contentsChanged(event) ;
   5:     }
   6:         ...
   7: 
   8:     final public void addListDataListener(ListDataListener l)
   9:     {

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5:   extends JOptionPane
   6:   implements ListDataListener, ListSelectionListener, ActionListener {
   7:   private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:   private ListSelectionListener listSelectionListener;
  10:   private ListDataListener listDataListener;
  11: 
  12:         ...
  13:     if (listDataListener != null) {
  14:       listDataListener.contentsChanged(e);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5: extends JOptionPane
   6: implements ListDataListener, ListSelectionListener, ActionListener {
   7:     private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:     private ListSelectionListener listSelectionListener;
  10:     private ListDataListener listDataListener;
  11:     
  12:         ...
  13:         if (listDataListener != null) {
  14:             listDataListener.contentsChanged(e);

View Full Code Here

intervalAdded

public void intervalAdded(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been inserted in the data model. The new interval includes both index0 and index1.
Parameters:
e - a ListDataEvent encapsulating the event information
Usages and Demos :

View More Examples of intervalAdded(ListDataEvent e)
   1: import javax.swing.event.ListDataEvent;
   2: import javax.swing.event.ListDataListener;
   3: 
   4:         ...
   5: 
   6: public class WeakListDataListener<T extends ListDataListener> extends WeakEventListener<T>
   7: {
   8:         ...
   9:   {
  10:     ListDataListener ref = get();
  11:     if (ref != null)
  12:         ...
  13:     if (ref != null)
  14:       ref.intervalAdded(e);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5:   extends JOptionPane
   6:   implements ListDataListener, ListSelectionListener, ActionListener {
   7:   private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:   private ListSelectionListener listSelectionListener;
  10:   private ListDataListener listDataListener;
  11: 
  12:         ...
  13:     if (listDataListener != null) {
  14:       listDataListener.intervalAdded(e);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5: extends JOptionPane
   6: implements ListDataListener, ListSelectionListener, ActionListener {
   7:     private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:     private ListSelectionListener listSelectionListener;
  10:     private ListDataListener listDataListener;
  11:     
  12:         ...
  13:         if (listDataListener != null) {
  14:             listDataListener.intervalAdded(e);

View Full Code Here
   1: import jp.ujihara.javax.swing.event.ListDataEvent;
   2: import jp.ujihara.javax.swing.event.ListDataListener;
   3: 
   4:         ...
   5: 
   6:   public void addListDataListener(ListDataListener listener)
   7:   {
   8:         ...
   9:     listenerList.add(ListDataListener.class, listener);
  10:   }
  11:         ...
  12:         listener = listeners[index];
  13:         listener.intervalAdded(event);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5:   extends JOptionPane
   6:   implements ListDataListener, ListSelectionListener, ActionListener {
   7:   private JList certList;
   8:         ...
   9:   private ListSelectionListener listSelectionListener;
  10:   private ListDataListener listDataListener;
  11: 
  12:         ...
  13:     if (listDataListener != null) {
  14:       listDataListener.intervalAdded(e);

View Full Code Here

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Sent after the indices in the index0,index1 interval have been removed from the data model. The interval includes both index0 and index1.
Parameters:
e - a ListDataEvent encapsulating the event information
Usages and Demos :

View More Examples of intervalRemoved(ListDataEvent e)
   1: import javax.swing.event.ListDataEvent;
   2: import javax.swing.event.ListDataListener;
   3: 
   4:         ...
   5: 
   6: public class WeakListDataListener<T extends ListDataListener> extends WeakEventListener<T>
   7: {
   8:         ...
   9:   {
  10:     ListDataListener ref = get();
  11:     if (ref != null)
  12:         ...
  13:     if (ref != null)
  14:       ref.intervalRemoved(e);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5:   extends JOptionPane
   6:   implements ListDataListener, ListSelectionListener, ActionListener {
   7:   private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:   private ListSelectionListener listSelectionListener;
  10:   private ListDataListener listDataListener;
  11: 
  12:         ...
  13:     if (listDataListener != null) {
  14:       listDataListener.intervalRemoved(e);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5: extends JOptionPane
   6: implements ListDataListener, ListSelectionListener, ActionListener {
   7:     private final static String DIR_PANEL_TITLE = "Directory Builder";
   8:         ...
   9:     private ListSelectionListener listSelectionListener;
  10:     private ListDataListener listDataListener;
  11:     
  12:         ...
  13:         if (listDataListener != null) {
  14:             listDataListener.intervalRemoved(e);

View Full Code Here
   1: import jp.ujihara.javax.swing.event.ListDataEvent;
   2: import jp.ujihara.javax.swing.event.ListDataListener;
   3: 
   4:         ...
   5: 
   6:   public void addListDataListener(ListDataListener listener)
   7:   {
   8:         ...
   9:     listenerList.add(ListDataListener.class, listener);
  10:   }
  11:         ...
  12:         listener = listeners[index];
  13:         listener.intervalRemoved(event);

View Full Code Here
   1: import javax.swing.JScrollPane;
   2: import javax.swing.event.ListDataListener;
   3: import javax.swing.event.ListDataEvent;
   4:         ...
   5:   extends JOptionPane
   6:   implements ListDataListener, ListSelectionListener, ActionListener {
   7:   private JList certList;
   8:         ...
   9:   private ListSelectionListener listSelectionListener;
  10:   private ListDataListener listDataListener;
  11: 
  12:         ...
  13:     if (listDataListener != null) {
  14:       listDataListener.intervalRemoved(e);

View Full Code Here