1 6 package com.thoughtriver.open.vectorvisuals.persistence; 7 8 import java.awt.geom.*; 9 import java.beans.*; 10 11 18 public class CubicCurvePersistenceDelegate extends DefaultPersistenceDelegate { 19 20 23 @Override 24 protected void initialize(final Class <?> type, final Object oldInstance, final Object newInstance, final Encoder out) { 25 super.initialize(type, oldInstance, newInstance, out); 26 CubicCurve2D curve = (CubicCurve2D) oldInstance; 27 out.writeStatement(new Statement(oldInstance, "setCurve", new Object [] { 28 curve.getX1(), 29 curve.getY1(), 30 curve.getCtrlX1(), 31 curve.getCtrlY1(), 32 curve.getCtrlX2(), 33 curve.getCtrlY2(), 34 curve.getX2(), 35 curve.getY2() 36 })); 37 38 } 39 40 } 41 | Popular Tags |