The bugfixes:
- API-comments to implement new painting tools
- nested CGOs can be saved
JAR and sources: https://github.com/gundermann/JFX3D
public class Ellipse3D extends AbstractPaintableObject3D
@Override public void changeHeightTo(double d) { // TODO Auto-generated method stub } @Override public void changeWidthTo(double d) { // TODO Auto-generated method stub } @Override public void paint(double x, double y, double initinalX, double initinalY) { // TODO Auto-generated method stub } @Override public DoubleProperty getHeightProperty() { // TODO Auto-generated method stub return null; } @Override public DoubleProperty getWidthProperty() { // TODO Auto-generated method stub return null; } @Override public Object3DFactory getFactory() { // TODO Auto-generated method stub return null; } @Override protected Class getShapeClass() { // TODO Auto-generated method stub return null; }
@Override public void changeHeightTo(double d) { // TODO Auto-generated method stub } @Override public void changeWidthTo(double d) { // TODO Auto-generated method stub } @Override public void paint(double x, double y, double initinalX, double initinalY) { // TODO Auto-generated method stub } @Override public DoubleProperty getHeightProperty() { // TODO Auto-generated method stub return null; } @Override public DoubleProperty getWidthProperty() { // TODO Auto-generated method stub return null; } @Override public Object3DFactory getFactory() { // TODO Auto-generated method stub return null; } @Override protected Class getShapeClass() { // TODO Auto-generated method stub return null; }
public class Ellipse3DFactory extends Object3DFactory { private static Object3DFactory _instance; @Override public Object3D createPlainObject3D() { return new Ellipse3D(); } public static Object3DFactory getInstance() { if(_instance == null) _instance = new Ellipse3DFactory(); return _instance; } @Override public String getType() { return "Ellipse"; } }
Rectangle, Ellipse, None;
public MapgetFactoryFormPaintingMode() { Map paintingStartListener = new HashMap (); paintingStartListener.put(Painting.Rectangle, Rectangle3DFactory.getInstance()); paintingStartListener.put(Painting.Ellipse, Ellipse3DFactory.getInstance()); return paintingStartListener; }
public Object3DFactory getFactoryFormPreference(String type) { MappaintingStartListener = new HashMap (); paintingStartListener .put("Rectangle", Rectangle3DFactory.getInstance()); paintingStartListener.put("Ellipse", Ellipse3DFactory.getInstance()); paintingStartListener.put("complex", ComplexObject3DFactory.getInstance()); return paintingStartListener.get(type); }
@FXML public void selectPaintEllipse() { actualPaintingArea.initPainting(Painting.Ellipse); }