KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jcckit > plot > Symbol


1 /*
2  * Copyright 2003-2004, Franz-Josef Elmer, All rights reserved
3  *
4  * This library is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details
13  * (http://www.gnu.org/copyleft/lesser.html).
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19 package jcckit.plot;
20
21 import jcckit.graphic.GraphicalElement;
22
23 /**
24  * Immutable class holding the graphical represention of the symbol and
25  * two {@link Hint Hints}.
26  *
27  * @author Franz-Josef Elmer
28  */

29 public class Symbol {
30   private final GraphicalElement _symbol;
31   private final Hint _hintForNextPoint;
32   private final Hint _hintForNextCurve;
33
34   /** Creates an instance for the specified symbol and hints. */
35   public Symbol(GraphicalElement symbol, Hint hintForNextPoint,
36                 Hint hintForNextCurve) {
37     _symbol = symbol;
38     _hintForNextPoint = hintForNextPoint;
39     _hintForNextCurve = hintForNextCurve;
40   }
41
42   /** Returns the graphical symbol. */
43   public GraphicalElement getSymbol() {
44     return _symbol;
45   }
46
47   /** Returns the hint for the next point. */
48   public Hint getHintForNextPoint() {
49     return _hintForNextPoint;
50   }
51
52   /** Returns the hint for the next curve. */
53   public Hint getHintForNextCurve() {
54     return _hintForNextCurve;
55   }
56 }
57
Popular Tags