01: package org.swingml.tablebrowser.ext;
02:
03: import org.swingml.model.*;
04:
05: /**
06: * @author dpitt
07: */
08: public class TableBrowserColumnModel extends TableColumnModel {
09:
10: private int columnOrder = -1;
11: private int sortOrder = 0;
12: private int sortType = 0; // ascending = 0
13: private String value = null;
14: private int width = -1;
15:
16: public TableBrowserColumnModel() {
17: super ();
18: }
19:
20: /**
21: * @return Returns the columnOrder.
22: */
23: public int getColumnOrder() {
24: return columnOrder;
25: }
26:
27: /**
28: * @return Returns the sortOrder.
29: */
30: public int getSortOrder() {
31: return sortOrder;
32: }
33:
34: /**
35: * @return Returns the sortType.
36: */
37: public int getSortType() {
38: return sortType;
39: }
40:
41: public String getText() {
42: return super .getText();
43: }
44:
45: public String getValue() {
46: return value;
47: }
48:
49: /**
50: * Gets the preferred width for the column.
51: *
52: * @return the preferred width for the column
53: */
54: public int getWidth() {
55: return width;
56: }
57:
58: public void setColumnOrder(int order) {
59: this .columnOrder = order;
60:
61: }
62:
63: /**
64: * @param order
65: * The sortOrder to set.
66: */
67: public void setSortOrder(int order) {
68: this .sortOrder = order;
69: }
70:
71: /**
72: * @param type
73: * The sortType to set.
74: */
75: public void setSortType(int type) {
76: this .sortType = type;
77: }
78:
79: public void setText(String aText) {
80: super .setText(aText);
81: }
82:
83: public void setValue(String aValue) {
84: this .value = aValue;
85: }
86:
87: /**
88: * Sets the preferred width for the column.
89: *
90: * @param width
91: * the preferred width for the column.
92: */
93: public void setWidth(int aWidth) {
94: this.width = aWidth;
95: }
96: }
|