KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > model > impl > PropertyImpl


1 /*
2  * ====================================================================
3  * This software is subject to the terms of the Common Public License
4  * Agreement, available at the following URL:
5  * http://www.opensource.org/licenses/cpl.html .
6  * Copyright (C) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.jpivot.olap.model.impl;
14
15 import com.tonbeller.jpivot.olap.model.Property;
16 import com.tonbeller.jpivot.olap.model.Visitor;
17
18 /**
19  * Created on 11.10.2002
20  *
21  * @author av
22  */

23 public class PropertyImpl extends PropertyHolderImpl implements Property {
24   String JavaDoc name;
25   String JavaDoc label;
26   String JavaDoc value;
27   boolean normalizable = true;
28   
29   Alignment alignment = Alignment.LEFT;
30
31   public Alignment getAlignment() {
32     return alignment;
33   }
34
35   public void setAlignment(Alignment alignment) {
36     this.alignment = alignment;
37   }
38
39   public PropertyImpl() {
40   }
41
42   public PropertyImpl(String JavaDoc name, String JavaDoc value) {
43     this.name = name;
44     this.label = name;
45     this.value = value;
46   }
47
48   public PropertyImpl(String JavaDoc name, String JavaDoc value, Alignment alignment) {
49     this.name = name;
50     this.label = name;
51     this.value = value;
52     this.alignment = alignment;
53   }
54
55   public PropertyImpl(String JavaDoc name, String JavaDoc label, String JavaDoc value, Alignment alignment) {
56     this.name = name;
57     this.label = label;
58     this.value = value;
59     this.alignment = alignment;
60   }
61   
62   public String JavaDoc getName() {
63     return name;
64   }
65
66   public String JavaDoc getValue() {
67     return value;
68   }
69
70   public void setName(String JavaDoc name) {
71     this.name = name;
72   }
73
74   public void setValue(String JavaDoc value) {
75     this.value = value;
76   }
77
78   public void accept(Visitor visitor) {
79     visitor.visitProperty(this);
80   }
81
82   public Object JavaDoc getRootDecoree() {
83     return this;
84   }
85
86   public void setLabel(String JavaDoc label) {
87     this.label = label;
88   }
89
90   public String JavaDoc getLabel() {
91     return label;
92   }
93
94   public boolean isNormalizable() {
95     return normalizable;
96   }
97
98   public void setNormalizable(boolean normalizable) {
99     this.normalizable = normalizable;
100   }
101
102 }
103
Popular Tags