From: <ton...@us...> - 2008-01-19 17:43:49
|
Revision: 403 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=403&view=rev Author: tonytacker Date: 2008-01-19 09:43:46 -0800 (Sat, 19 Jan 2008) Log Message: ----------- + testButton in LearningAlgorithm for possible options Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java trunk/src/dl-learner/org/dllearner/gui/OutputPanel.java Modified: trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java 2008-01-19 16:20:53 UTC (rev 402) +++ trunk/src/dl-learner/org/dllearner/gui/LearningAlgorithmPanel.java 2008-01-19 17:43:46 UTC (rev 403) @@ -28,8 +28,11 @@ import java.util.List; import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.config.ConfigOption; + + /** * LearningAlgorithmPanel * @@ -44,10 +47,11 @@ private List<Class<? extends LearningAlgorithm>> learners; private JPanel choosePanel = new JPanel(); private JPanel initPanel = new JPanel(); - private JButton initButton; + private JButton initButton, testButton; private String[] cbItems = {}; private JComboBox cb = new JComboBox(cbItems); private int choosenClassIndex; + private List<ConfigOption<?>> optionList; LearningAlgorithmPanel(Config config) { @@ -57,8 +61,11 @@ initButton = new JButton("Init LearingAlgorithm"); initButton.addActionListener(this); + testButton = new JButton("Test"); + testButton.addActionListener(this); initPanel.add(initButton); + initPanel.add(testButton); choosePanel.add(cb); add(choosePanel, BorderLayout.PAGE_START); @@ -77,6 +84,15 @@ // read selected Class choosenClassIndex = cb.getSelectedIndex(); + if (e.getSource() == testButton) { + // TEST + optionList = config.getComponentManager().getConfigOptions(learners.get(cb.getSelectedIndex())); + //System.out.println("optionName: " + optionList); + System.out.println("option 0:\n" + optionList.get(0)); + + + } + if (e.getSource() == initButton) { if (config.getStatus(6)) { config.setLearningAlgorithm(config.getComponentManager().learningAlgorithm(learners.get(choosenClassIndex), config.getLearningProblem(), config.getReasoningService())); Modified: trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java 2008-01-19 16:20:53 UTC (rev 402) +++ trunk/src/dl-learner/org/dllearner/gui/LearningProblemPanel.java 2008-01-19 17:43:46 UTC (rev 403) @@ -37,7 +37,6 @@ import org.dllearner.core.LearningProblem; import org.dllearner.core.dl.Individual; -//import org.dllearner.learningproblems.*; /** * LearningProblemPanel @@ -168,11 +167,7 @@ public void actionPerformed(ActionEvent e) { // read selected LearningProblemClass choosenClassIndex = cb.getSelectedIndex(); - - // later for read options - //List a = config.getComponentManager().getConfigOptions(problems.get(cb.getSelectedIndex())); - //System.out.println("optionName: " + a); - + // get list after reasoner init if (e.getSource() == readListButton) { // fill lists Modified: trunk/src/dl-learner/org/dllearner/gui/OutputPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/OutputPanel.java 2008-01-19 16:20:53 UTC (rev 402) +++ trunk/src/dl-learner/org/dllearner/gui/OutputPanel.java 2008-01-19 17:43:46 UTC (rev 403) @@ -89,6 +89,7 @@ } } } + if (e.getSource() == runButton) { if (config.getStatus(6)) { config.getLearningAlgorithm().start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |