1 19 20 package org.netbeans.modules.tasklist.core.util; 21 22 import java.util.EventObject ; 23 24 29 public class ObjectListEvent extends EventObject { 30 31 public static final int EVENT_REMOVED = 0; 32 33 34 public static final int EVENT_ADDED = 1; 35 36 37 public static final int EVENT_STRUCTURE_CHANGED = 2; 38 39 40 public static final int EVENT_REORDERED = 3; 41 42 private int op; 43 private int indices[]; 44 private Object objects[]; 45 46 56 public ObjectListEvent(Object source, int op, int[] indices, 57 Object [] objects) { 58 super(source); 59 60 assert op == EVENT_ADDED || op == EVENT_REMOVED || 61 op == EVENT_REORDERED || op == EVENT_STRUCTURE_CHANGED : 62 "Wrong operation"; 64 assert indices != null || op == EVENT_REORDERED; 65 assert objects != null || op == EVENT_REORDERED; 66 67 this.op = op; 68 this.indices = indices; 69 this.objects = objects; 70 } 71 72 77 public int getType() { 78 return op; 79 } 80 81 87 public Object [] getObjects() { 88 return objects; 89 } 90 91 96 public int[] getIndices() { 97 return indices; 98 } 99 } 100 | Popular Tags |