Examples of XLMap


Examples of org.boris.xlloop.util.XLMap

    public void setVolatile(boolean vol) {
        this.isVolatile = vol;
    }

    public XLoper encode() {
        XLMap s = new XLMap();
        s.add("functionName", functionName);
        if (functionHelp != null)
            s.add("functionHelp", functionHelp);
        if (category != null)
            s.add("category", category);
        if (shortcutText != null)
            s.add("shortcutText", shortcutText);
        if (helpTopic != null)
            s.add("helpTopic", helpTopic);
        if (arguments.size() > 0) {
            s.add("argumentText", CSV.toCSV((String[]) arguments.toArray(new String[0])));
            XLList c = new XLList();
            for (int i = 0; i < argumentHelp.size(); i++) {
                c.add((String) argumentHelp.get(i));
            }
            s.add("argumentHelp", c);
        }
        if (isVolatile)
            s.add("isVolatile", true);

        return s.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

import org.boris.xlloop.xloper.XLoper;

public class MenuCodec
{
    public static XLoper toXLoper(Menu menu) {
        XLMap m = new XLMap();
        XLList items = new XLList();
        XLList subs = new XLList();
        for (int i = 0; i < menu.getItemCount(); i++) {
            items.add(toXLoper(menu.getItem(i)));
        }
        for (int i = 0; i < menu.getSubMenuCount(); i++) {
            subs.add(toXLoper(menu.getSubMenu(i)));
        }
        m.add("name", menu.getName());
        m.add("items", items);
        m.add("submenus", subs);
        return m.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

        m.add("submenus", subs);
        return m.toXloper();
    }

    public static XLoper toXLoper(MenuItem item) {
        XLMap m = new XLMap();
        m.add("name", item.getName());
        return m.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

        m.add("name", item.getName());
        return m.toXloper();
    }

    public static XLoper toXLoper(SubMenu menu) {
        XLMap m = new XLMap();
        XLList items = new XLList();
        for (int i = 0; i < menu.size(); i++) {
            items.add(toXLoper(menu.get(i)));
        }

        m.add("name", menu.getName());
        if (menu.getPosition() != null)
            m.add("position", menu.getPosition());
        m.add("items", items);
        return m.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

        if (args.length > 0) {
            return args[0];
        }

        XLMap s = new XLMap();
        s.add("hello there", 123213);
        s.add("asdf", "woeiruewoir");
        return s.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

    public static double sum(double a, double b) {
        return a + b;
    }

    public static XLoper enc() {
        XLMap m = new XLMap();
        m.add("boolt", true);
        m.add("boolf", false);
        m.add("i1", 2343);
        m.add("sdf", 34.2);
        m.add("asdf", 4545345.454345345);
        m.add("as33", XLError.NAME);

        return m.toXloper();
    }
View Full Code Here

Examples of org.boris.xlloop.util.XLMap

    public static double echo(double v) {
        return v;
    }

    public static XLoper mapTest() {
        XLMap s = new XLMap();
        s.add("test", 2);
        s.add("hello", 3);
        return s.toXloper();
    }
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.