Revision 43601 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/documents/view/gui/DefaultViewInformationArea.java
DefaultViewInformationArea.java | ||
---|---|---|
28 | 28 |
import javax.swing.JComponent; |
29 | 29 |
import javax.swing.JPanel; |
30 | 30 |
import javax.swing.JTabbedPane; |
31 |
import org.gvsig.tools.swing.api.Component; |
|
31 | 32 |
import org.slf4j.Logger; |
32 | 33 |
import org.slf4j.LoggerFactory; |
33 | 34 |
|
... | ... | |
41 | 42 |
|
42 | 43 |
private static class Element implements ViewInformationAreaElement { |
43 | 44 |
|
44 |
private final JComponent component;
|
|
45 |
private final Component component; |
|
45 | 46 |
private final String id; |
46 | 47 |
private String label; |
47 | 48 |
private Icon icon; |
48 | 49 |
private int priority; |
49 | 50 |
private String tip; |
50 | 51 |
|
51 |
public Element(JComponent component, String id, int priority, String label, Icon icon, String tip) {
|
|
52 |
public Element(Component component, String id, int priority, String label, Icon icon, String tip) { |
|
52 | 53 |
this.component = component; |
53 | 54 |
this.id = id; |
54 | 55 |
this.priority = priority; |
... | ... | |
63 | 64 |
} |
64 | 65 |
|
65 | 66 |
@Override |
66 |
public JComponent asJComponent() {
|
|
67 |
public Component getComponent() {
|
|
67 | 68 |
return this.component; |
68 | 69 |
} |
69 | 70 |
|
70 | 71 |
@Override |
72 |
public JComponent asJComponent() { |
|
73 |
return this.component.asJComponent(); |
|
74 |
} |
|
75 |
|
|
76 |
@Override |
|
71 | 77 |
public String getLabel() { |
72 | 78 |
return this.label; |
73 | 79 |
} |
... | ... | |
114 | 120 |
} |
115 | 121 |
|
116 | 122 |
@Override |
117 |
public void add(JComponent component, String id, int priority, String label, Icon icon, String tip) { |
|
123 |
public void add(final JComponent component, String id, int priority, String label, Icon icon, String tip) { |
|
124 |
this.add( |
|
125 |
new Component() { |
|
126 |
@Override |
|
127 |
public JComponent asJComponent() { |
|
128 |
return component; |
|
129 |
} |
|
130 |
}, |
|
131 |
id, priority, label, icon, tip |
|
132 |
); |
|
133 |
} |
|
134 |
|
|
135 |
@Override |
|
136 |
public void add(Component component, String id, int priority, String label, Icon icon, String tip) { |
|
118 | 137 |
Element element = new Element(component, id, priority, label, icon, tip); |
119 | 138 |
this.elements.put(id, element); |
120 | 139 |
this.update(); |
Also available in: Unified diff