KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwtx > swing > ListSelectionModel


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9  
10    $Log: ListSelectionModel.java,v $
11    Revision 1.1 2004/04/06 12:30:53 bobintetley
12    JTable thread safety, ListSelectionModel implementation for JList/JTable
13
14  
15 */

16 package swingwtx.swing;
17
18 import swingwtx.swing.event.*;
19
20 public interface ListSelectionModel {
21
22     int SINGLE_SELECTION = 0;
23     int SINGLE_INTERVAL_SELECTION = 1;
24     int MULTIPLE_INTERVAL_SELECTION = 2;
25
26     void setSelectionInterval(int index0, int index1);
27     void addSelectionInterval(int index0, int index1);
28     void removeSelectionInterval(int index0, int index1);
29     int getMinSelectionIndex();
30     int getMaxSelectionIndex();
31     boolean isSelectedIndex(int index);
32     int getAnchorSelectionIndex();
33     void setAnchorSelectionIndex(int index);
34     int getLeadSelectionIndex();
35     void setLeadSelectionIndex(int index);
36     void clearSelection();
37     boolean isSelectionEmpty();
38     void insertIndexInterval(int index, int length, boolean before);
39     void removeIndexInterval(int index0, int index1);
40     void setValueIsAdjusting(boolean valueIsAdjusting);
41     boolean getValueIsAdjusting();
42     void setSelectionMode(int selectionMode);
43     int getSelectionMode();
44
45     void addListSelectionListener(ListSelectionListener x);
46     void removeListSelectionListener(ListSelectionListener x);
47 }
48
49
Popular Tags