Revision: 379
http://dl-learner.svn.sourceforge.net/dl-learner/?rev=379&view=rev
Author: tonytacker
Date: 2008-01-15 18:39:20 -0800 (Tue, 15 Jan 2008)
Log Message:
-----------
removed a small bug by opening/changing URI/FILE
Modified Paths:
--------------
trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java
Modified: trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java
===================================================================
--- trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java 2008-01-16 01:53:33 UTC (rev 378)
+++ trunk/src/dl-learner/org/dllearner/gui/KnowledgeSourcePanel.java 2008-01-16 02:39:20 UTC (rev 379)
@@ -61,7 +61,7 @@
sources = config.getComponentManager().getKnowledgeSources();
fc = new JFileChooser(new File("examples/"));
- openButton = new JButton("Open local file otherwise type URL");
+ openButton = new JButton("Open local file otherwise type URL + ENTER");
openButton.addActionListener(this);
initButton = new JButton("Init KnowledgeSource");
@@ -69,6 +69,7 @@
fileDisplay = new JTextField(35);
fileDisplay.setEditable(true);
+ fileDisplay.addActionListener(this);
for (int i=0; i<sources.size(); i++) {
String ksClass = sources.get(i).toString().substring(23).concat(".class");
@@ -91,6 +92,13 @@
}
public void actionPerformed(ActionEvent e) {
+ // change URI
+ if (e.getSource() == fileDisplay) {
+ System.out.println(fileDisplay.getText());
+ config.setURI(fileDisplay.getText());
+ }
+
+
// open File
if (e.getSource() == openButton) {
int returnVal = fc.showOpenDialog(KnowledgeSourcePanel.this);
@@ -119,11 +127,11 @@
// init
if (e.getSource() == initButton) {
- String testURI = config.getURI();
+ //String testURI = config.getURI();
config.setKnowledgeSource(config.getComponentManager().knowledgeSource(sources.get(choosenClassIndex)));
- config.getComponentManager().applyConfigEntry(config.getKnowledgeSource(), "url", testURI);
+ config.getComponentManager().applyConfigEntry(config.getKnowledgeSource(), "url", config.getURI());
config.getKnowledgeSource().init();
- System.out.println("init KnowledgeSource");
+ System.out.println("init KnowledgeSource with " + sources.get(choosenClassIndex) + " and ...");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|