featureTabs = new CTabFolder(configTabs,SWT.NONE);
cTabFeatures.setControl(featureTabs);
for (int i=0; i<((Robot)component).getFeatures().length; i++)
{
Plugin feature = null;
if (((Robot)component).getFeatures() != null)
feature = ClassManager.getInstance().getPluginByName( ((Robot)component).getFeatures()[i].getClass().getCanonicalName() );
if (feature != null)
{
cTabItem1 = new CTabItem(featureTabs, SWT.NONE);
cTabItem1.setText( ((Robot)component).getFeatures()[i].getDescription() );
{
FeatureGUI featureGUI = (FeatureGUI)feature.makeGUInstance(((Robot)component).getFeatures()[i]);
configPannelFeature = featureGUI.getConfigPannel( featureTabs, featureTabs.getStyle());
if (configPannelFeature != null)
{
//Fuerzo el layout que trae el feature para qeu se ajuste al diaogo
GridData configPannelFeatureLData = new GridData();
configPannelFeatureLData.horizontalAlignment = GridData.FILL;
configPannelFeatureLData.verticalAlignment = GridData.FILL;
configPannelFeatureLData.grabExcessHorizontalSpace = true;
configPannelFeatureLData.grabExcessVerticalSpace = true;
configPannelFeature.setLayoutData(configPannelFeatureLData);
cTabItem1.setControl(configPannelFeature);
}
configElements.add(featureGUI);
}
}
featureTabs.setSelection(0);
featureTabs.layout(true);
}
}
Plugin neuralNet = null;
if ( ((Robot)component).getNeuralNetwork() != null )
neuralNet = ClassManager.getInstance().getPluginByName( ((Robot)component).getNeuralNetwork().getClass().getCanonicalName() );
if (neuralNet != null)
{
CTabItem cTabNeuralNetwork = new CTabItem(configTabs, SWT.NONE);
cTabNeuralNetwork.setImage(SWTResourceManager.getImage("resources/icons/icon24x24/enable/neuron.png"));
cTabNeuralNetwork.setText("Red Neuronal");
{
NeuralNetworkGUI neuralNetworkGUI = (NeuralNetworkGUI)neuralNet.makeGUInstance(((Robot)component).getNeuralNetwork());
Composite configPannelNeuralNet = neuralNetworkGUI.getConfigPannel( configTabs,SWT.NONE);
if (configPannelNeuralNet != null)
{
//Fuerzo el layout para que se adapte al dialogo
GridData configPannelNeuralNetLData = new GridData();
configPannelNeuralNetLData.horizontalAlignment = GridData.FILL;
configPannelNeuralNetLData.verticalAlignment = GridData.FILL;
configPannelNeuralNetLData.grabExcessHorizontalSpace = true;
configPannelNeuralNetLData.grabExcessVerticalSpace = true;
configPannelNeuralNet.setLayoutData(configPannelNeuralNetLData);
cTabNeuralNetwork.setControl(configPannelNeuralNet);
configPannelNeuralNet.layout(true);
}
configElements.add(neuralNetworkGUI);
}
}
Plugin commChannel = null;
if ( ((Robot)component).getCommChannel() != null )
commChannel = ClassManager.getInstance().getPluginByName( ((Robot)component).getCommChannel().getClass().getCanonicalName() );
if (commChannel != null)
{
CTabItem cTabCommChannel = new CTabItem(configTabs,SWT.NONE);
cTabCommChannel.setText("Canal de Comunicaciones");
cTabCommChannel.setImage(SWTResourceManager.getImage("resources/icons/icon32x32/enable/Connection Configuration.png"));
{
CommunicationChannelGUI communicationChannelGUI= (CommunicationChannelGUI)commChannel.makeGUInstance(((Robot)component).getCommChannel());
Composite configPannelcommChannel = communicationChannelGUI.getConfigPannel(configTabs, SWT.NONE);
if (configPannelcommChannel != null)
{
// Fuerzo el layout para que se ajuste al dialogo
GridData configPannelcommChannelLData = new GridData();