Revision 34114 branches/v2_0_0_prep/applications/appgvSIG/src/org/gvsig/app/project/documents/view/legend/gui/ThemeManagerWindow.java

View differences:

ThemeManagerWindow.java
98 98
	private  void initialize() {
99 99
		for (int i = 0; i < pages.size(); i++) {
100 100
			Class<? extends AbstractThemeManagerPage> pageClass = pages.get(i);
101
			AbstractThemeManagerPage tab;
101
			AbstractThemeManagerPage tab = null;
102 102
			try {
103 103
				tab = pageClass.newInstance();
104
//				if (tab.isSuitableFor(layer)) {
105
				if (s.get(tab.getClass()).contains(layer.getClass())){
106
					tab.setModel(layer);
107
					tabs.addTab(tab.getName(), tab);
108
				}
109 104
			} catch (InstantiationException e) {
110 105
				NotificationManager.addError("Trying to instantiate an interface" +
111 106
						" or abstract class + "+pageClass.getName(), e);
......
114 109
						pageClass.getName()	+ " class have an anonymous" +
115 110
						" constructor?", e);
116 111
			}
112
			if (tab!=null){
113
			    if (s.get(tab.getClass()).contains(layer.getClass())){
114
			        tab.setModel(layer);
115
			        tabs.addTab(tab.getName(), tab);
116
			    }
117
			}
117 118
		}
118 119

  
119 120
		if (tabs.getComponentCount()>selectedTabIndex) {

Also available in: Unified diff