Examples of DomNode


Examples of org.onemind.swingweb.client.dom.DomNode

    /**
     * {@inheritDoc}
     */
    protected void handleChildren(AbstractClient rootHandler, IContainer c, DomNode element)
    {
        DomNode menuElement = getFirstElementByTag(element, "element");
        if (menuElement != null)
        {
            MenuBar menuBar = (MenuBar) rootHandler.handle(c, menuElement);
            if (menuBar.getParent() == null)
            {
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

        choice.clear();
        List nodes = element.getChildNodes();
        int count = 0;
        for (int i = 0; i < nodes.size(); i++)
        {
            DomNode childNode = (DomNode) nodes.get(i);
            if ("item".equals(childNode.getName()))
            {
                DomNode childElement = (DomNode) childNode;
                String value = childElement.getAttribute("value");
                String selected = childElement.getAttribute("selected");
                choice.addItem(value);
                if (Boolean.valueOf(selected).booleanValue())
                {
                    choice.setSelectedIndex(count);
                }
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    {
        bar.clearItems();
        List nodes = getComponentNodes(element);
        for (int i = 0; i < nodes.size(); i++)
        {
            DomNode childNode = (DomNode) nodes.get(i);
            if (childNode instanceof DomNode)
            {
                DomNode childElement = childNode;
                Object childCom = rootHandler.handle(bar, childElement);
                handleChildMenu(rootHandler, bar, childCom, childElement);
            }
        }
    }
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    {
        menu.clearItems();
        List nodes = getComponentNodes(element);
        for (int i = 0; i < nodes.size(); i++)
        {
            DomNode childNode = (DomNode) nodes.get(i);
            Object childCom = rootHandler.handle(menu, childNode);
            if (childCom instanceof MenuItem)
            {
                MenuItem item = (MenuItem) childCom;
                menu.addItem(item);
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    protected void handleTreeNodes(ITreeNode treeNode, DomNode element, String idPrefix)
    {
        List nodeList = getChildrenByTag(element, "treenode");
        for (int n = 0; n < nodeList.size(); n++)
        {
            DomNode treenodeNode = (DomNode) nodeList.get(n);
            String nodeId = treenodeNode.getAttribute("id");
            List elements = getChildrenByTag(treenodeNode, "element");
            if (elements.size() > 0)
            {
                DomNode elementNode = (DomNode) elements.get(0);
                String pregenId = idPrefix + nodeId;
                getClient().removeComponent(pregenId);
                Widget content = (Widget) getClient().handle(this, elementNode, pregenId);
                TreeNode tn = new TreeNode(pregenId, content);
                treeNode.addNode(tn);
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

        list.clear();
        List nodes = element.getChildNodes();
        int count = 0;
        for (int i = 0; i < nodes.size(); i++)
        {
            DomNode childElement = (DomNode) nodes.get(i);
            if ("item".equals(childElement.getName()))
            {
                String value = childElement.getAttribute("value");
                String selected = childElement.getAttribute("selected");
                list.addItem(value, String.valueOf(count));
                if (Boolean.valueOf(selected).booleanValue())
                {
                    list.setItemSelected(count, true);
                }
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

        int cols = getInt(element, "cols");
        t.resize(rows, cols);
        List headerList = getChildrenByTag(element, "header");
        if (headerList.size() > 0)
        {
            DomNode headersNode = (DomNode) headerList.get(0);
            List headers = getChildrenByTag(headersNode, "col");
            for (int i = 0; i < headers.size(); i++)
            {
                DomNode colNode = (DomNode) headers.get(i);
                DomNode valueNode = getFirstChildElement(colNode);
                Widget value = (Widget) getClient().handle(this, valueNode);
                DOM.setStyleAttribute(value.getElement(), "width", "100%");
                DOM.setStyleAttribute(value.getElement(), "height", "100%");
                t.setHeaderWidget(i, value);
                getClient().setEventInterceptor(value, t);
            }
        }
        List rowList = getChildrenByTag(element, "row");
        for (int row = 0; row < rowList.size(); row++)
        {
            DomNode rowNode = (DomNode) rowList.get(row);
            List colList = getChildrenByTag(rowNode, "col");
            for (int col = 0; col < colList.size(); col++)
            {
                DomNode colNode = (DomNode) colList.get(col);
                DomNode valueNode = getFirstChildElement(colNode);
                String pregenId = id + "_" + row + "_" + col;
                Widget value = (Widget) getClient().handle(this, valueNode, pregenId);
                DOM.setStyleAttribute(value.getElement(), "borderWidth", "0px");
                DOM.setStyleAttribute(value.getElement(), "width", "100%");
                DOM.setStyleAttribute(value.getElement(), "height", "100%");
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    }

    protected void handleChildren(AbstractClient rootHandler, IContainer c, DomNode element)
    {
        ComponentLayout layout = c.getLayout();
        DomNode layoutNode = getFirstElementByTag(element, "layout");
        if (layoutNode != null)
        {
            List nodes = getChildrenByTag(layoutNode, "cell");
            int cols = getInt(layoutNode, "cols");
            int rows = getInt(layoutNode, "rows");
            Map toBeAdded = new HashMap();
            for (int i = 0; i < nodes.size(); i++)
            {
                DomNode cellElement = (DomNode) nodes.get(i);
                DomNode childElement = getFirstChildElement(cellElement);
                Object childCom = null;               
                if (childElement != null)
                {
                    childCom = rootHandler.handle(c, childElement);
                    int x = getInt(childElement, "x");
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    public static DomNode getFirstChildElement(DomNode element)
    {
        List nodes = element.getChildNodes();
        for (int i = 0; i < nodes.size(); i++)
        {
            DomNode childNode = (DomNode) nodes.get(i);
            if (isComponentNode(childNode))
            {
                return (DomNode) childNode;
            }
        }
View Full Code Here

Examples of org.onemind.swingweb.client.dom.DomNode

    {
        List result = new ArrayList();
        List childNodes = node.getChildNodes();
        for (int i = 0; i < childNodes.size(); i++)
        {
            DomNode childNode = (DomNode) childNodes.get(i);
            if (isComponentNode(childNode))
            {
                result.add(childNode);
            }
        }
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.