From: <hee...@us...> - 2008-11-04 16:27:28
|
Revision: 1490 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1490&view=rev Author: heeroyuy Date: 2008-11-04 16:27:07 +0000 (Tue, 04 Nov 2008) Log Message: ----------- -added new panel for options such as min. execution time -removed base uri's in the selection panel -some minor changes in the GUI Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/OptionPanel.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -89,9 +89,7 @@ * @param z ActionEvent */ public void actionPerformed(ActionEvent z) { - if(z.getActionCommand().equals("comboBoxChanged")) { - view.getPosAndNegSelectPanel().setOptionSpinner(); - } + if (z.getActionCommand().equals("Suggest " + id)) { if (model.getAlreadyLearned()) { @@ -102,6 +100,7 @@ view .renderErrorMessage("Could not start learning. No Examples where available"); } else { + view.getPosAndNegSelectPanel().setCheckBoxesEnable(false); model.setKnowledgeSource(); model.setReasoner(); model.setPositiveAndNegativeExamples(); @@ -111,7 +110,7 @@ dlLearner.start(); view.getRunButton().setEnabled(false); view.renderErrorMessage("Learning started"); - view.getPosAndNegSelectPanel().unsetCheckBoxes(); + //view.getPosAndNegSelectPanel().unsetCheckBoxes(); } } @@ -128,7 +127,8 @@ if (z.getActionCommand().equals("?")) { if (z.getSource().toString().contains("PosHelpButton")) { - String help = "A Instance that follows from the classdescription.\nPer Default all that belongs to the class."; + String help = "An individual that should be an instance of the learned class description.\n" + +"Per Default all that belongs to the class."; view.getPosAndNegSelectPanel().renderHelpMessage(help); } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -81,7 +81,6 @@ "org.dllearner.learningproblems.PosNegInclusionLP", "org.dllearner.learningproblems.PosNegDefinitionLP", "org.dllearner.algorithms.RandomGuesser", - "org.dllearner.algorithms.BruteForceLearner", "org.dllearner.algorithms.refinement.ROLearner", "org.dllearner.algorithms.refexamples.ExampleBasedROLComponent", "org.dllearner.algorithms.gp.GP" }; @@ -245,9 +244,7 @@ * This method adds the solutions from the DL-Learner to the List Model. */ private void addToListModel() { - evalDescriptions = la.getCurrentlyBestEvaluatedDescriptions(view - .getPosAndNegSelectPanel().getMaxNrOfResultsModelData(), view - .getPosAndNegSelectPanel().getMinAccuracyModelData(), true); + evalDescriptions = la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(), view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(), true); for (int j = 0; j < evalDescriptions.size(); j++) { if (isConsistent(evalDescriptions.get(j))) { suggestModel.add(j, new SuggestListItem(Color.GREEN, @@ -278,11 +275,12 @@ negativeExamples = new TreeSet<String>(); for (int i = 0; i < positiv.size(); i++) { if (positiv.get(i).isSelected()) { - positiveExamples.add(positiv.get(i).getText()); + + positiveExamples.add(editor.getModelManager().getActiveOntology().getURI().toString()+"#"+positiv.get(i).getText()); } if (negativ.get(i).isSelected()) { - negativeExamples.add(negativ.get(i).getText()); + negativeExamples.add(editor.getModelManager().getActiveOntology().getURI().toString()+"#"+negativ.get(i).getText()); } } } @@ -346,12 +344,12 @@ * classes. */ public void setLearningProblem() { - if (id.equals("Equivalent classes")) { + if (id.equals("equivalent classes")) { // sets the learning problem to PosNegDefinitionLP when the // dllearner should suggest an equivalent class lp = cm.learningProblem(PosNegDefinitionLP.class, rs); } - if (id.equals("Superclasses")) { + if (id.equals("superclasses")) { // sets the learning problem to PosNegInclusionLP when the dllearner // should suggest a subclass lp = cm.learningProblem(PosNegInclusionLP.class, rs); @@ -379,12 +377,9 @@ // TODO Auto-generated catch block e.printStackTrace(); } - System.out.println("3: " - + view.getPosAndNegSelectPanel().getMaxExecutionModelData()); cm.applyConfigEntry(la, "numberOfTrees", 100); cm.applyConfigEntry(la, "maxDepth", 5); - cm.applyConfigEntry(la, "maxExecutionTimeInSeconds", view - .getPosAndNegSelectPanel().getMaxExecutionModelData()); + cm.applyConfigEntry(la, "maxExecutionTimeInSeconds", view.getPosAndNegSelectPanel().getOptionPanel().getMaxExecutionTime()); try { // initializes the learning algorithm la.init(); @@ -399,17 +394,19 @@ */ public void run() { error = "Learning succesful"; + String message = "To view details about why a class description was suggested, please doubleclick on it."; // start the algorithm and print the best concept found la.start(); - description = new Description[la.getCurrentlyBestEvaluatedDescriptions( - view.getPosAndNegSelectPanel().getMaxNrOfResultsModelData()) + description = new Description[la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts()) .size()]; addToListModel(); // renders the errormessage view.renderErrorMessage(error); + view.setHintMessage(message); // reenables the run button view.getRunButton().setEnabled(true); // disables the cancel button + view.getPosAndNegSelectPanel().setCheckBoxesEnable(true); view.getSuggestClassPanel().setSuggestList(suggestModel); } @@ -458,7 +455,9 @@ setPositiveConcept(); for (Iterator<Individual> j = rs.getIndividuals().iterator(); j .hasNext();) { - String ind = j.next().toString(); + String ind = j.next().toManchesterSyntaxString(editor.getModelManager() + .getActiveOntology().getURI() + .toString()+"#", null); // checks if individual belongs to the selected concept if (setPositivExamplesChecked(ind)) { // when yes then it sets the positive example checked Modified: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml 2008-11-04 16:27:07 UTC (rev 1490) @@ -2,7 +2,7 @@ <plugin> <extension id="org.dllearner.tools.protege.ProtegePlugin" point="org.protege.editor.core.application.ViewComponent"> - <label value="DL-Learner Plugin"/> + <label value="Class Descriptions (including DL-Learner plugin)"/> <class value="org.dllearner.tools.protege.ProtegePlugin"/> <headerColor value="@org.protege.classcolor"/> <category value="@org.protege.classcategory"/> Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -18,9 +18,8 @@ * */ package org.dllearner.tools.protege; +import java.awt.Color; import java.awt.GridLayout; -import java.awt.Color; - import java.util.Iterator; import javax.swing.JDialog; @@ -100,7 +99,12 @@ private JScrollPane detailScroll; // Evaluated description of the selected concept - + private JPanel conceptPanel; + private JPanel accuracyPanel; + private JPanel posCoveredPanel; + private JPanel posNotCoveredPanel; + private JPanel negCoveredPanel; + private JPanel negNotCoveredPanel; private EvaluatedDescription eval; private final Color colorRed = Color.red; private JTextArea concept; @@ -128,7 +132,12 @@ */ public void renderDetailPanel(EvaluatedDescription desc) { eval = desc; - + conceptPanel = new JPanel(new GridLayout(0,2)); + accuracyPanel = new JPanel(new GridLayout(0,2)); + posCoveredPanel = new JPanel(new GridLayout(0,2)); + posNotCoveredPanel = new JPanel(new GridLayout(0,2)); + negCoveredPanel = new JPanel(new GridLayout(0,2)); + negNotCoveredPanel = new JPanel(new GridLayout(0,2)); accuracy = new JTextArea("Accuracy:"); accuracy.setEditable(false); conceptText = new JTextArea(); @@ -153,10 +162,10 @@ //sets accuracy text area not editable accuracyText.setEditable(false); //panel for the informations of the selected concept - examplePanel = new JPanel(new GridLayout(0, 2)); + examplePanel = new JPanel(new GridLayout(0,1)); //this method adds the informations for the selected concept to the panel setInformation(); - concept = new JTextArea("Concept:"); + concept = new JTextArea("Class Description:"); concept.setEditable(false); coveredPositiveExamples = new JLabel("Covered Positive Examples:"); coveredPositiveExamples.setForeground(colorGreen); @@ -174,18 +183,29 @@ detailPopup.setResizable(false); detailScroll = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); //adds all information to the example panel - examplePanel.add(concept); - examplePanel.add(conceptText); - examplePanel.add(accuracy); - examplePanel.add(accuracyText); - examplePanel.add(coveredPositiveExamples); - examplePanel.add(notCoveredPositiveExamples); - examplePanel.add(posCoveredText); - examplePanel.add(posNotCoveredText); - examplePanel.add(coveredNegativeExamples); - examplePanel.add(notCoveredNegativeExamples); - examplePanel.add(negCoveredText); - examplePanel.add(negNotCoveredText); + conceptPanel.add(concept); + conceptPanel.add(conceptText); + accuracyPanel.add(accuracy); + accuracyPanel.add(accuracyText); + //examplePanel.add(concept); + //examplePanel.add(conceptText); + //examplePanel.add(accuracy); + //examplePanel.add(accuracyText); + posCoveredPanel.add(coveredPositiveExamples); + posCoveredPanel.add(posCoveredText); + posNotCoveredPanel.add(notCoveredPositiveExamples); + posNotCoveredPanel.add(posNotCoveredText); + negCoveredPanel.add(coveredNegativeExamples); + negCoveredPanel.add(negCoveredText); + negNotCoveredPanel.add(notCoveredNegativeExamples); + + negNotCoveredPanel.add(negNotCoveredText); + examplePanel.add(conceptPanel); + examplePanel.add(accuracyPanel); + examplePanel.add(posCoveredPanel); + examplePanel.add(posNotCoveredPanel); + examplePanel.add(negCoveredPanel); + examplePanel.add(negNotCoveredPanel); detailScroll.setViewportView(examplePanel); detailPopup.add(detailScroll); } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -77,8 +77,8 @@ private static final String CLASS_EXPRESSION_EDITOR_LABEL = "Class expression editor"; private static final String CLASS_TREE_LABEL = "Class tree"; private static final String RESTRICTION_CREATOR_LABEL = "Restriction creator"; - private static final String SUGGEST_EQUIVALENT_CLASS_LABEL = "Suggest a equivalent class"; - private static final String SUGGEST_SUBCLASS_LABEL = "Suggest a subclass"; + private static final String SUGGEST_EQUIVALENT_CLASS_LABEL = "Suggest equivalent class"; + private static final String SUGGEST_SUBCLASS_LABEL = "Suggest super class"; private OWLEditorKit editorKit; @@ -127,10 +127,10 @@ editingComponent.add(tabbedPane); editingComponent.setPreferredSize(new Dimension(600, 520)); if(dllearner.getNrOfIndividuals()!=0) { - if (label.equals("Equivalent classes")) { + if (label.equals("equivalent classes")) { tabbedPane.add(SUGGEST_EQUIVALENT_CLASS_LABEL, dllearner); } - if (label.equals("Superclasses")) { + if (label.equals("superclasses")) { tabbedPane.add(SUGGEST_SUBCLASS_LABEL, dllearner); } } @@ -380,7 +380,7 @@ sugPanel = new SuggestClassPanel(); action = new ActionHandler(this.action, model, this, label, editorKit); - adv = new JLabel("Advanced"); + adv = new JLabel("Advanced Settings"); advanced = new JToggleButton(icon); advanced.setVisible(true); run = new JButton("Suggest " + label); @@ -391,7 +391,7 @@ errorMessage.setEditable(false); hint = new JTextArea(); hint.setEditable(false); - hint.setText("To get more Detail please doubleclick a concept"); + hint.setText("To get suggestions for class descriptions, please click the button above."); learner = new JPanel(); advanced.setSize(20, 20); learner.setLayout(null); @@ -478,8 +478,16 @@ advanced.setIcon(icon); } } - + /** + * This Method changes the hint message. + * @param message String hintmessage + */ + public void setHintMessage(String message) { + hint.setText(message); + } + + /** * This Method returns the DL_Learner tab. * @return JComponent */ Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -52,7 +52,7 @@ extends AbstractOWLFrameSection<OWLClass, OWLEquivalentClassesAxiom, OWLDescription> { - private static final String LABEL = "Equivalent classes"; + private static final String LABEL = "equivalent classes"; private Set<OWLClass> added; Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -51,7 +51,7 @@ public class OWLSubClassAxiomFrameSection extends AbstractOWLFrameSection<OWLClass, OWLSubClassAxiom, OWLDescription> { - private static final String LABEL = "Superclasses"; + private static final String LABEL = "superclasses"; private Set<OWLDescription> added = new HashSet<OWLDescription>(); Added: trunk/src/dl-learner/org/dllearner/tools/protege/OptionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OptionPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OptionPanel.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -0,0 +1,90 @@ +package org.dllearner.tools.protege; + +import java.awt.GridLayout; + +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JSlider; +/** + * This Class is responsible for the Options of the DL-Learner. + * @author Christian Koetteritzsch + * + */ +public class OptionPanel extends JPanel { + + + private static final long serialVersionUID = 2190682281812478244L; + private JLabel minAccuracyLabel; + private JLabel maxExecutionTimeLabel; + private JLabel nrOfConceptsLabel; + private JSlider minAccuracy; + private JSlider maxExecutionTime; + private JSlider nrOfConcepts; + private JPanel optionPanel; + /** + * Construktor for the Option Panel. + */ + public OptionPanel() { + + + optionPanel = new JPanel(new GridLayout(0,2)); + minAccuracyLabel = new JLabel("minimum accuracy"); + maxExecutionTimeLabel = new JLabel("maximum execution time"); + nrOfConceptsLabel = new JLabel("maximum number of results"); + + minAccuracy = new JSlider(50, 100, 80); + minAccuracy.setPaintTicks(true); + minAccuracy.setMajorTickSpacing(10); + minAccuracy.setMinorTickSpacing(1); + minAccuracy.setPaintLabels(true); + + + maxExecutionTime = new JSlider(5, 20, 10); + maxExecutionTime.setPaintTicks(true); + maxExecutionTime.setMajorTickSpacing(5); + maxExecutionTime.setMinorTickSpacing(1); + maxExecutionTime.setPaintLabels(true); + + + nrOfConcepts = new JSlider(2, 20, 5); + nrOfConcepts.setPaintTicks(true); + nrOfConcepts.setMajorTickSpacing(2); + nrOfConcepts.setMinorTickSpacing(1); + nrOfConcepts.setPaintLabels(true); + + optionPanel.add(minAccuracyLabel); + optionPanel.add(minAccuracy); + optionPanel.add(maxExecutionTimeLabel); + optionPanel.add(maxExecutionTime); + optionPanel.add(nrOfConceptsLabel); + optionPanel.add(nrOfConcepts); + add(optionPanel); + + } + + /** + * This method returns the min accuracy chosen in the slider. + * @return double minAccuracy + */ + public double getMinAccuracy() { + int acc = minAccuracy.getValue(); + double accuracy = acc/100; + return accuracy; + } + + /** + * This method returns the max executiontime chosen in the slider. + * @return int maxExecutionTime + */ + public int getMaxExecutionTime() { + return maxExecutionTime.getValue(); + } + + /** + * This method returns the nr. of concepts chosen in the slider. + * @return int nrOfConcepts + */ + public int getNrOfConcepts() { + return nrOfConcepts.getValue(); + } +} Modified: trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2008-11-04 11:50:41 UTC (rev 1489) +++ trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2008-11-04 16:27:07 UTC (rev 1490) @@ -29,8 +29,6 @@ import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; -import javax.swing.JSpinner; -import javax.swing.SpinnerNumberModel; /** * This class is the Panel for the Check boxes where the positive and negative @@ -88,14 +86,9 @@ private JButton helpForNegExamples; // This is the Text area where the help message is displayed. - + private OptionPanel optionPanel; private JComboBox optionBox; private JPanel optionBoxPanel; - private JPanel spinnerPanel; - private SpinnerNumberModel minAccuracyModel; - private SpinnerNumberModel maxNrOfResultsModel; - private SpinnerNumberModel maxExecutionModel; - private JSpinner optionSpinner; private ActionHandler action; /** @@ -107,25 +100,18 @@ * ActionHandler */ public PosAndNegSelectPanel(DLLearnerModel model, ActionHandler act) { - super(); + super(new GridLayout(0,1)); + optionPanel = new OptionPanel(); pos = new JLabel("Positive Examples"); neg = new JLabel("Negative Examples"); optionBoxPanel = new JPanel(new GridLayout(0, 1)); - spinnerPanel = new JPanel(new GridLayout(0, 1)); - action = act; - minAccuracyModel = new SpinnerNumberModel(0.8, 0.0 , 1.0, 0.05); - maxNrOfResultsModel = new SpinnerNumberModel(5.0, 1.0 , 20.0, 1.0); - maxExecutionModel = new SpinnerNumberModel(10.0, 1.0 , 60.0, 1.0); + action = act; optionBox = new JComboBox(); - optionSpinner = new JSpinner(); - optionSpinner.setModel(minAccuracyModel); - optionBox.addItem("min. Accuracy"); - optionBox.addItem("max. Nr. of Results"); - optionBox.addItem("max. Executiontime"); + optionBox.addItem("min. accuracy"); + optionBox.addItem("max. nr. of results"); + optionBox.addItem("max. executiontime"); optionBoxPanel.add(optionBox); - spinnerPanel.add(optionSpinner); setComboBoxListener(); - spinnerPanel.setSize(50, 20); // help button for positive examples helpForPosExamples = new JButton("?"); helpForPosExamples.setSize(10, 10); @@ -163,7 +149,9 @@ scrollPanel = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPanel.setViewportView(posAndNegPanel); - scrollPanel.setPreferredSize(new Dimension(490, 248)); + optionPanel.setPreferredSize(new Dimension(490, 70)); + scrollPanel.setPreferredSize(new Dimension(490, 180)); + add(optionPanel); add(scrollPanel); addListeners(action); } @@ -173,8 +161,6 @@ * positive and negative examples. */ public void setJCheckBoxes() { - posAndNegSelectPanel.add(optionBoxPanel); - posAndNegSelectPanel.add(spinnerPanel); posAndNegSelectPanel.add(posLabelPanel); posAndNegSelectPanel.add(negLabelPanel); // adds check boxes for all examples of the ontology @@ -188,65 +174,20 @@ } /** - * This Methode returns the min Accuracy that the concepts must have. - * @return min accuracy - */ - public float getMinAccuracyModelData() { - float minAccuracy = Float.valueOf(minAccuracyModel.getValue().toString()).floatValue(); - return minAccuracy; - } - - /** - * This Methode returns the max nr. of results selected in the option Panel. - * @return Max Nr. of Results - */ - public int getMaxNrOfResultsModelData() { - float maxNrOfRes = Float.valueOf(maxNrOfResultsModel.getValue().toString()).floatValue(); - int maxNrOfResults = Math.round(maxNrOfRes); - return maxNrOfResults; - } - - /** - * This Methode returns the max execution time selected in the Panel. - * @return Max Execution Time in seconds - */ - public int getMaxExecutionModelData() { - float maxExe = Float.valueOf(maxExecutionModel.getValue().toString()).floatValue(); - int maxExecution = Math.round(maxExe); - return maxExecution; - } - - /** * This method adds the ActionListener to the Option Combo Box. */ private void setComboBoxListener() { optionBox.addActionListener(action); } + /** - * This Methode sets the right Spinner for the selected Option. - */ - public void setOptionSpinner() { - if(optionBox.getSelectedItem().equals("min. Accuracy")) { - optionSpinner.setModel(minAccuracyModel); - } - - if(optionBox.getSelectedItem().equals("max. Nr. of Results")) { - optionSpinner.setModel(maxNrOfResultsModel); - } - - if(optionBox.getSelectedItem().equals("max. Executiontime")) { - optionSpinner.setModel(maxExecutionModel); - } - - } - /** * This method removes the Check boxes, the labels and the help buttons * after the DL-Learner tab is closed. */ public void unsetPosAndNegPanel() { posAndNegSelectPanel.removeAll(); } - + /** * This method adds the item listener for every check box. * @@ -263,7 +204,15 @@ } } - + + public void setCheckBoxesEnable(boolean enable) { + for (int j = 0; j < model.getPosVector().size(); j++) { + model.getPositivJCheckBox(j).setEnabled(enable); + model.getNegativJCheckBox(j).setEnabled(enable); + } + + } + /** * This method returns the Panel where the check boxes, labels and help * buttons are in. @@ -307,5 +256,9 @@ // adds listener to the help button for the negative examples helpForNegExamples.addActionListener(a); } + + public OptionPanel getOptionPanel() { + return optionPanel; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |