1 package org.argeo.eclipse.ui.jcr.lists;
2
3 import javax.jcr.Node;
4 import javax.jcr.query.Row;
5
6 import org.argeo.eclipse.ui.ColumnDefinition;
7
8
9
10
11
12 public class JcrColumnDefinition extends ColumnDefinition {
13 private final static int DEFAULT_COLUMN_SIZE = 120;
14
15 private String selectorName;
16 private String propertyName;
17 private int propertyType;
18 private int columnSize;
19
20
21
22
23
24
25
26
27
28
29 public JcrColumnDefinition(String selectorName, String propertyName,
30 int propertyType, String headerLabel) {
31 super(new SimpleJcrRowLabelProvider(selectorName, propertyName),
32 headerLabel);
33 this.selectorName = selectorName;
34 this.propertyName = propertyName;
35 this.propertyType = propertyType;
36 this.columnSize = DEFAULT_COLUMN_SIZE;
37 }
38
39
40
41
42
43
44
45
46
47
48
49 public JcrColumnDefinition(String selectorName, String propertyName,
50 int propertyType, String headerLabel, int columnSize) {
51 super(new SimpleJcrRowLabelProvider(selectorName, propertyName),
52 headerLabel, columnSize);
53 this.selectorName = selectorName;
54 this.propertyName = propertyName;
55 this.propertyType = propertyType;
56 this.columnSize = columnSize;
57 }
58
59
60
61
62
63
64
65
66
67
68 public JcrColumnDefinition(String propertyName, int propertyType,
69 String headerLabel, int columnSize) {
70 super(new SimpleJcrNodeLabelProvider(propertyName), headerLabel,
71 columnSize);
72 this.propertyName = propertyName;
73 this.propertyType = propertyType;
74 this.columnSize = columnSize;
75 }
76
77 public String getSelectorName() {
78 return selectorName;
79 }
80
81 public void setSelectorName(String selectorName) {
82 this.selectorName = selectorName;
83 }
84
85 public String getPropertyName() {
86 return propertyName;
87 }
88
89 public void setPropertyName(String propertyName) {
90 this.propertyName = propertyName;
91 }
92
93 public int getPropertyType() {
94 return propertyType;
95 }
96
97 public void setPropertyType(int propertyType) {
98 this.propertyType = propertyType;
99 }
100
101 public int getColumnSize() {
102 return columnSize;
103 }
104
105 public void setColumnSize(int columnSize) {
106 this.columnSize = columnSize;
107 }
108
109 public String getHeaderLabel() {
110 return super.getLabel();
111 }
112
113 public void setHeaderLabel(String headerLabel) {
114 super.setLabel(headerLabel);
115 }
116 }