svn-gvsig-desktop / tags / v1_0_RELEASE / applications / appgvSIG / src / com / iver / cit / gvsig / gui / tables / Column.java @ 9167
History | View | Annotate | Download (736 Bytes)
1 | 4706 | caballero | package com.iver.cit.gvsig.gui.tables; |
---|---|---|---|
2 | |||
3 | import com.iver.utiles.XMLEntity; |
||
4 | |||
5 | |||
6 | /**
|
||
7 | * This class save the values of the graphic interface of the columns.
|
||
8 | *
|
||
9 | * @author Vicente Caballero Navarro
|
||
10 | *
|
||
11 | */
|
||
12 | public class Column { |
||
13 | private int width = 75; |
||
14 | |||
15 | public Column() {
|
||
16 | } |
||
17 | |||
18 | public int getWidth() { |
||
19 | return width;
|
||
20 | } |
||
21 | |||
22 | public XMLEntity getXMLEntity() {
|
||
23 | XMLEntity xml = new XMLEntity();
|
||
24 | xml.putProperty("width", width);
|
||
25 | |||
26 | return xml;
|
||
27 | } |
||
28 | |||
29 | public static Column createColumn(XMLEntity xml) { |
||
30 | Column column = new Column();
|
||
31 | column.setWidth(xml.getIntProperty("width"));
|
||
32 | |||
33 | return column;
|
||
34 | } |
||
35 | |||
36 | public void setWidth(int minWidth) { |
||
37 | width = minWidth; |
||
38 | } |
||
39 | } |