01: package com.xoetrope.export;
02:
03: import javax.swing.JTable;
04: import javax.swing.table.TableModel;
05:
06: /**
07: *
08: * <p> Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
09: * the GNU Public License (GPL), please see license.txt for more details. If
10: * you make commercial use of this software you must purchase a commercial
11: * license from Xoetrope.</p>
12: * <p> $Revision: 1.2 $</p>
13: */
14: public abstract class TableModelBlock extends Block {
15: private String style, headerStyle, width;
16:
17: public TableModelBlock() {
18: }
19:
20: public void setTableStyle(String styleName) {
21: style = styleName;
22: }
23:
24: public void setHeaderStyle(String styleName) {
25: headerStyle = styleName;
26: }
27:
28: public void setWidth(String widthStr) {
29: width = widthStr;
30: }
31:
32: public String getTableStyle() {
33: return style;
34: }
35:
36: public String getHeaderStyle() {
37: return headerStyle;
38: }
39:
40: /**
41: * Get the optional width paramenter
42: * @return the width as a string or null
43: */
44: public String getWidth() {
45: return width;
46: }
47:
48: protected abstract String exportModel(JTable table,
49: TableModel tableModel, boolean includeHeader);
50:
51: }
|