1 7 8 package javax.swing.event; 9 10 import java.util.EventObject ; 11 import javax.swing.*; 12 13 14 35 public class ListSelectionEvent extends EventObject 36 { 37 private int firstIndex; 38 private int lastIndex; 39 private boolean isAdjusting; 40 41 53 public ListSelectionEvent(Object source, int firstIndex, int lastIndex, 54 boolean isAdjusting) 55 { 56 super(source); 57 this.firstIndex = firstIndex; 58 this.lastIndex = lastIndex; 59 this.isAdjusting = isAdjusting; 60 } 61 62 67 public int getFirstIndex() { return firstIndex; } 68 69 74 public int getLastIndex() { return lastIndex; } 75 76 80 public boolean getValueIsAdjusting() { return isAdjusting; } 81 82 88 public String toString() { 89 String properties = 90 " source=" + getSource() + 91 " firstIndex= " + firstIndex + 92 " lastIndex= " + lastIndex + 93 " isAdjusting= " + isAdjusting + 94 " "; 95 return getClass().getName() + "[" + properties + "]"; 96 } 97 } 98 99 | Popular Tags |