1 20 21 package org.snmp4j.agent.mo; 22 23 import java.util.EventObject ; 24 25 33 public class MOTableModelEvent extends EventObject { 34 35 private static final long serialVersionUID = -2260159403182301993L; 36 37 public static final int ROW_CHANGED = 0; 38 public static final int ROW_ADDED = 1; 39 public static final int ROW_REMOVED = 2; 40 public static final int TABLE_CLEAR = 3; 41 42 private int type; 43 private MOTableRow affectedRow; 44 private int columnIndex = -1; 45 46 57 public MOTableModelEvent(Object source, int type, MOTableRow affectedRow, 58 int columnIndex) { 59 super(source); 60 this.type = type; 61 this.affectedRow = affectedRow; 62 this.columnIndex = columnIndex; 63 } 64 65 74 public MOTableModelEvent(Object source, int type, MOTableRow affectedRow) { 75 this(source, type, affectedRow, -1); 76 } 77 78 85 public MOTableModelEvent(Object source, int type) { 86 this(source, type, null); 87 } 88 89 94 public int getType() { 95 return type; 96 } 97 98 104 public MOTableRow getAffectedRow() { 105 return affectedRow; 106 } 107 108 114 public int getColumnIndex() { 115 return columnIndex; 116 } 117 118 public String toString() { 119 return MOTableModelEvent.class.getName()+"[type="+type+ 120 ",affectedRow="+affectedRow+",columnIndex="+columnIndex+"]"; 121 } 122 } 123 | Popular Tags |