01: /*
02: * This is free software, licensed under the Gnu Public License (GPL)
03: * get a copy from <http://www.gnu.org/licenses/gpl.html>
04: */
05: package henplus.view;
06:
07: /**
08: * <p>Title: ExtendedColumn</p>
09: * <p>Description:<br>
10: * Created on: 25.07.2003</p>
11: * @version $Id: ExtendedColumn.java,v 1.4 2004/03/07 14:22:03 hzeller Exp $
12: * @author <a href="mailto:martin.grotzke@javakaffee.de">Martin Grotzke</a>
13: */
14: public final class ExtendedColumn extends Column {
15:
16: public static final int ALIGN_LEFT = ColumnMetaData.ALIGN_LEFT;
17: public static final int ALIGN_CENTER = ColumnMetaData.ALIGN_CENTER;
18: public static final int ALIGN_RIGHT = ColumnMetaData.ALIGN_RIGHT;
19:
20: private final int _colspan;
21: private final int _alignment;
22: private boolean _outputBold;
23:
24: public ExtendedColumn(int value, int alignment) {
25: super (value);
26: _colspan = 1;
27: _alignment = alignment;
28: }
29:
30: public ExtendedColumn(String text, int alignment) {
31: super (text);
32: _colspan = 1;
33: _alignment = alignment;
34: }
35:
36: public ExtendedColumn(int value, int colspan, int alignment) {
37: super (value);
38: _colspan = colspan;
39: _alignment = alignment;
40: }
41:
42: public ExtendedColumn(String text, int colspan, int alignment) {
43: super (text);
44: _colspan = colspan;
45: _alignment = alignment;
46: }
47:
48: public int getColspan() {
49: return _colspan;
50: }
51:
52: public int getAlignment() {
53: return _alignment;
54: }
55:
56: /**
57: * Call this to test if there's a special output mode set.
58: */
59: public boolean isBoldRequested() {
60: return _outputBold;
61: }
62:
63: public void setBoldRequested(boolean bold) {
64: _outputBold = bold;
65: }
66: }
|