Revision 1886 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dataTypes/impl/DefaultDataType.java
DefaultDataType.java | ||
---|---|---|
44 | 44 |
private String subtype; |
45 | 45 |
private int type; |
46 | 46 |
private String name; |
47 |
private String iconName; |
|
48 |
|
|
49 |
DefaultDataType(int type, String subtype, String name, Class defaultClass, Coercion coercion) { |
|
50 |
this(type, subtype, name, defaultClass, coercion, "datatype-any"); |
|
51 |
} |
|
47 | 52 |
|
48 |
DefaultDataType(int type, String subtype, String name, Class defaultClass, Coercion coercion) {
|
|
53 |
DefaultDataType(int type, String subtype, String name, Class defaultClass, Coercion coercion, String iconName) {
|
|
49 | 54 |
|
50 | 55 |
if( name == null ) { |
51 | 56 |
LOG.trace("Can't register null type name for type {}.", new Object[] { Integer.toHexString(type).toUpperCase()}); |
... | ... | |
56 | 61 |
this.name = name; |
57 | 62 |
this.defaultClass = defaultClass; |
58 | 63 |
this.coercion = coercion; |
64 |
this.iconName = iconName==null? "datatype-any":iconName; |
|
59 | 65 |
} |
60 | 66 |
|
61 | 67 |
public Object coerce(Object value) throws CoercionException { |
... | ... | |
93 | 99 |
return this.name; |
94 | 100 |
} |
95 | 101 |
|
96 |
public boolean isContainer() { |
|
102 |
@Override |
|
103 |
public String getIconName() { |
|
104 |
return this.iconName; |
|
105 |
} |
|
106 |
|
|
107 |
public boolean isContainer() { |
|
97 | 108 |
return (type & DataTypes.CONTAINER) == DataTypes.CONTAINER; |
98 | 109 |
} |
99 | 110 |
|
Also available in: Unified diff