Class MessageStore.ListModel

java.lang.Object
javax.swing.AbstractListModel<M>
eu.bandm.tools.message.MessageStore.ListModel
All Implemented Interfaces:
Serializable, ListModel<M>
Enclosing class:
MessageStore<M extends Message>

public class MessageStore.ListModel extends AbstractListModel<M>
standard specialisation of AbstractListModel.

Usage is like ... // cf applics/src/eu/bandm/bpm/aspPcg/Main.java
    frame = new JFrame();
    list = new JList();
    list.setModel(myMessageStore.getListModel());
    frame.getContentPane().add(list);
    frame.pack();
    frame.setVisibiliy(true);
  
Own specializations are inserted by ...
    class myListModel extends MessageStore.ListModel {...}
    myMessageStore.setListModel(myMessageStore.new MyListModel()) ;
  
See Also:
  • Constructor Details

    • ListModel

      public ListModel()
  • Method Details

    • notifyAdd

      public void notifyAdd(int pos)
      Wrapper for the swing "event firing", that one row in the data is changed.
    • notifySortingChanged

      public void notifySortingChanged(int j)
      Wrapper for the swing "event firing", that all rows in the data may have changed.
    • getSize

      public int getSize()
      Callback by Swing; returns current number of messages.
    • getElementAt

      public M getElementAt(int pos)
      Callback by Swing. Returns the Message in this row.