Last change
on this file was
193,
checked in by Maciej Komosinski, 10 years ago
|
Set svn:eol-style native for all textual files
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | package com.framsticks.gui.table; |
---|
2 | |
---|
3 | import java.util.ArrayList; |
---|
4 | import java.util.Arrays; |
---|
5 | import java.util.List; |
---|
6 | |
---|
7 | import com.framsticks.params.annotations.FramsClassAnnotation; |
---|
8 | import com.framsticks.params.annotations.ParamAnnotation; |
---|
9 | import com.framsticks.util.lang.Delimeted; |
---|
10 | |
---|
11 | @FramsClassAnnotation |
---|
12 | public class ColumnsConfig { |
---|
13 | |
---|
14 | protected final List<String> columnsNames = new ArrayList<>(); |
---|
15 | |
---|
16 | protected String className; |
---|
17 | |
---|
18 | @ParamAnnotation(id = "columnsNames") |
---|
19 | public void setColumnsNamesAsString(String columns) { |
---|
20 | columnsNames.clear(); |
---|
21 | columnsNames.addAll(Arrays.asList(columns.split(" "))); |
---|
22 | } |
---|
23 | |
---|
24 | @ParamAnnotation(id = "columnsNames") |
---|
25 | public String getColumnsNamesAsString() { |
---|
26 | return new Delimeted<String>(" ", "").append(columnsNames.iterator()).build(); |
---|
27 | } |
---|
28 | |
---|
29 | /** |
---|
30 | * @return the columnsNames |
---|
31 | */ |
---|
32 | public List<String> getColumnsNames() { |
---|
33 | return columnsNames; |
---|
34 | } |
---|
35 | |
---|
36 | /** |
---|
37 | * @return the name |
---|
38 | */ |
---|
39 | @ParamAnnotation |
---|
40 | public String getClassName() { |
---|
41 | return className; |
---|
42 | } |
---|
43 | |
---|
44 | /** |
---|
45 | * @param name the name to set |
---|
46 | */ |
---|
47 | @ParamAnnotation |
---|
48 | public void setClassName(String className) { |
---|
49 | this.className = className; |
---|
50 | } |
---|
51 | |
---|
52 | @Override |
---|
53 | public String toString() { |
---|
54 | return "columns config for " + className + ": " + getColumnsNames(); |
---|
55 | } |
---|
56 | |
---|
57 | |
---|
58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.