Revision 212 trunk/org.gvsig.scripting/org.gvsig.scripting.swing/org.gvsig.scripting.swing.impl/src/main/java/org/gvsig/scripting/swing/impl/composer/JHelpSelection.java

View differences:

JHelpSelection.java
6 6
import java.awt.event.ActionListener;
7 7
import java.util.HashMap;
8 8
import java.util.Iterator;
9
import java.util.Map;
9 10
import java.util.Set;
10 11

  
11 12
import javax.swing.DefaultListModel;
......
43 44
		this.uimanager= uimanager;
44 45
		this.helpmanager = uimanager.getManager().getHelpManager();
45 46
		
46
		HashMap methods = (HashMap) uimanager.getManager().getHelpManager().findMethods(text);
47
        Map<String, ScriptingHelpMethod> methods =
48
            uimanager.getManager().getHelpManager().findMethods(text);
47 49
		final HashMap<String, String> helpReferences = new HashMap<String, String>();
48 50
		
49 51
		ListSelectionListener menuListener = new ListSelectionListener() {
......
58 60
							selection=selection+s[i];
59 61
						}
60 62
					}
61
				launchException(this, 1, (String) helpReferences.get(selection));					
63
				launchException(this, 1, helpReferences.get(selection));					
62 64
				}
63 65
			}
64 66

  
......
66 68
		DefaultListModel listModel = new DefaultListModel();
67 69

  
68 70
		for(int x=0;x<methods.size();x++){
69
			Set keys = methods.keySet();
71
            Set<String> keys = methods.keySet();
70 72
			Object[] l = keys.toArray();
71 73

  
72
			ScriptingHelpMethod helpMethod = (ScriptingHelpMethod) methods.get(l[x]);
73
			Iterator it = helpMethod.iterator();
74
			ScriptingHelpMethod helpMethod = methods.get(l[x]);
75
            Iterator<ScriptingHelpClass> it = helpMethod.iterator();
74 76
			while(it.hasNext()){
75
				ScriptingHelpClass cn = (ScriptingHelpClass)it.next();
77
				ScriptingHelpClass cn = it.next();
76 78
				if(!(helpReferences.containsKey(helpMethod.getName()) && helpReferences.containsValue(cn.getName()))){
77 79
					helpReferences.put(cn.getName(),cn.getUrl());
78 80
				}
......
83 85

  
84 86
		
85 87
		for(int x=0;x<helpReferences.size();x++){
86
			Set keys = helpReferences.keySet();
88
            Set<String> keys = helpReferences.keySet();
87 89
			Object[] l = keys.toArray();
88 90
			
89 91
			listModel.addElement(l[x].toString());
......
108 110

  
109 111
	}
110 112

  
111
	public void actionAccept() {
113
	@Override
114
    public void actionAccept() {
112 115
		int selected = list.getSelectedIndex();
113 116
		if(selected==-1){
114 117
			JOptionPane.showMessageDialog(null, "Please, select any help", "Error", JOptionPane.ERROR_MESSAGE);
......
117 120
		}
118 121
	}
119 122

  
120
	public void actionApply() {
123
	@Override
124
    public void actionApply() {
121 125
	}
122 126

  
123
	public void actionCancel() {
127
	@Override
128
    public void actionCancel() {
124 129
		setVisible(false);
125 130
	}
126 131

  
127
	public boolean isVisibleAccept() {
132
	@Override
133
    public boolean isVisibleAccept() {
128 134
		return this.isAcceptActive;
129 135
	}
130 136

  
131
	public boolean isVisibleApply() {
137
	@Override
138
    public boolean isVisibleApply() {
132 139
		return false;
133 140
	}
134 141

  
135
	public boolean isVisibleCancel() {
142
	@Override
143
    public boolean isVisibleCancel() {
136 144
		return true;
137 145
	}
138 146
	

Also available in: Unified diff