You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
951 B
43 lines
951 B
9 years ago
|
package com.fr.plugin.widget.ztree.core;
|
||
|
|
||
6 years ago
|
import com.fanruan.api.i18n.I18nKit;
|
||
|
import com.fanruan.api.util.StringKit;
|
||
9 years ago
|
|
||
|
/**
|
||
|
* Created by richie on 15/11/18.
|
||
|
*/
|
||
|
public enum ZTreeStyle {
|
||
|
|
||
|
NONE("none", "Plugin-ZTree_Style_None"),
|
||
|
CHECK("checkbox", "Plugin-ZTree_Style_Checkbox"),
|
||
|
RADIO("radio", "Plugin-ZTree_Style_Radio");
|
||
|
|
||
|
private String type;
|
||
|
private String localeKey;
|
||
|
|
||
|
ZTreeStyle(String type, String localeKey) {
|
||
|
this.type = type;
|
||
|
this.localeKey = localeKey;
|
||
|
}
|
||
|
|
||
|
public String toLocaleText() {
|
||
6 years ago
|
return I18nKit.getLocText(localeKey);
|
||
9 years ago
|
}
|
||
|
|
||
|
public String toLocaleKey() {
|
||
|
return localeKey;
|
||
|
}
|
||
|
|
||
|
public String toText() {
|
||
|
return type;
|
||
|
}
|
||
|
|
||
|
public static ZTreeStyle parser(String type) {
|
||
|
for (ZTreeStyle style : values()) {
|
||
6 years ago
|
if (StringKit.equals(type, style.type)) {
|
||
9 years ago
|
return style;
|
||
|
}
|
||
|
}
|
||
|
return NONE;
|
||
|
}
|
||
|
}
|