本文整理了Java中java.beans.XMLEncoder.getOwner()
方法的一些代码示例,展示了XMLEncoder.getOwner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLEncoder.getOwner()
方法的具体详情如下:
包路径:java.beans.XMLEncoder
类名称:XMLEncoder
方法名:getOwner
暂无
代码示例来源:origin: org.swinglabs.swingx/swingx-beaninfo
@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}));
}
}
代码示例来源:origin: org.swinglabs/swingx-beaninfo
@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}));
}
}
内容来源于网络,如有侵权,请联系作者删除!