1 19 package jcckit.plot; 20 21 import jcckit.graphic.GraphPoint; 22 import jcckit.util.ConfigParameters; 23 24 29 public class PositionHint implements Hint { 30 31 public static final String POSITION_KEY = "position", 32 ORIGIN_KEY = "origin"; 33 private final GraphPoint _position; 34 private final GraphPoint _origin; 35 36 50 public PositionHint(ConfigParameters config) { 51 double[] point = config.getDoubleArray(POSITION_KEY, null); 52 _position = point == null ? null : new GraphPoint(point); 53 _origin = new GraphPoint(config.getDoubleArray(ORIGIN_KEY, point)); 54 } 55 56 61 public PositionHint(GraphPoint origin, GraphPoint position) { 62 _origin = origin; 63 _position = position; 64 } 65 66 67 public GraphPoint getPosition() { 68 return _position; 69 } 70 71 72 public GraphPoint getOrigin() { 73 return _origin; 74 } 75 } 76 | Popular Tags |