@Test public void testScaling() throws Exception { SimpleFeatureType type = createShipTrackFeatureType(); SimpleFeature feature = createFeature(type, 1, 53.1F, 13.2F, 0.5); sceneTransformProvider = new SceneTransformProvider() { @Override public MathTransform2D getModelToSceneTransform() { return MathTransform2D.IDENTITY; } @Override public MathTransform2D getSceneToModelTransform() { return MathTransform2D.IDENTITY; } }; SimpleFeaturePointFigure figure = new SimpleFeaturePointFigure(feature, sceneTransformProvider, new DefaultFigureStyle()); Coordinate coordinate = figure.getGeometry().getCoordinate(); assertEquals(13.2F, coordinate.x, 1e-10); assertEquals(53.1F, coordinate.y, 1e-10); boolean closeTo = figure.isCloseTo(new Point2D.Double(13.2F, 53.1F), new AffineTransform()); assertEquals(true, closeTo); }
@Override public Point getGeometry() { return (Point) simpleFeature.getDefaultGeometry(); }
SimpleFeaturePointFigure extends AbstractPointFigure implements SimpleFeatureFigure { @Override public Point getGeometry() { return (Point) simpleFeature.getDefaultGeometry(); } }
SimpleFeaturePointFigure extends AbstractPointFigure implements SimpleFeatureFigure { @Override public Point getGeometry() { return (Point) simpleFeature.getDefaultGeometry(); } SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); }
SimpleFeaturePointFigure extends AbstractPointFigure implements SimpleFeatureFigure { @Override public Point getGeometry() { return (Point) simpleFeature.getDefaultGeometry(); } SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); @Override Object createMemento(); @Override void setMemento(Object memento); @Override SimpleFeature getSimpleFeature(); @Override Point getGeometry(); @Override void setGeometry(Geometry geometry); @Override void forceRegeneration(); @Override double getX(); @Override double getY(); @Override void setLocation(double x, double y); @Override double getRadius(); @Override Object clone(); @Override int getMaxSelectionStage(); @Override Handle[] createHandles(int selectionStage); }
SimpleFeaturePointFigure extends AbstractPointFigure implements SimpleFeatureFigure { @Override public Point getGeometry() { return (Point) simpleFeature.getDefaultGeometry(); } SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider, FigureStyle style);  SimpleFeaturePointFigure(SimpleFeature simpleFeature, SceneTransformProvider provider,
                                    FigureStyle normalStyle, FigureStyle selectedStyle); @Override Object createMemento(); @Override void setMemento(Object memento); @Override SimpleFeature getSimpleFeature(); @Override Point getGeometry(); @Override void setGeometry(Geometry geometry); @Override void forceRegeneration(); @Override double getX(); @Override double getY(); @Override void setLocation(double x, double y); @Override double getRadius(); @Override Object clone(); @Override int getMaxSelectionStage(); @Override Handle[] createHandles(int selectionStage);  }