Examples of ItsNatComponentManager


Examples of org.itsnat.comp.ItsNatComponentManager

    public void load()
    {
        Document doc = itsNatDoc.getDocument();
        HTMLInputElement elem = (HTMLInputElement)doc.getElementById("addRemoveIncludeId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        this.button = (ItsNatHTMLInputButton)componentMgr.findItsNatComponent(elem);
        this.includeComp = (ItsNatFreeInclude)componentMgr.findItsNatComponentById("freeIncludeId");

        removeInclude();

        button.addEventListener("click",this);
    }
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    public void initInputPassword()
    {
        org.w3c.dom.Document doc = itsNatDoc.getDocument();
        HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("passwordInputId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLInputPassword input = (ItsNatHTMLInputPassword)componentMgr.findItsNatComponent(inputElem);
        PlainDocument dataModel = new PlainDocument();
        input.setDocument(dataModel);

        input.addEventListener("change",this);
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    public void handleEvent(Event evt,boolean updateAgainToTest)
    {
        // Evento "change"
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
        ItsNatHTMLDocument itsNatDoc = (ItsNatHTMLDocument)itsNatEvent.getItsNatDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLInputTextBased input = (ItsNatHTMLInputTextBased)componentMgr.findItsNatComponent((Node)evt.getCurrentTarget());

        if (updateAgainToTest)
            input.setText(input.getText() + "-ok-"); // Para testear que hemos recibido el valor del cliente y que podemos cambiarlo desde el servidor. Al llegar al navegador no provoca a su vez un nuevo evento change pues el evento est� asociado a la p�rdida de foco (lo cual no ocurre en la actualizaci�n via JavaScript)

        outText("OK " + evt.getType() + " "); // Para que se vea
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();

        this.comboComp = (ItsNatHTMLSelectComboBox)compMgr.createItsNatComponentById("compId");

        DefaultComboBoxModel dataModel = (DefaultComboBoxModel)comboComp.getComboBoxModel();
        dataModel.addElement("Madrid");
        dataModel.addElement("Sevilla");
        dataModel.addElement("Segovia");
        dataModel.addElement("Barcelona");
        dataModel.addElement("Oviedo");
        dataModel.addElement("Valencia");

        dataModel.setSelectedItem("Segovia");

        comboComp.addEventListener("change",this);
        dataModel.addListDataListener(this);
        comboComp.addItemListener(this);

        this.removeButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("removeId");
        removeButton.addEventListener("click",this);

        this.itemComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("itemId");
        itemComp.setText(dataModel.getSelectedItem().toString());

        this.posComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("posId");
        posComp.setText(Integer.toString(comboComp.getSelectedIndex()));

        this.insertButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("insertId");
        insertButton.addEventListener("click",this);
    }
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void init(String id)
    {
        Document doc = itsNatDoc.getDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        HTMLAnchorElement elem = (HTMLAnchorElement)doc.getElementById(id);
        this.button = (ItsNatHTMLAnchor)componentMgr.findItsNatComponent(elem);
        DefaultButtonModel dataModel = new DefaultButtonModel();
        button.setButtonModel(dataModel);

        button.addEventListener("click",this);
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();

        this.inputComp = (ItsNatHTMLInputHidden)compMgr.createItsNatComponentById("inputId");
        inputComp.setText("Initial Hidden Value");

        PlainDocument dataModel = (PlainDocument)inputComp.getDocument();
        dataModel.addDocumentListener(this);

        this.linkComp = (ItsNatHTMLAnchor)compMgr.createItsNatComponentById("linkId");
        linkComp.addEventListener("click",this);
    }
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();

        this.inputTextComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("inputTextId");
        inputTextComp.setText("Change this text and lost the focus");
        addListeners(inputTextComp);
        inputTextComp.focus();
        inputTextComp.select();

        this.inputPassComp = (ItsNatHTMLInputPassword)compMgr.createItsNatComponentById("inputPassId");
        inputPassComp.setText("Initial password");
        addListeners(inputPassComp);

        // The HTML input file element value attribute/property can not be changed with JavaScript:
        // is ignored in MSIE and throws an error in FireFox
        this.inputFileComp = (ItsNatHTMLInputFile)compMgr.createItsNatComponentById("inputFileId");
        // inputFileComp.setText("Change this text and lost the focus");
        addListeners(inputFileComp);
    }
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();

        this.listComp = (ItsNatHTMLSelectMult)compMgr.createItsNatComponentById("compId");

        DefaultListModel dataModel = (DefaultListModel)listComp.getListModel();
        dataModel.addElement("Madrid");
        dataModel.addElement("Sevilla");
        dataModel.addElement("Segovia");
        dataModel.addElement("Barcelona");
        dataModel.addElement("Oviedo");
        dataModel.addElement("Valencia");

        ListSelectionModel selModel = listComp.getListSelectionModel();
        selModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        selModel.setSelectionInterval(2,3);

        listComp.addEventListener("change",this);
        dataModel.addListDataListener(this);
        selModel.addListSelectionListener(this);

        this.removeButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("removeId");
        removeButton.addEventListener("click",this);

        this.itemComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("itemId");
        itemComp.setText(listComp.getListModel().getElementAt(listComp.getSelectedIndex()).toString());

        this.posComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("posId");
        posComp.setText(Integer.toString(listComp.getSelectedIndex()));

        this.updateButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("updateId");
        updateButton.addEventListener("click",this);

        this.insertButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("insertId");
        insertButton.addEventListener("click",this);
    }
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public void startExamplePanel()
    {
        ItsNatDocument itsNatDoc = getItsNatDocument();
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();

        this.inputComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("inputId");
        inputComp.setText("Write any text, use SHIFT/ALT/CTRL too");

        inputComp.addEventListener("change",this);
        inputComp.addEventListener("keyup",this);
        inputComp.addEventListener("keydown",this);
View Full Code Here

Examples of org.itsnat.comp.ItsNatComponentManager

    }

    public static ItsNatHTMLInputText getInputText(String id,Node containerNode,ItsNatList list)
    {
        Element firstName = ItsNatDOMUtil.getElementById(id,containerNode);
        ItsNatComponentManager compMgr = list.getItsNatComponentManager();
        return (ItsNatHTMLInputText)compMgr.findItsNatComponent(firstName);
    }
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.