JComponent comp = compAndLabel.getKey();
if (comp instanceof WheelSwitch) {
WheelSwitch w = ((WheelSwitch) comp);
if (w.getValue() > 0) {
Label labelName = compAndLabel.getValue();
Entry entry = null;
for (Entry e : section.getEntries()) {
if (e.getKey().equalsIgnoreCase(labelName.getText().trim())) {
entry = e;
}
}
displayError(entry, section, null, labelName, comp,
"Entries of recording section are mutually exclusive", GENERAL);
}
}
}
}
} else {
for (final Entry entry : section.getEntries()) {
// if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, sectionPanel, section, null, entry, GENERAL, null);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, null, e.getLabelName(), e.getComponent(),
e.getMessage(), GENERAL);
}
e.printStackTrace();
LOGGER.log(Level.SEVERE, e.getMessage());
}
// }
}
for (final FSObject fsObject : section.getObjects()) {
if (fsObject != null) {
Plugin pluginObj = getPluginAndProcessParamsWithDefaultValues(plugins, section,
fsObject);
objectPanel = buildObjectPanel(fsObject);
final GridBagConstraints sectionConstraints = new GridBagConstraints();
sectionConstraints.gridx = 0;
sectionConstraints.gridy = GridBagConstraints.RELATIVE;
sectionConstraints.gridwidth = GridBagConstraints.REMAINDER;
sectionConstraints.weightx = 1;
sectionConstraints.weighty = 1;
sectionConstraints.anchor = GridBagConstraints.NORTHWEST;
sectionConstraints.fill = GridBagConstraints.HORIZONTAL;
sectionConstraints.insets = new Insets(5, 5, 5, 5);
sectionPanel.add(objectPanel, sectionConstraints);
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, sectionPanel, fsObject, pluginObj, entry,
GENERAL, null);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), GENERAL);
}
e.printStackTrace();
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
}
}
}
generalPanel.add(sectionPanel, constraints);
}
} else {
for (final FSObject fsObject : section.getObjects()) {
if (fsObject != null) {
// Choose plugin
Plugin pluginObj = getPluginAndProcessParamsWithDefaultValues(plugins, section,
fsObject);
objectPanel = buildObjectPanel(fsObject);
if (fsObject instanceof ContinuousActuator) {
continuousActuatorPanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, continuousActuatorPanel, fsObject, pluginObj,
entry, CONTINUOUS_ACTUATORS, customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), CONTINUOUS_ACTUATORS);
}
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
} else if (fsObject instanceof Actuator) {
actuatorPanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, actuatorPanel, fsObject, pluginObj, entry,
ACTUATORS, customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), ACTUATORS);
}
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
} else if (fsObject instanceof Sensor) {
sensorPanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, sensorPanel, fsObject, pluginObj, entry,
SENSORS, customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), SENSORS);
}
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
} else if (fsObject instanceof TimeBase) {
timebasePanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, timebasePanel, fsObject, pluginObj, entry,
TIMEBASE, customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), TIMEBASE);
}
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
} else if (fsObject instanceof Hook) {
hookPanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, hookPanel, fsObject, pluginObj, entry, HOOKS,
customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {
displayError(entry, section, fsObject, e.getLabelName(),
e.getComponent(), e.getMessage(), HOOKS);
}
LOGGER.log(Level.SEVERE, e.getMessage());
}
}
}
} else if (fsObject instanceof Monitor) {
monitorPanel.add(objectPanel, constraints);
CustomParameterPanel customParametersPanel = buildCustomParametersPanel(
(Actor) fsObject, pluginObj);
if (customParametersPanel != null) {
objectPanel.add(customParametersPanel, customParametersPanelConstraints);
}
for (final Entry entry : fsObject.getEntries()) {
if ((!entry.isExpert()) || (entry.isExpert() && isExpert)) {
try {
buidEntryGUI(objectPanel, monitorPanel, fsObject, pluginObj, entry,
MONITORS, customParametersPanel);
} catch (FSParsingException e) {
if (e.getComponent() != null && e.getLabelName() != null) {