@Override
protected void initialize(Class type, Object oldInstance,
Object newInstance, Encoder out) {
// p("image painter delegate called");
super.initialize(type, oldInstance, newInstance, out);
//p("old instance = " + oldInstance);
//p("owner = " + ((XMLEncoder)out).getOwner());
PersistenceOwner owner = (PersistenceOwner)((XMLEncoder)out).getOwner();
ImagePainter ip = (ImagePainter)oldInstance;
// p("need to convert string: " + ip.getImageString());
// String s = owner.toXMLURL(ip.getImageString());
// p("converted to: " + s);
//out.writeExpression(new Expression(oldInstance,owner,"fromXMLURL",new Object[]{ip.getImageString()}));
//out.writeStatement(new Statement(owner,"fromXMLURL",new Object[]{ip.getImageString()}));
//out.writeStatement(new Statement(oldInstance,"setImageString",new Object[]{
//new Expression(oldInstance,owner,"fromXMLURL",new Object[]{ip.getImageString()})
//}));
out.writeStatement(new Statement(oldInstance,"setResolver",new Object[]{owner}));
// out.writeStatement(new Statement(oldInstance,"setImageString",new Object[]{s}));
}
PainterUtil.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:swingx
作者:
评论列表
文章目录