if (fc.showDialog(panel, SwingUIMessages.getString("TemplateEditor.CAPTION_SELECT_SETTINGS_FILE")) == JFileChooser.APPROVE_OPTION) { //$NON-NLS-1$
fields[PARAMS_FILE_NAME].setText(fc.getSelectedFile().getAbsolutePath());
}
}
else if (src == buttons[TARGET]) {
ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_TARGET_CLASS"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_TARGET_CLASS"),null,classes[0],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
d.setVisible(true);
int result = d.getSelectedIndex();
if (result >= 0) {
fields[TARGET].setText(((Class<?>) classes[0].get(result)).getName());
}
}
else if (src == buttons[CONVERTER]) {
ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_CONVERTER"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_CONVERTER"),null,classes[1],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
d.setVisible(true);
int result = d.getSelectedIndex();
if (result >= 0) {
fields[CONVERTER].setText(((Class<?>) classes[1].get(result)).getName());
}
}
else if (src == buttons[FORMATTER]) {
ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_FORMAT"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_FORMAT"),null,classes[2],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
d.setVisible(true);
int result = d.getSelectedIndex();
if (result >= 0) {
fields[FORMATTER].setText(((Class<?>) classes[2].get(result)).getName());
}
}
else if (src == buttons[DBINPUT]) {
ListSelectionDialog d = new ListSelectionDialog(parent,SwingUIMessages.getString("TemplateEditor.TITLE_SELECT_DBBUILDER"),SwingUIMessages.getString("TemplateEditor.MESSAGE_SELECT_DBBUILDER"),null,classes[3],new PlugInRenderer("")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
d.setVisible(true);
int result = d.getSelectedIndex();
if (result >= 0) {
fields[DBINPUT].setText(((Class<?>) classes[3].get(result)).getName());
}
}