1 19 20 package com.sslexplorer.networkplaces.model; 21 22 import com.sslexplorer.table.AbstractTableItemTableModel; 23 24 public class FileSystemItemModel extends AbstractTableItemTableModel { 25 26 private String id; 27 28 public FileSystemItemModel(String id) { 29 this.id = id; 30 } 31 32 public int getColumnWidth(int col) { 33 return 0; 34 } 35 36 public String getId() { 37 return id; 38 } 39 40 public int getColumnCount() { 41 return 3; 42 } 43 44 public String getColumnName(int col) { 45 switch (col) { 46 case 0: 47 return "name"; 48 case 1: 49 return "dateModified"; 50 case 2: 51 return "size"; 52 } 53 return null; 54 } 55 56 public Class getColumnClass(int col) { 57 switch (col) { 58 case 0: 59 return FileSystemItem.class; 60 case 1: 61 return java.util.GregorianCalendar .class; 62 case 2: 63 return Long .class; 64 } 65 return null; 66 } 67 } 68 | Popular Tags |