metaData = md;
ConfigurationParameterDeclarations cpd = metaData.getConfigurationParameterDeclarations();
ConfigurationParameter[] parameters = cpd.getConfigurationParameters();
ConfigurationParameterSettings cps = metaData.getConfigurationParameterSettings();
if (parameters == null || cps == null)
return;
// Loop through parameters, creating label captions and
// an appropriate component for the data type:
for (int i = 0; i < parameters.length; i++) {
String name = parameters[i].getName();
String type = parameters[i].getType();
boolean multiValued = parameters[i].isMultiValued();
boolean requiresFileSelector = false;
if ((name.endsWith("Dir") || name.endsWith("Directory") || name.endsWith("Descriptor") || name
.indexOf("File") != -1)
&& type.equals("String"))
requiresFileSelector = true;
boolean justDirectories = false;
if (requiresFileSelector && (name.endsWith("Dir") || name.endsWith("Directory"))) {
justDirectories = true;
}
String caption = getCaptionFromName(name);
add(new JLabel(caption));
JComponent field = null;
Object parameterValue = cps.getParameterValue(name);
if (type.equals("Boolean"))
field = new JCheckBox((String) null, (parameterValue == null) ? false
: ((Boolean) parameterValue).booleanValue());
else if (multiValued == false) {