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    import java.awt.BorderLayout;
024    import java.awt.Dimension;
025    import java.awt.geom.Ellipse2D;
026    import java.awt.geom.RoundRectangle2D;
027    
028    import javax.swing.JLabel;
029    import javax.swing.JPanel;
030    import javax.swing.JTextField;
031    
032    import org.jdesktop.swingx.JXBusyLabel;
033    import org.jdesktop.swingx.icon.EmptyIcon;
034    import org.jdesktop.swingx.painter.BusyPainter;
035    
036    /**
037     * Wizard Panel for SPARQL-Mode.
038     * @author Lorenz Buehmann
039     *
040     */
041    public class ClassPanelSparql extends JPanel{
042    
043            private static final long serialVersionUID = 3026319637264844550L;
044    
045            private JTextField classField;
046            
047            private JPanel contentPanel;
048            
049            private JXBusyLabel loadingLabel;       
050            private JLabel statusLabel;
051            
052            @SuppressWarnings("unchecked")
053            public ClassPanelSparql() {
054                    
055                    super();
056                    
057                    statusLabel = new JLabel();
058                    
059                    loadingLabel = new JXBusyLabel(new Dimension(15, 15));
060                    BusyPainter painter = new BusyPainter(
061                    new RoundRectangle2D.Float(0, 0, 6.0f, 2.6f, 10.0f, 10.0f),
062                    new Ellipse2D.Float(2.0f, 2.0f, 11.0f, 11.0f));
063                    painter.setTrailLength(2);
064                    painter.setPoints(7);
065                    painter.setFrame(-1);
066                    loadingLabel.setPreferredSize(new Dimension(15, 15));
067                    loadingLabel.setIcon(new EmptyIcon(15, 15));
068                    loadingLabel.setBusyPainter(painter);
069    
070                                    
071                    JPanel labelPanel = new JPanel();
072                    labelPanel.add(loadingLabel);
073                    labelPanel.add(statusLabel);
074                                    
075                    contentPanel = getContentPanel();
076                    setLayout(new java.awt.BorderLayout());
077                    add(contentPanel, BorderLayout.CENTER);
078                    add(labelPanel, BorderLayout.SOUTH);
079            }
080    
081            private JPanel getContentPanel() {
082                    
083                    JPanel contentPanel = new JPanel();
084                                    
085                    classField = new JTextField();
086                    
087                    contentPanel.add(classField);
088                    
089                    return contentPanel;
090            }
091            
092                    
093            public JTextField getClassField(){
094            return classField;
095        }
096        
097       
098            public JLabel getStatusLabel() {
099                    return statusLabel;
100            }
101    
102            public JXBusyLabel getLoadingLabel() {
103                    return loadingLabel;
104            }
105        
106    
107     
108    
109    
110            
111    
112    }