1 19 20 package org.netbeans.modules.web.debug.watchesfiltering; 21 22 import org.netbeans.spi.viewmodel.TableModel; 23 import org.netbeans.spi.viewmodel.UnknownTypeException; 24 import org.netbeans.spi.viewmodel.ModelListener; 25 import org.netbeans.spi.debugger.ui.Constants; 26 27 32 public class JspWatchesTableModel implements TableModel { 33 34 public Object getValueAt (Object row, String columnID) throws UnknownTypeException { 35 if (!(row instanceof JspElWatch)) throw new UnknownTypeException(row); 36 JspElWatch watch = (JspElWatch) row; 37 if (columnID.equals(Constants.WATCH_TO_STRING_COLUMN_ID)) { 38 return watch.getValue(); 39 } else if (columnID.equals (Constants.WATCH_TYPE_COLUMN_ID)) { 40 return watch.getType(); 41 } else if (columnID.equals (Constants.WATCH_VALUE_COLUMN_ID)) { 42 String e = watch.getExceptionDescription (); 43 if (e != null) return "> " + e + " <"; 44 return watch.getValue(); 45 } 46 throw new UnknownTypeException(row); 47 } 48 49 public boolean isReadOnly (Object row, String columnID) throws UnknownTypeException { 50 if (!(row instanceof JspElWatch)) throw new UnknownTypeException(row); 51 return true; 52 } 53 54 public void setValueAt (Object row, String columnID, Object value) throws UnknownTypeException { 55 throw new UnknownTypeException (row); 56 } 57 58 public void addModelListener (ModelListener l) { 59 } 60 61 public void removeModelListener (ModelListener l) { 62 } 63 } 64 | Popular Tags |