001    /**
002     * Copyright (C) 2007-2009, 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    package org.dllearner.tools.protege;
021    
022    import java.awt.geom.Ellipse2D;
023    
024    /**
025     * This class is a datastructure for one individual shown in
026     * the GraphicalCoveragePanel.
027     * @author Christian Koetteritzsch
028     *
029     */
030    public class IndividualPoint {
031            
032            private String point;
033            private int xAxis;
034            private int yAxis;
035            private final String individual;
036            private final Ellipse2D circlePoint;
037            
038            /**
039             * Constructor of the class.
040             * @param p display String 
041             * @param x coordinate on the x axis
042             * @param y coordinate on the y axis
043             * @param ind Name of the Individual
044             */
045            public IndividualPoint(String p, int x, int y, String ind) {
046                    this.point = p;
047                    this.xAxis = x;
048                    this.yAxis = y;
049                    this.circlePoint = new Ellipse2D.Double(x - 1, y - 1, 3, 3);
050                    this.individual = ind;
051            }
052    
053            /**
054             * This method sets the display string of the individual.
055             * @param point the point to set
056             */
057            public void setPoint(String point) {
058                    this.point = point;
059            }
060    
061            /**
062             * This method returns the display string of the individual.
063             * @return the point
064             */
065            public String getPoint() {
066                    return point;
067            }
068    
069            /**
070             * This method sets the x axis coordinate.
071             * @param xAxis the xAxis to set
072             */
073            public void setXAxis(int xAxis) {
074                    this.xAxis = xAxis;
075            }
076    
077            /**
078             * This method returns the x axis coordinate.
079             * @return the xAxis
080             */
081            public int getXAxis() {
082                    return xAxis;
083            }
084    
085            /**
086             * This method sets the y axis coordinate.
087             * @param yAxis the yAxis to set
088             */
089            public void setYAxis(int yAxis) {
090                    this.yAxis = yAxis;
091            }
092    
093            /**
094             * This method returns the y axis coordinate.
095             * @return the yAxis
096             */
097            public int getYAxis() {
098                    return yAxis;
099            }
100            
101            /**
102             * This method returns the name of the Individual.
103             * @return name of the Individual
104             */
105            public String getIndividualName() {
106                    return individual;
107            }
108            
109            public Ellipse2D getIndividualPoint() {
110                    return circlePoint;
111            }
112    }