18 package org.turro.zkoss.grid;
20 import java.util.Date;
21 import org.zkoss.zul.Column;
29 private boolean onlyDate =
true, onlyTime=
false, readOnly =
false;
30 private String property, format;
31 private Class javaClass = String.class;
32 private int scale = 2;
48 this.javaClass = javaClass;
51 public void setJavaClass(String javaClass)
throws ClassNotFoundException {
52 if(
"int".equals(javaClass)) {
53 this.javaClass =
int.class;
54 }
else if(
"long".equals(javaClass)) {
55 this.javaClass =
long.class;
56 }
else if(
"double".equals(javaClass)) {
57 this.javaClass =
double.class;
58 }
else if(
"boolean".equals(javaClass)) {
59 this.javaClass =
boolean.class;
61 this.javaClass = Class.forName(javaClass);
70 this.onlyDate = onlyDate;
78 this.onlyTime = onlyTime;
86 this.
property = property;
94 this.readOnly = readOnly;
106 return onCheckDuplicate;
110 this.onCheckDuplicate = onCheckDuplicate;
114 return Boolean.class.isAssignableFrom(javaClass) ||
115 boolean.class.isAssignableFrom(javaClass);
119 return Number.class.isAssignableFrom(javaClass) ||
120 int.class.isAssignableFrom(javaClass) ||
121 long.class.isAssignableFrom(javaClass) ||
122 double.class.isAssignableFrom(javaClass);
126 return Date.class.isAssignableFrom(javaClass);
void setReadOnly(boolean readOnly)
void setJavaClass(String javaClass)
void setJavaClass(Class javaClass)
void setOnlyTime(boolean onlyTime)
ChangeValueCallback getOnCheckDuplicate()
void setOnlyDate(boolean onlyDate)
void setOnCheckDuplicate(ChangeValueCallback onCheckDuplicate)
void setFormat(String format)
void setProperty(String property)