The ComponentRendering class
A ComponentRendering composite is a specialized
UI control that transforms a given host screen region using a specified
component, widget, and settings. Based on the selected ZIETrans widget,
SWT widgets are generated and placed on the ComponentRendering composite. The
following code example illustrates the concept:
ComponentRendering componentRendering = new ComponentRendering(this, SWT.NONE);
componentRendering.setScreenCapture(<fully qualified transformation
class name>.screenCapture);
componentRendering.setComponent("<fully qualified component class name>");
componentRendering.setComponentSettings
(new com.ibm.hats.common.StringableProperties(""));
componentRendering.setWidget("<fully qualified widget class name>");
componentRendering.setWidgetSettings
(new com.ibm.hats.common.StringableProperties("<widget settings>"));
componentRendering.setRegion(new com.ibm.hats.transform.regions.
BlockScreenRegion(start_row, start_col, end_row, end_col));
componentRendering.setApplyTextReplacement(true);
componentRendering.setApplyGlobalRules(true);
Note: The setWidgetSettings and setComponentSettings methods
take a standard java.util.Properties object as the parameter. You
can construct a Properties object and populate using the setProperty(String,String) method,
as opposed to using the ZIETrans StringableProperties class.