001    /**
002     * Copyright (C) 2007-2008, Jens Lehmann
003     *
004     * This file is part of DL-Learner.
005     * 
006     * DL-Learner is free software; you can redistribute it and/or modify
007     * it under the terms of the GNU General Public License as published by
008     * the Free Software Foundation; either version 3 of the License, or
009     * (at your option) any later version.
010     *
011     * DL-Learner is distributed in the hope that it will be useful,
012     * but WITHOUT ANY WARRANTY; without even the implied warranty of
013     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014     * GNU General Public License for more details.
015     *
016     * You should have received a copy of the GNU General Public License
017     * along with this program.  If not, see <http://www.gnu.org/licenses/>.
018     *
019     */
020    
021    package org.dllearner.tools.ore;
022    
023    
024    import java.awt.BorderLayout;
025    import java.awt.Color;
026    import java.awt.Font;
027    
028    import javax.swing.BorderFactory;
029    import javax.swing.JLabel;
030    import javax.swing.JPanel;
031    import javax.swing.JScrollPane;
032    import javax.swing.JTextArea;
033    import javax.swing.UIManager;
034    
035    /**
036     * Wizard panel with introduction text.
037     * @author Lorenz Buehmann
038     *
039     */
040    public class IntroductionPanel extends JPanel {
041     
042            private static final long serialVersionUID = 7184544803724152044L;
043            
044            
045            private JTextArea instructionsField;
046        private JScrollPane jScrollPane1;
047            
048        private JLabel welcomeTitle;
049        private JPanel contentPanel;
050         
051        
052        
053        public IntroductionPanel() {
054            
055            contentPanel = getContentPanel();
056        
057            setLayout(new java.awt.BorderLayout());
058    
059         
060            JPanel secondaryPanel = new JPanel();
061            secondaryPanel.add(contentPanel, BorderLayout.NORTH);
062            add(contentPanel, BorderLayout.CENTER);
063        }
064        
065        
066        private JPanel getContentPanel() {
067            
068            JPanel contentPanel1 = new JPanel();
069            
070            JPanel jPanel1 = new JPanel();
071            
072            contentPanel1.setLayout(new java.awt.BorderLayout());
073            
074            jScrollPane1 = new JScrollPane();
075            instructionsField = new JTextArea();
076            
077            
078            //setLayout(new GridBagLayout());
079            setBorder(BorderFactory.createEmptyBorder(12, 6, 12, 12));
080            jScrollPane1.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
081            jScrollPane1.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
082            instructionsField.setBackground(UIManager.getDefaults().getColor("control"));
083            instructionsField.setColumns(20);
084            instructionsField.setEditable(false);
085            instructionsField.setLineWrap(true);
086            instructionsField.setRows(5);
087            instructionsField.setFont(new Font("Serif", Font.PLAIN, 14));
088            instructionsField.setText("This is an test of a wizard dialog, which allows a knowledge engineer to select " 
089                                                                    + "a class of an ontology which should be (re)learned.\n" 
090                                                                    + "On the next page, choose a OWL file or a SPARQL-URL, that contains an ontology. After that " 
091                                                                    + "you might be able to select a class in the ontology to learn. When the class you selected is learned" 
092                                                                    + ", you are able to add the axiom to the ontology and after all you might be able to repair if necessary. ");
093            instructionsField.setWrapStyleWord(true);
094            jScrollPane1.setViewportView(instructionsField);
095                  
096            welcomeTitle = new JLabel();
097            welcomeTitle.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(0, 0, 0)));
098            welcomeTitle.setFont(new java.awt.Font("MS Sans Serif", Font.BOLD, 14));
099            welcomeTitle.setText("Welcome to the DL-Learner ORE-Tool!");
100            contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH);
101            
102            jPanel1.setLayout(new java.awt.GridLayout(0, 1, 0, 0));
103            jPanel1.add(jScrollPane1);
104            contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER);
105            
106          
107    
108            return contentPanel1;
109            
110        }
111     
112    }