* @see org.jpos.ui.UIFactory
*/
public class ISOMeterFactory implements UIFactory {
public JComponent create (UI ui, Element e) {
ISOChannelPanel icp = null;
try {
Object obj = NameRegistrar.get (e.getAttributeValue ("idref"));
if (obj instanceof ISOChannel) {
icp = new ISOChannelPanel ((ISOChannel) obj, e.getText ());
} else if (obj instanceof Observable) {
icp = new ISOChannelPanel (e.getText());
((Observable)obj).addObserver (icp);
}
ISOMeter meter = icp.getISOMeter ();
if ("false".equals (e.getAttributeValue ("scroll")))
meter.setScroll (false);
String protect = e.getAttributeValue ("protect");
if (protect != null)
icp.setProtectFields (ISOUtil.toIntArray (protect));
String wipe = e.getAttributeValue ("wipe");
if (wipe != null)
icp.setWipeFields (ISOUtil.toIntArray (wipe));
String refresh = e.getAttributeValue ("refresh");
if (refresh != null)
meter.setRefresh (Integer.parseInt (refresh));
} catch (Exception ex) {