]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.eclipse.ui/src/org/argeo/eclipse/ui/jcr/lists/ColumnDefinition.java
Add some utilities to eclipse UI Utils to ease UI implementation.
[lgpl/argeo-commons.git] / org.argeo.eclipse.ui / src / org / argeo / eclipse / ui / jcr / lists / ColumnDefinition.java
1 package org.argeo.eclipse.ui.jcr.lists;
2
3 /**
4 * Utility object to manage column in various tables and extracts displaying
5 * data from JCR
6 */
7 public class ColumnDefinition {
8 private final static int DEFAULT_COLUMN_SIZE = 120;
9
10 private String selectorName;
11 private String propertyName;
12 private String headerLabel;
13 private int propertyType;
14 private int columnSize = DEFAULT_COLUMN_SIZE;
15
16 /**
17 * new column using default width
18 *
19 * @param selectorName
20 * @param propertyName
21 * @param propertyType
22 * @param headerLabel
23 */
24 public ColumnDefinition(String selectorName, String propertyName,
25 int propertyType, String headerLabel) {
26 this.selectorName = selectorName;
27 this.propertyName = propertyName;
28 this.propertyType = propertyType;
29 this.headerLabel = headerLabel;
30 }
31
32 /**
33 *
34 * @param selectorName
35 * @param propertyName
36 * @param propertyType
37 * @param headerLabel
38 * @param columnSize
39 */
40 public ColumnDefinition(String selectorName, String propertyName,
41 int propertyType, String headerLabel, int columnSize) {
42 this.selectorName = selectorName;
43 this.propertyName = propertyName;
44 this.propertyType = propertyType;
45 this.headerLabel = headerLabel;
46 this.columnSize = columnSize;
47 }
48
49 public String getSelectorName() {
50 return selectorName;
51 }
52
53 public void setSelectorName(String selectorName) {
54 this.selectorName = selectorName;
55 }
56
57 public String getPropertyName() {
58 return propertyName;
59 }
60
61 public void setPropertyName(String propertyName) {
62 this.propertyName = propertyName;
63 }
64
65 public String getHeaderLabel() {
66 return headerLabel;
67 }
68
69 public void setHeaderLabel(String headerLabel) {
70 this.headerLabel = headerLabel;
71 }
72
73 public int getPropertyType() {
74 return propertyType;
75 }
76
77 public void setPropertyType(int propertyType) {
78 this.propertyType = propertyType;
79 }
80
81 public int getColumnSize() {
82 return columnSize;
83 }
84
85 public void setColumnSize(int columnSize) {
86 this.columnSize = columnSize;
87 }
88 }