{
return null;
}
final Configuration config = runtime.getConfiguration();
final ComponentDrawable cd;
final String drawMode = config.getConfigProperty("org.pentaho.reporting.engine.classic.core.ComponentDrawableMode",
"shared");
if ("private".equals(drawMode))
{
cd = new ComponentDrawable();
}
else if ("synchronized".equals(drawMode))
{
cd = new ComponentDrawable();
cd.setPaintSynchronized(true);
}
else
{
if (frame == null)
{
frame = new JFrame();
}
cd = new ComponentDrawable(frame);
cd.setPaintSynchronized(true);
}
final String allowOwnPeer = config.getConfigProperty(
"org.pentaho.reporting.engine.classic.core.AllowOwnPeerForComponentDrawable");
cd.setAllowOwnPeer("true".equals(allowOwnPeer));
cd.setComponent((Component) o);
return cd;
}