Examples of ISOChannelPanel


Examples of org.jpos.iso.gui.ISOChannelPanel

* @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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.