gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.swing / org.gvsig.tools.swing.impl / src / main / java / org / gvsig / tools / swing / impl / dynclass / DynObjectValueItemControler.java @ 1405
History | View | Annotate | Download (909 Bytes)
1 |
package org.gvsig.tools.swing.impl.dynclass; |
---|---|
2 |
|
3 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
4 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
5 |
|
6 |
public class DynObjectValueItemControler extends DynObjectValueItemView { |
7 |
|
8 |
private static final long serialVersionUID = 4266513758195405477L; |
9 |
private final WindowManager_v2 windowManager; |
10 |
|
11 |
public DynObjectValueItemControler(WindowManager_v2 windowManager) {
|
12 |
this.windowManager = windowManager;
|
13 |
} |
14 |
|
15 |
public void set(DynObjectValueItem item) { |
16 |
this.txtLabel.setText(item.getLabel());
|
17 |
if (item.getValue() == null) { |
18 |
this.txtValue.setText(""); |
19 |
} else {
|
20 |
this.txtValue.setText(item.getValue().toString());
|
21 |
} |
22 |
} |
23 |
|
24 |
public void fetch(DynObjectValueItem item) { |
25 |
item.setLabel(this.txtLabel.getText());
|
26 |
item.setValue(this.txtValue.getText());
|
27 |
} |
28 |
} |