4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.58 $ |
* @version $Revision: 1.59 $ |
* |
* Last modification: $Date: 2003/07/25 11:51:33 $ |
* $Id: PluginManager.java,v 1.58 2003/07/25 11:51:33 smcsporr Exp $ |
* Last modification: $Date: 2003/07/25 16:40:07 $ |
* $Id: PluginManager.java,v 1.59 2003/07/25 16:40:07 swalkenh Exp $ |
*/ |
|
package src.plugins; |
56,7 → 56,7 |
* |
* @author Sascha Walkenhorst |
* |
* @version $Revision: 1.58 $ Last modification: $Date: 2003/07/25 11:51:33 $ |
* @version $Revision: 1.59 $ Last modification: $Date: 2003/07/25 16:40:07 $ |
*/ |
public class PluginManager implements TreeSelectionListener, |
PluginManagerInterface, |
726,12 → 726,21 |
* |
* author Sascha Walkenhorst |
* |
* Last revision: 22-Jul-2003 by Sascha W. |
* Last revision: 25-Jul-2003 by Sascha W. |
*/ |
private String chooseDefaultPluginName() { |
/* create the available plugins as options for dialog */ |
Object[] options = plugins.keySet().toArray(); |
|
Object[] temp = plugins.keySet().toArray(); |
|
Object[] options = new Object[temp.length+1]; |
options[temp.length] = "none"; |
for (int i = 0; i < temp.length; i++) { |
options[i] = temp[i]; |
} |
|
/* for preselection of the actual default plugin */ |
String initialSelectionValue = defaultPluginName; |
|
String selected = (String) JOptionPane.showInputDialog(null, |
"Which plugin should act as the default plugin ?", |
"Default plugin selection:", |
738,8 → 747,18 |
JOptionPane.QUESTION_MESSAGE, |
null, |
options, |
null); |
initialSelectionValue); |
|
/* case: user aborted selection */ |
if (selected == null) { |
return defaultPluginName; |
} |
|
/* case: user selected "none" */ |
if (selected == "none") { |
return null; |
} |
|
return selected; |
} |
|
1309,8 → 1328,6 |
/* case: show the actual configuration */ |
if (e.getActionCommand() == "Show actual configuration") { |
listVariables(); |
System.out.println(e.paramString()); |
System.out.println(e.getSource()); |
} |
} |
|