private void setDialogValues(MultiInputDialog dialog, PlugInContext context) { dialog.setSideBarDescription(sideBarText); dialog.addLayerComboBox(CLAYER, context.getCandidateLayer(0), context.getLayerManager()); List listNumAttributes = FeatureSchemaTools.getFieldsFromLayerWithoutGeometryAndString(context.getCandidateLayer(0)); Object valAttribute = listNumAttributes.size() > 0 ? listNumAttributes.iterator().next() : null; final JComboBox jcb_attribute = dialog.addComboBox(this.ATTRIBUTE, valAttribute, listNumAttributes, this.ATTRIBUTE); if (listNumAttributes.size() == 0) jcb_attribute.setEnabled(false); List listClassifiers = Classifier1D.getAvailableClassificationMethods(); Object valClassifier = listNumAttributes.size() > 0 ? listNumAttributes.iterator().next() : null; final JComboBox jcb_classifier = dialog.addComboBox(this.CLASSIFIER, valClassifier, listClassifiers, this.CLASSIFIER); dialog.addIntegerField(T2, this.ranges, 6, T2); dialog.addCheckBox(this.OPTIMIZEWITHKMEANS, false); dialog.addCheckBox(this.PROCESSNULLASZERO, false); dialog .getComboBox(CLAYER) .addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { List list = getFieldsFromLayerWithoutGeometryAndString(); if (list.size() == 0) { jcb_attribute.setModel(new DefaultComboBoxModel(new String[0])); jcb_attribute.setEnabled(false); } else { jcb_attribute.setModel(new DefaultComboBoxModel(list.toArray(new String[0]))); jcb_attribute.setEnabled(true); } } }); }