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 / TagControler.java @ 1405
History | View | Annotate | Download (1.05 KB)
1 |
|
---|---|
2 |
package org.gvsig.tools.swing.impl.dynclass; |
3 |
|
4 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
5 |
|
6 |
public class TagControler extends TagView { |
7 |
private static final long serialVersionUID = -7720148506344063619L; |
8 |
private final WindowManager_v2 windowManager; |
9 |
|
10 |
public TagControler(WindowManager_v2 windowManager) {
|
11 |
this.windowManager = windowManager;
|
12 |
} |
13 |
|
14 |
public void set(PairNameValue pair) { |
15 |
this.cboName.setSelectedItem(pair.getName());
|
16 |
if( pair.getValue()==null ) { |
17 |
this.cboValue.setSelectedItem(""); |
18 |
} else {
|
19 |
this.cboValue.setSelectedItem(pair.getValue().toString());
|
20 |
} |
21 |
} |
22 |
|
23 |
public void fetch(PairNameValue pair) { |
24 |
if( this.cboName.getSelectedItem()==null ) { |
25 |
return;
|
26 |
} |
27 |
pair.setName(this.cboName.getSelectedItem().toString());
|
28 |
if( this.cboValue.getSelectedItem()==null ) { |
29 |
pair.setValue(null);
|
30 |
} else {
|
31 |
pair.setValue(this.cboValue.getSelectedItem().toString());
|
32 |
} |
33 |
} |
34 |
} |