import com.vaadin.ui.Table;\r
import com.vaadin.ui.Table.CellStyleGenerator;\r
import com.vaadin.ui.Table.ColumnGenerator;\r
+import com.vaadin.ui.Table.ColumnHeaderMode;\r
import com.vaadin.ui.Table.ColumnResizeEvent;\r
import com.vaadin.ui.Table.ColumnResizeListener;\r
import com.vaadin.ui.Table.FooterClickEvent;\r
\r
}\r
};\r
- private Command<T, Integer> columnHeaderModeCommand = new Command<T, Integer>() {\r
+ private Command<T, ColumnHeaderMode> columnHeaderModeCommand = new Command<T, ColumnHeaderMode>() {\r
\r
- public void execute(T c, Integer columnHeaderMode, Object data) {\r
+ public void execute(T c, ColumnHeaderMode columnHeaderMode, Object data) {\r
c.setColumnHeaderMode(columnHeaderMode);\r
\r
}\r
}\r
\r
private void createColumnHeaderMode(String category) {\r
- LinkedHashMap<String, Integer> columnHeaderModeOptions = new LinkedHashMap<String, Integer>();\r
- columnHeaderModeOptions.put("Hidden", Table.COLUMN_HEADER_MODE_HIDDEN);\r
- columnHeaderModeOptions.put("Id", Table.COLUMN_HEADER_MODE_ID);\r
- columnHeaderModeOptions.put("Explicit",\r
- Table.COLUMN_HEADER_MODE_EXPLICIT);\r
+ LinkedHashMap<String, ColumnHeaderMode> columnHeaderModeOptions = new LinkedHashMap<String, ColumnHeaderMode>();\r
+ columnHeaderModeOptions.put("Hidden", ColumnHeaderMode.HIDDEN);\r
+ columnHeaderModeOptions.put("Id", ColumnHeaderMode.ID);\r
+ columnHeaderModeOptions.put("Explicit", ColumnHeaderMode.EXPLICIT);\r
columnHeaderModeOptions.put("Explicit defaults id",\r
- Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID);\r
+ ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);\r
\r
createSelectAction("Column header mode", category,\r
columnHeaderModeOptions, "Explicit defaults id",\r
}\r
\r
protected void createHeaderVisibilitySelect(String category) {\r
- LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();\r
- options.put("Explicit", Table.COLUMN_HEADER_MODE_EXPLICIT);\r
+ LinkedHashMap<String, ColumnHeaderMode> options = new LinkedHashMap<String, ColumnHeaderMode>();\r
+ options.put("Explicit", ColumnHeaderMode.EXPLICIT);\r
options.put("Explicit defaults id",\r
- Table.COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID);\r
- options.put("Id", Table.COLUMN_HEADER_MODE_ID);\r
- options.put("Hidden", Table.COLUMN_HEADER_MODE_HIDDEN);\r
+ ColumnHeaderMode.EXPLICIT_DEFAULTS_ID);\r
+ options.put("Id", ColumnHeaderMode.ID);\r
+ options.put("Hidden", ColumnHeaderMode.HIDDEN);\r
\r
createSelectAction("Header mode", category, options,\r
- "Explicit defaults id", new Command<T, Integer>() {\r
+ "Explicit defaults id", new Command<T, ColumnHeaderMode>() {\r
\r
- public void execute(T c, Integer value, Object data) {\r
+ public void execute(T c, ColumnHeaderMode value, Object data) {\r
c.setColumnHeaderMode(value);\r
\r
}\r