From: <lor...@us...> - 2009-09-25 09:44:15
|
Revision: 1863 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1863&view=rev Author: lorenz_b Date: 2009-09-25 09:43:56 +0000 (Fri, 25 Sep 2009) Log Message: ----------- added threshold and learning type option to learning dialog Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/OREManager.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/Wizard.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/WizardController.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/ClassChoosePanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/IntroductionPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/KnowledgeSourcePanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/ClassChoosePanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/IntroductionPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LeftPanel.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/ui/LearningOptionsPanel.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/OREManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/OREManager.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/OREManager.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -57,10 +57,13 @@ private NamedClass currentClass2Learn; private EvaluatedDescriptionClass learnedClassDescription; + + private String learningType; private double noisePercentage; - private int maxExecutionTimeInSeconds = 10; - private int maxNrOfResults = 10; + private int maxExecutionTimeInSeconds; + private int maxNrOfResults; + private double threshold; private List<OREManagerListener> listeners; @@ -105,9 +108,10 @@ public void setLearningProblem(){ lp = cm.learningProblem(ClassLearningProblem.class, reasoner); - + cm.applyConfigEntry(lp, "type", learningType); try { lp.getConfigurator().setClassToDescribe(getClass2LearnAsURL()); + lp.init(); } catch (ComponentInitException e) { // TODO Auto-generated catch block @@ -123,8 +127,7 @@ la.getConfigurator().setUseNegation(false); la.getConfigurator().setNoisePercentage(noisePercentage); la.getConfigurator().setMaxNrOfResults(maxNrOfResults); - - + } catch (LearningProblemUnsupportedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); @@ -240,6 +243,18 @@ public int getMaxNrOfResults(){ return maxNrOfResults; } + + public void setThreshold(double threshold){ + this.threshold = threshold; + } + + public double getThreshold(){ + return threshold; + } + + public void setLearningType(String learningType){ + this.learningType = learningType; + } /** * Sets the class that has to be learned. Added: trunk/src/dl-learner/org/dllearner/tools/ore/ui/LearningOptionsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/LearningOptionsPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/LearningOptionsPanel.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -0,0 +1,167 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.tools.ore.ui; + +import java.awt.BorderLayout; +import java.awt.GridLayout; + +import javax.swing.ButtonGroup; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JRadioButton; +import javax.swing.JSlider; +/** + * This Class is responsible for the Options of the DL-Learner. + * @author Christian Koetteritzsch + * + */ +public class LearningOptionsPanel extends JPanel { + + + private static final long serialVersionUID = 2190682281812478244L; + private JLabel minAccuracyLabel; + private JLabel maxExecutionTimeLabel; + private JLabel nrOfConceptsLabel; + private JLabel thresholdLabel; + + private JSlider minAccuracy; + private JSlider maxExecutionTime; + private JSlider nrOfConcepts; + private JSlider threshold; + + private JRadioButton equivalentClassButton; + private JRadioButton superClassButton; + private ButtonGroup learningType; + + private JPanel labelPanel; + private JPanel sliderPanel; + private double accuracy; + /** + * Constructor for the Option Panel. + */ + public LearningOptionsPanel() { + + setLayout(new BorderLayout()); + labelPanel = new JPanel(); + labelPanel.setLayout(new GridLayout(0, 1)); + sliderPanel = new JPanel(); + sliderPanel.setLayout(new GridLayout(0, 1)); + + minAccuracyLabel = new JLabel("Noise in %: "); + maxExecutionTimeLabel = new JLabel("Max. execution time in s: "); + nrOfConceptsLabel = new JLabel("Max. number of results: "); + thresholdLabel = new JLabel("Threshold in %:"); + + minAccuracy = new JSlider(0, 50, 5); + minAccuracy.setPaintTicks(true); + minAccuracy.setMajorTickSpacing(10); + minAccuracy.setMinorTickSpacing(1); + minAccuracy.setPaintLabels(true); + + + maxExecutionTime = new JSlider(0, 40, 8); + maxExecutionTime.setPaintTicks(true); + maxExecutionTime.setMajorTickSpacing(10); + maxExecutionTime.setMinorTickSpacing(1); + maxExecutionTime.setPaintLabels(true); + + + nrOfConcepts = new JSlider(2, 20, 10); + nrOfConcepts.setPaintTicks(true); + nrOfConcepts.setMajorTickSpacing(2); + nrOfConcepts.setMinorTickSpacing(1); + nrOfConcepts.setPaintLabels(true); + + threshold = new JSlider(0, 100, 80); + threshold.setPaintTicks(true); + threshold.setMajorTickSpacing(25); + threshold.setMinorTickSpacing(5); + threshold.setPaintLabels(true); + + labelPanel.add(minAccuracyLabel); + labelPanel.add(maxExecutionTimeLabel); + labelPanel.add(nrOfConceptsLabel); + labelPanel.add(thresholdLabel); + + + sliderPanel.add(minAccuracy); + sliderPanel.add(maxExecutionTime); + sliderPanel.add(nrOfConcepts); + sliderPanel.add(threshold); + + JPanel learnTypePanel = new JPanel(); + learnTypePanel.setLayout(new GridLayout(0, 1)); + equivalentClassButton = new JRadioButton("Learn equivalent class expressions", true); + equivalentClassButton.setActionCommand("equivalent"); + equivalentClassButton.setSelected(true); + superClassButton = new JRadioButton("Learn super class expressions"); + superClassButton.setActionCommand("super"); + + learningType = new ButtonGroup(); + learningType.add(equivalentClassButton); + learningType.add(superClassButton); + + learnTypePanel.add(equivalentClassButton); + learnTypePanel.add(superClassButton); + + add(BorderLayout.NORTH, learnTypePanel); + add(BorderLayout.WEST, labelPanel); + add(BorderLayout.CENTER, sliderPanel); + } + + /** + * This method returns the min accuracy chosen in the slider. + * @return double minAccuracy + */ + public double getMinAccuracy() { + double acc = minAccuracy.getValue(); + accuracy = (acc/100.0); + 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(); + } + + /** + * This mehtod returns the algorithm threshold chosen in the slider. + * @return double threshold + */ + public double getThreshold(){ + return threshold.getValue()/100.0; + } + + public boolean isEquivalentClassesTypeSelected(){ + return equivalentClassButton.isSelected(); + } + +} Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/Wizard.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/Wizard.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/Wizard.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -137,7 +137,7 @@ */ public Wizard(Frame owner) { wizardModel = new WizardModel(); - wizardDialog = new JFrame(); + wizardDialog = new JFrame(); wizardDialog.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.out.println("Exited application"); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/WizardController.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/WizardController.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -140,7 +140,7 @@ ((ClassChoosePanelDescriptor) nextDescriptor).refill(); } else if (currentPanelDescriptor.getPanelDescriptorIdentifier().equals(ClassChoosePanelDescriptor.IDENTIFIER)) { // ore.makeOWAToCWA(); - ore.setLearningProblem(); +// ore.setLearningProblem(); LearningPanelDescriptor learnDescriptor = ((LearningPanelDescriptor) model .getPanelHashMap().get(nextPanelDescriptor)); learnDescriptor.setPanelDefaults(); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/ClassChoosePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/ClassChoosePanelDescriptor.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/ClassChoosePanelDescriptor.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -25,8 +25,12 @@ import java.util.TreeSet; import java.util.concurrent.ExecutionException; +import javax.swing.JSpinner; import javax.swing.SwingWorker; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; import org.dllearner.core.owl.NamedClass; import org.dllearner.tools.ore.OREManager; @@ -42,7 +46,7 @@ * @author Lorenz Buehmann * */ -public class ClassChoosePanelDescriptor extends WizardPanelDescriptor implements javax.swing.event.ListSelectionListener{ +public class ClassChoosePanelDescriptor extends WizardPanelDescriptor implements ListSelectionListener, ChangeListener{ /** * Identification string for class choose panel. @@ -63,6 +67,7 @@ public ClassChoosePanelDescriptor() { owlClassPanel = new ClassChoosePanel(); owlClassPanel.addSelectionListener(this); + owlClassPanel.addChangeListener(this); setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(owlClassPanel); @@ -96,6 +101,12 @@ } } + @Override + public void stateChanged(ChangeEvent e) { + JSpinner spinner = (JSpinner)e.getSource(); + fillClassesList(((Integer)spinner.getValue()).intValue()); + } + private void setNextButtonAccordingToConceptSelected() { if (owlClassPanel.getClassesTable().getSelectedRow() >= 0){ @@ -116,15 +127,26 @@ public void refill(){ TaskManager.getInstance().setTaskStarted("Retrieving atomic classes..."); - new ClassRetrievingTask().execute(); + new ClassRetrievingTask(1).execute(); } + public void fillClassesList(int minInstanceCount){ + TaskManager.getInstance().setTaskStarted("Retrieving atomic classes..."); + new ClassRetrievingTask(minInstanceCount).execute(); + } + /** * Inner class to get all atomic classes in a background thread. * @author Lorenz Buehmann * */ class ClassRetrievingTask extends SwingWorker<Set<NamedClass>, NamedClass> { + + private int minInstanceCount; + + public ClassRetrievingTask(int minInstanceCount){ + this.minInstanceCount = minInstanceCount; + } @Override public Set<NamedClass> doInBackground() { @@ -135,7 +157,7 @@ while(iter.hasNext()){ NamedClass nc = iter.next(); int instanceCount = OREManager.getInstance().getReasoner().getIndividuals(nc).size(); - if(instanceCount == 0){ + if(instanceCount < minInstanceCount){ iter.remove(); } } @@ -161,4 +183,6 @@ } + + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/IntroductionPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/IntroductionPanelDescriptor.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/IntroductionPanelDescriptor.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -20,9 +20,11 @@ package org.dllearner.tools.ore.ui.wizard.descriptors; +import java.awt.Cursor; import java.net.MalformedURLException; import java.net.URL; +import javax.swing.JEditorPane; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; @@ -80,16 +82,21 @@ @Override public void hyperlinkUpdate(HyperlinkEvent event) { - - if(event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - URL url; + if (event.getEventType() == HyperlinkEvent.EventType.ENTERED) { + ((JEditorPane) event.getSource()).setCursor(Cursor + .getPredefinedCursor(Cursor.HAND_CURSOR)); + } else if (event.getEventType() == HyperlinkEvent.EventType.EXITED) { + ((JEditorPane) event.getSource()).setCursor(Cursor + .getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } else if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + URL url; try { url = new URL(event.getDescription()); - launcher.openURLinBrowser(url.toString()); + launcher.openURLinBrowser(url.toString()); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); - } + } } } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/KnowledgeSourcePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/KnowledgeSourcePanelDescriptor.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/KnowledgeSourcePanelDescriptor.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -52,7 +52,7 @@ public class KnowledgeSourcePanelDescriptor extends WizardPanelDescriptor implements ActionListener{ public static final String IDENTIFIER = "KNOWLEDGESOURCE_CHOOSE_PANEL"; - public static final String INFORMATION = "Choose an OWL-ontology from filesystem or URI. Your can also extract a fragment " + + public static final String INFORMATION = "Choose an OWL-ontology from filesystem or URI. You can also extract a fragment " + "from a SPARQL endpoint. When finished, press <Next>."; private KnowledgeSourcePanel knowledgePanel; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/LearningPanelDescriptor.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/descriptors/LearningPanelDescriptor.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -128,15 +128,24 @@ */ public void actionPerformed(ActionEvent event) { if(event.getActionCommand().equals("Start")){ - TaskManager.getInstance().setTaskStarted("Learning equivalent class expressions"); + String learningType = ""; + if(learnPanel.getOptionsPanel().isEquivalentClassesTypeSelected()){ + OREManager.getInstance().setLearningType("equivalence"); + learningType = "equivalent"; + } else { + learningType = "super"; + OREManager.getInstance().setLearningType("superClass"); + } + TaskManager.getInstance().setTaskStarted("Learning " + learningType + " class expressions..."); learnPanel.getStartButton().setEnabled(false); learnPanel.getStopButton().setEnabled(true); OREManager.getInstance().setNoisePercentage(learnPanel.getOptionsPanel().getMinAccuracy()); OREManager.getInstance().setMaxExecutionTimeInSeconds(learnPanel.getOptionsPanel().getMaxExecutionTime()); OREManager.getInstance().setMaxNrOfResults(learnPanel.getOptionsPanel().getNrOfConcepts()); - - OREManager.getInstance().setLearningAlgorithm(); + OREManager.getInstance().setThreshold(learnPanel.getOptionsPanel().getThreshold()); + learnPanel.getResultTable().clear(); + learningTask = new LearningTask(); learningTask.execute(); } else{ @@ -205,24 +214,29 @@ @SuppressWarnings("unchecked") @Override public List<? extends EvaluatedDescription> doInBackground() { - learnPanel.getResultTable().clear(); + OREManager.getInstance().setLearningProblem(); + OREManager.getInstance().setLearningAlgorithm(); la = OREManager.getInstance().getLa(); + + timer = new Timer(); timer.schedule(new TimerTask(){ @Override public void run() { if(!isCancelled() && la.isRunning()){ - publish(la.getCurrentlyBestEvaluatedDescriptions(OREManager.getInstance().getMaxNrOfResults(), 0.0, true)); + publish(la.getCurrentlyBestEvaluatedDescriptions(OREManager.getInstance().getMaxNrOfResults(), + OREManager.getInstance().getThreshold(), true)); } } }, 1000, 2000); OREManager.getInstance().start(); - List<? extends EvaluatedDescription> result = la.getCurrentlyBestEvaluatedDescriptions(OREManager.getInstance().getMaxNrOfResults(), 0.0, true); + List<? extends EvaluatedDescription> result = la.getCurrentlyBestEvaluatedDescriptions + (OREManager.getInstance().getMaxNrOfResults(), OREManager.getInstance().getThreshold(), true); return result; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/ClassChoosePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/ClassChoosePanel.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/ClassChoosePanel.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -24,8 +24,12 @@ import java.awt.GridBagConstraints; import java.awt.GridBagLayout; +import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; +import javax.swing.JSpinner; +import javax.swing.SpinnerNumberModel; +import javax.swing.event.ChangeListener; import javax.swing.event.ListSelectionListener; import org.dllearner.tools.ore.ui.ClassesTable; @@ -40,6 +44,7 @@ private static final long serialVersionUID = 3026319637264844550L; private ClassesTable classesTable; + private JSpinner minInstanceCountSpinner; /** * Constructor. @@ -51,7 +56,19 @@ private void createUI(){ setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); + c.gridwidth = GridBagConstraints.REMAINDER; + JPanel minInstancesCountPanel = new JPanel(); + minInstancesCountPanel.add(new JLabel("Showing classes with at least ")); + minInstanceCountSpinner = new JSpinner(); + minInstanceCountSpinner.setEnabled(true); + javax.swing.SpinnerModel spinnerModel = new SpinnerNumberModel(1, 1, 500, 1); + minInstanceCountSpinner.setModel(spinnerModel); + minInstancesCountPanel.add(minInstanceCountSpinner); + minInstancesCountPanel.add(new JLabel(" instances")); + add(minInstancesCountPanel, c); + + c.fill = GridBagConstraints.NONE; c.weightx = 1.0; classesTable = new ClassesTable(); @@ -67,6 +84,10 @@ public void addSelectionListener(ListSelectionListener l){ classesTable.getSelectionModel().addListSelectionListener(l); } + + public void addChangeListener(ChangeListener cL){ + minInstanceCountSpinner.addChangeListener(cL); + } /** * Returns the table where atomic owl classes are the table elements. Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/IntroductionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/IntroductionPanel.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/IntroductionPanel.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -46,7 +46,7 @@ private JLabel welcomeTitle; - private final String titleText = "<html>Welcome to the DL-Learner ORE (Ontology Repair and Enrichment) Tool!<br>(Version 0.1)</html>"; + private final String titleText = "<html><b>Welcome to the DL-Learner ORE (Ontology Repair and Enrichment) Tool!<br>(Version 0.1)</b></html>"; private final String introductionText = "<html><p>ORE is a tool for debugging and enriching OWL ontologies. It has the following features: </p>" + "<UL>" + @@ -56,8 +56,8 @@ "<LI>enrichment of an ontology by learning definitions and super class axioms" + "<LI>guiding the user through potential consequences of adding those axioms" + "</UL>" + - "<p>In a later version, the tool will also support the detection of various potential modelling problems.</p>" + - "<p>ORE uses a wizard-style concept. On the left, you can see different steps in the wizard, where the current step is in bold. " + + "<p >In a later version, the tool will also support the detection of various potential modelling problems.</p>" + + "<p style=\"max-width:400px;\">ORE uses a wizard-style concept. On the left, you can see different steps in the wizard, where the current step is in bold. " + "Each step contains an explanation of it in the main window. The wizard may omit steps if they are not necessary, e.g. " + "if you load a consistent ontology, then the \"Debugging\" dialogue is skipped.</p>" + "<p>Please read the <a href=\"http://dl-learner.org/wiki/ORE\">the ORE wiki page</a> and view the <a href=\"...\">screencast</a> to get started.</p></html>"; Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LearningPanel.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LearningPanel.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -37,8 +37,8 @@ import org.dllearner.core.owl.NamedClass; import org.dllearner.tools.ore.OREManager; import org.dllearner.tools.ore.ui.GraphicalCoveragePanel; +import org.dllearner.tools.ore.ui.LearningOptionsPanel; import org.dllearner.tools.ore.ui.ResultTable; -import org.dllearner.tools.protege.OptionPanel; /** @@ -60,7 +60,7 @@ private JPanel buttonSliderPanel; private GraphicalCoveragePanel graphicPanel; - private OptionPanel optionsPanel; + private LearningOptionsPanel optionsPanel; private GridBagConstraints c; @@ -126,7 +126,7 @@ stopButton.setText("Stop"); stopButton.setEnabled(false); - optionsPanel = new OptionPanel(); + optionsPanel = new LearningOptionsPanel(); optionsPanel.setBorder(new TitledBorder("Options")); buttonSliderPanel.add(optionsPanel, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, @@ -178,7 +178,7 @@ this.graphicPanel.setNewClassDescription(desc); } - public OptionPanel getOptionsPanel(){ + public LearningOptionsPanel getOptionsPanel(){ return optionsPanel; } @@ -192,9 +192,4 @@ frame.setVisible(true); } } - - - - - Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LeftPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LeftPanel.java 2009-09-24 11:32:09 UTC (rev 1862) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ui/wizard/panels/LeftPanel.java 2009-09-25 09:43:56 UTC (rev 1863) @@ -27,6 +27,8 @@ import javax.swing.JLabel; import javax.swing.JPanel; +import javax.swing.JSeparator; +import javax.swing.SwingConstants; /** * Navigation panel where it's shown the actual wizard step and former and following steps. @@ -37,7 +39,7 @@ private static final long serialVersionUID = -1205252523136710091L; private JLabel[] jLabel; - +// private ImageIcon currentStepIcon = new ImageIcon("src/dl-learner/org/dllearner/tools/ore/untoggled.gif"); /** * Constructor instantiating JLabels with wizard step names. * @param i step number printed bold @@ -45,9 +47,9 @@ public LeftPanel(int i){ jLabel = new JLabel[7]; - setBackground(new java.awt.Color(255, 255, 255)); +// setBackground(new java.awt.Color(255, 255, 255)); JPanel panel2 = new JPanel(); - panel2.setBackground(new java.awt.Color(255, 255, 255)); +// panel2.setBackground(new java.awt.Color(255, 255, 255)); panel2.setLayout(new GridLayout(7, 1, 0, 10)); jLabel[0] = new JLabel("1. Introduction"); jLabel[1] = new JLabel("2. Knowledge Source"); @@ -65,6 +67,11 @@ setLayout(new BorderLayout()); setPreferredSize(new Dimension(165, 500)); add(panel2, BorderLayout.NORTH); + JPanel holderPanel = new JPanel(); + holderPanel.setLayout(new BorderLayout()); + holderPanel.add(panel2, BorderLayout.NORTH); + add(holderPanel); + add(new JSeparator(SwingConstants.VERTICAL), BorderLayout.EAST); } @@ -77,7 +84,7 @@ for(int j = 0; j < jLabel.length; j++){ jLabel[j].setFont(jLabel[j].getFont().deriveFont(Font.PLAIN)); } - +// jLabel[i].setIcon(currentStepIcon); jLabel[i].setFont(jLabel[i].getFont().deriveFont(Font.BOLD)); validate(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |