EditColumnInfo.java 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. package com.kingdee.eas.custom.projectbonus.web.vo;
  2. import java.lang.reflect.Field;
  3. import java.util.HashMap;
  4. import java.util.Map;
  5. /**
  6. * @Description 编辑列实体
  7. * @Date 2024/4/28 9:50
  8. * @Created by Heyuan
  9. */
  10. public class EditColumnInfo {
  11. // 字段名
  12. private String name;
  13. // 标签
  14. private String label;
  15. // 是否冻结
  16. private boolean frozen = false;
  17. // 宽度
  18. private int width;
  19. // 表头对齐方式
  20. private String thalign;
  21. // 对齐方式
  22. private String align;
  23. // 是否隐藏
  24. private boolean hidden = false;
  25. // 是否为关键字段
  26. private boolean key = false;
  27. // 是否可编辑
  28. private boolean editable = true;
  29. // 排序类型
  30. private String sorttype;
  31. // 是否必填
  32. private boolean required = false;
  33. // 是否可排序
  34. private boolean sortable = true;
  35. // 格式化方式
  36. private String formatter = "promptBox";
  37. // 编辑类型
  38. private String edittype = "promptBox";
  39. // 编辑选项
  40. private EditOptions editoptions;
  41. // 类名
  42. private String classes;
  43. // 是否有标题
  44. private boolean title = false;
  45. // 原始宽度
  46. private int widthOrg;
  47. // 是否可调整大小
  48. private boolean resizable = false;
  49. public String getType() {
  50. return type;
  51. }
  52. public void setType(String type) {
  53. this.type = type;
  54. }
  55. private String type = "promptbox";
  56. public String getName() {
  57. return name;
  58. }
  59. public void setName(String name) {
  60. this.name = name;
  61. }
  62. public String getLabel() {
  63. return label;
  64. }
  65. public void setLabel(String label) {
  66. this.label = label;
  67. }
  68. public boolean isFrozen() {
  69. return frozen;
  70. }
  71. public void setFrozen(boolean frozen) {
  72. this.frozen = frozen;
  73. }
  74. public int getWidth() {
  75. return width;
  76. }
  77. public void setWidth(int width) {
  78. this.width = width;
  79. }
  80. public String getThalign() {
  81. return thalign;
  82. }
  83. public void setThalign(String thalign) {
  84. this.thalign = thalign;
  85. }
  86. public String getAlign() {
  87. return align;
  88. }
  89. public void setAlign(String align) {
  90. this.align = align;
  91. }
  92. public boolean isHidden() {
  93. return hidden;
  94. }
  95. public void setHidden(boolean hidden) {
  96. this.hidden = hidden;
  97. }
  98. public boolean isKey() {
  99. return key;
  100. }
  101. public void setKey(boolean key) {
  102. this.key = key;
  103. }
  104. public boolean isEditable() {
  105. return editable;
  106. }
  107. public void setEditable(boolean editable) {
  108. this.editable = editable;
  109. }
  110. public String getSorttype() {
  111. return sorttype;
  112. }
  113. public void setSorttype(String sorttype) {
  114. this.sorttype = sorttype;
  115. }
  116. public boolean isRequired() {
  117. return required;
  118. }
  119. public void setRequired(boolean required) {
  120. this.required = required;
  121. }
  122. public boolean isSortable() {
  123. return sortable;
  124. }
  125. public void setSortable(boolean sortable) {
  126. this.sortable = sortable;
  127. }
  128. public String getFormatter() {
  129. return formatter;
  130. }
  131. public void setFormatter(String formatter) {
  132. this.formatter = formatter;
  133. }
  134. public String getEdittype() {
  135. return edittype;
  136. }
  137. public void setEdittype(String edittype) {
  138. this.edittype = edittype;
  139. }
  140. public EditOptions getEditoptions() {
  141. if (editoptions == null) {
  142. this.editoptions = new EditOptions();
  143. }
  144. return editoptions;
  145. }
  146. public void setEditoptions(EditOptions editoptions) {
  147. this.editoptions = editoptions;
  148. }
  149. public String getClasses() {
  150. return classes;
  151. }
  152. public void setClasses(String classes) {
  153. this.classes = classes;
  154. }
  155. public boolean isTitle() {
  156. return title;
  157. }
  158. public void setTitle(boolean title) {
  159. this.title = title;
  160. }
  161. public int getWidthOrg() {
  162. return widthOrg;
  163. }
  164. public void setWidthOrg(int widthOrg) {
  165. this.widthOrg = widthOrg;
  166. }
  167. public boolean isResizable() {
  168. return resizable;
  169. }
  170. public void setResizable(boolean resizable) {
  171. this.resizable = resizable;
  172. }
  173. public <T> Map<String, Object> convertToMap() throws IllegalAccessException {
  174. Map<String, Object> map = new HashMap<String, Object>();
  175. Class<?> clazz = this.getClass();
  176. Field[] fields = clazz.getDeclaredFields();
  177. for (Field field : fields) {
  178. field.setAccessible(true);
  179. map.put(field.getName(), field.get(this));
  180. }
  181. return map;
  182. }
  183. }