From: <hee...@us...> - 2008-10-15 10:12:21
|
Revision: 1377 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1377&view=rev Author: heeroyuy Date: 2008-10-15 10:12:15 +0000 (Wed, 15 Oct 2008) Log Message: ----------- -new images for the advanced button -put helpmessages on a JOptionPane instead of an new JPanel 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/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/arrow.gif trunk/src/dl-learner/org/dllearner/tools/protege/arrow2.gif Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/protege/pfeil.gif trunk/src/dl-learner/org/dllearner/tools/protege/pfeil2.gif Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-10-15 09:10:58 UTC (rev 1376) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-10-15 10:12:15 UTC (rev 1377) @@ -59,8 +59,6 @@ private EvaluatedDescription evaluatedDescription; // This is the view of the DL-Learner tab. private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; - private int counter; - private EvaluatedDescription oldEvaluatedDescription; /** * This is the constructor for the action handler. @@ -81,7 +79,6 @@ this.editorKit = editor; this.view = view; this.id = i; - counter = 0; this.model = m; toggled = false; @@ -92,8 +89,6 @@ * @param z ActionEvent */ public void actionPerformed(ActionEvent z) { - - System.out.println("Doppelklick?: "+ z); if(z.getActionCommand().equals("comboBoxChanged")) { view.getPosAndNegSelectPanel().setOptionSpinner(); } @@ -240,7 +235,6 @@ */ public void mouseClicked(MouseEvent m) { EvaluatedDescription eDescription = null; - oldEvaluatedDescription = evaluatedDescription; String desc = view.getSuggestClassPanel().getSuggestList() .getSelectedValue().toString(); if (model.getEvaluatedDescriptionList() != null) { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-10-15 09:10:58 UTC (rev 1376) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2008-10-15 10:12:15 UTC (rev 1377) @@ -763,7 +763,6 @@ // TODO Auto-generated catch block e.printStackTrace(); } - } /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-10-15 09:10:58 UTC (rev 1376) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2008-10-15 10:12:15 UTC (rev 1377) @@ -102,7 +102,7 @@ //checker = new OWLDescriptionChecker(editorKit); editor = new ExpressionEditor<OWLDescription>(editorKit, editorKit.getModelManager().getOWLExpressionCheckerFactory().getOWLDescriptionChecker()); editor.setExpressionObject(description); - dllearner = new DLLearnerView(frame, label); + dllearner = new DLLearnerView(frame, label, this); action = new ActionHandler(this.action, null, dllearner, null, editorKit); tabbedPane = new JTabbedPane(); @@ -279,7 +279,7 @@ public class DLLearnerView extends JPanel { private static final long serialVersionUID = 624829578325729385L; - + private OWLClassDescriptionEditorWithDLLearnerTab mainWindow; // this is the Component which shows the view of the dllearner private JComponent learner; @@ -344,12 +344,13 @@ * @param current OWLFrame * @param label String */ - public DLLearnerView(OWLFrame<OWLClass> current, String label) { + public DLLearnerView(OWLFrame<OWLClass> current, String label, OWLClassDescriptionEditorWithDLLearnerTab tab) { classSelectorPanel = new OWLClassSelectorPanel(editorKit); + mainWindow = tab; classSelectorPanel.firePropertyChange("test", false, true); - URL iconUrl = this.getClass().getResource("pfeil.gif"); + URL iconUrl = this.getClass().getResource("arrow.gif"); icon = new ImageIcon(iconUrl); - URL toggledIconUrl = this.getClass().getResource("pfeil2.gif"); + URL toggledIconUrl = this.getClass().getResource("arrow2.gif"); toggledIcon = new ImageIcon(toggledIconUrl); model = new DLLearnerModel(editorKit, current, label, this); sugPanel = new SuggestClassPanel(); @@ -393,8 +394,16 @@ public PosAndNegSelectPanel getPosAndNegSelectPanel() { return posPanel; } - + /** + * Returns the Mainwindow where the Plugin is integratet. + * @return OWLClassDescriptionWithDLLearnerTab MainWindow + */ + public OWLClassDescriptionEditorWithDLLearnerTab getMainWindow() + { + return mainWindow; + } + /** * This Method renders the view of the plugin. */ public void makeView() { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2008-10-15 09:10:58 UTC (rev 1376) +++ trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2008-10-15 10:12:15 UTC (rev 1377) @@ -19,21 +19,18 @@ */ package org.dllearner.tools.protege; -import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JComboBox; -import javax.swing.JDialog; import javax.swing.JLabel; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSpinner; -import javax.swing.JTextArea; import javax.swing.SpinnerNumberModel; -import javax.swing.WindowConstants; /** * This class is the Panel for the Check boxes where the positive and negative @@ -92,11 +89,6 @@ // This is the Text area where the help message is displayed. - private JTextArea help; - - // This is the frame that pops up when the help button is pressed. - - private JDialog assistPanel; private JComboBox optionBox; private JPanel optionBoxPanel; private JPanel spinnerPanel; @@ -105,8 +97,6 @@ private SpinnerNumberModel maxExecutionModel; private JSpinner optionSpinner; private ActionHandler action; - private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; - private final Color colorBlack = Color.black; /** * This is the constructor for the Panel that shows the check boxes. @@ -119,7 +109,6 @@ public PosAndNegSelectPanel(DLLearnerModel model, ActionHandler act, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView window) { super(); pos = new JLabel("Positive Examples"); - view = window; neg = new JLabel("Negative Examples"); optionBoxPanel = new JPanel(new GridLayout(0, 1)); spinnerPanel = new JPanel(new GridLayout(0, 1)); @@ -300,28 +289,12 @@ */ public void renderHelpMessage(String assistance) { // renders scroll bar if necessary - JScrollPane scrollHelp = new JScrollPane( - JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, - JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - help = new JTextArea(); - assistPanel = new JDialog(); - // no writing in the help panel is allowed - help.setEditable(false); - assistPanel.setName("help"); - assistPanel.setSize(300, 100); - // window will be disposed if the x or the ok button is pressed - assistPanel.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - assistPanel.setVisible(true); - assistPanel.setResizable(false); - // sets textcolor to black - help.setForeground(colorBlack); - help.setText("Help: " + assistance); - scrollHelp.setViewportView(help); - scrollHelp.setBounds(0, 0, 300, 100); - assistPanel.add(scrollHelp); - assistPanel.setLocationRelativeTo(view); + JOptionPane.showMessageDialog(null, + assistance, + "Help", + JOptionPane.WARNING_MESSAGE); } - + /** * This method adds the Action listener to the help buttons. * Added: trunk/src/dl-learner/org/dllearner/tools/protege/arrow.gif =================================================================== (Binary files differ) Property changes on: trunk/src/dl-learner/org/dllearner/tools/protege/arrow.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/src/dl-learner/org/dllearner/tools/protege/arrow2.gif =================================================================== (Binary files differ) Property changes on: trunk/src/dl-learner/org/dllearner/tools/protege/arrow2.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/pfeil.gif =================================================================== (Binary files differ) Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/pfeil2.gif =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |