1 package org
.argeo
.eclipse
.ui
;
3 import org
.eclipse
.jface
.viewers
.ColumnLabelProvider
;
6 * Wraps the definition of a column to be used in the various JFace viewers
7 * (typically tree and table). It enables definition of generic viewers which
8 * column can be then defined externally. Also used to generate export.
10 public class ColumnDefinition
{
11 private ColumnLabelProvider labelProvider
;
13 private int weight
= 0;
14 private int minWidth
= 120;
16 public ColumnDefinition(ColumnLabelProvider labelProvider
, String label
) {
17 this.labelProvider
= labelProvider
;
21 public ColumnDefinition(ColumnLabelProvider labelProvider
, String label
,
23 this.labelProvider
= labelProvider
;
26 this.minWidth
= weight
;
29 public ColumnDefinition(ColumnLabelProvider labelProvider
, String label
,
30 int weight
, int minimumWidth
) {
31 this.labelProvider
= labelProvider
;
34 this.minWidth
= minimumWidth
;
37 public ColumnLabelProvider
getLabelProvider() {
41 public void setLabelProvider(ColumnLabelProvider labelProvider
) {
42 this.labelProvider
= labelProvider
;
45 public String
getLabel() {
49 public void setLabel(String label
) {
53 public int getWeight() {
57 public void setWeight(int weight
) {
61 public int getMinWidth() {
65 public void setMinWidth(int minWidth
) {
66 this.minWidth
= minWidth
;