1 13 package com.tonbeller.wcf.table; 14 15 18 19 public class DefaultCell implements Comparable { 20 private String URL; 21 private Object value; 22 private String target; 23 private String image; 24 private String onClick; 25 26 public DefaultCell(String URL, Object value) { 27 this.URL = URL; 28 this.value = value; 29 this.image = null; 30 } 31 32 35 public DefaultCell(String URL, Object value, String imageUrl) { 36 this.URL = URL; 37 this.value = value; 38 this.image = imageUrl; 39 } 40 41 42 public String getURL() { 43 return URL; 44 } 45 46 public void setURL(String newURL) { 47 URL = newURL; 48 } 49 public void setValue(Object newValue) { 50 value = newValue; 51 } 52 public Object getValue() { 53 return value; 54 } 55 56 public void setTarget(String newTarget) { 57 target = newTarget; 58 } 59 60 public String getTarget() { 61 return target; 62 } 63 64 public void setOnClick(String newOnClick) { 65 onClick = newOnClick; 66 } 67 68 public String getOnClick() { 69 return onClick; 70 } 71 public int compareTo(Object o) { 72 DefaultCell x = (DefaultCell)o; 73 if (value != null) 74 return ((Comparable )value).compareTo(x.value); 75 if (image != null) 76 return image.compareTo(x.image); 77 return URL.compareTo(x.URL); 78 } 79 public void setImage(String newImage) { 80 image = newImage; 81 } 82 public String getImage() { 83 return image; 84 } 85 } | Popular Tags |