Package org.itsnat.comp

Examples of org.itsnat.comp.ItsNatComponentManager


    public ModalLayerSVGDocument(ItsNatDocument itsNatDoc)
    {
        this.itsNatDoc = itsNatDoc;

        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();
        Document doc = itsNatDoc.getDocument();

        this.link = doc.getElementById("startId");
        ((EventTarget)link).addEventListener("click",this,false);

        this.cleanModeCheck1 = (ItsNatFreeCheckBox)compMgr.createItsNatFreeCheckBox(doc.getElementById("cleanModeId1"), null);
        cleanModeCheck1.setSelected(false);
        cleanModeCheck1.getToggleButtonModel().addChangeListener(this);

        this.cleanModeCheck2 = (ItsNatFreeCheckBox)compMgr.createItsNatFreeCheckBox(doc.getElementById("cleanModeId2"), null);
        cleanModeCheck2.setSelected(false);
        cleanModeCheck2.getToggleButtonModel().addChangeListener(this);
    }
View Full Code Here


        showModalView(code,isCleanMode2(),(float)0.1,"black");
    }

    public void showModalView(String code,boolean cleanMode,float opacity,String background)
    {
        ItsNatComponentManager compMgr = itsNatDoc.getItsNatComponentManager();
        final ItsNatModalLayer modalLayer = compMgr.createItsNatModalLayer(null,cleanMode,opacity,background,null);

        final Document doc = itsNatDoc.getDocument();
        DocumentFragment frag = itsNatDoc.toDOM(code);
        final Element elem = (Element)frag.getFirstChild();
        doc.getDocumentElement().appendChild(elem);
View Full Code Here

        ItsNatVariableResolver resolver = itsNatDoc.createItsNatVariableResolver(true);
        resolver.setLocalVariable("firstNameId","firstName_" + index);
        resolver.setLocalVariable("lastNameId","lastName_" + index);
        resolver.resolve(cellElem);

        ItsNatComponentManager componentMgr = comp.getItsNatComponentManager();
        if (!itsNatDoc.getItsNatDocumentTemplate().isAutoBuildComponents())
            componentMgr.buildItsNatComponents(cellElem);

        final ItsNatHTMLInputText firstNameComp = (ItsNatHTMLInputText)componentMgr.findItsNatComponentById("firstName_" + index);
        final ItsNatHTMLInputText lastNameComp = (ItsNatHTMLInputText)componentMgr.findItsNatComponentById("lastName_" + index);

        final Person person = (Person)value;

        firstNameComp.setText(person.getFirstName());
View Full Code Here

    {
        ItsNatDocument itsNatDoc = list.getItsNatDocument();
        if (!itsNatDoc.getItsNatDocumentTemplate().isAutoBuildComponents())
        {
            // En modo auto build se destruyen autom�ticamente
            ItsNatComponentManager componentMgr = list.getItsNatComponentManager();
            componentMgr.removeItsNatComponents(cellContentElem,true);
        }

    }
View Full Code Here

    }

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

        this.startButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("startId");
        startButton.addEventListener("click",this);

        this.listComp = (ItsNatFreeListMultSel)compMgr.createItsNatComponentById("compId","freeListMultSel",null);

        DefaultListModel dataModel = (DefaultListModel)listComp.getListModel();

        ListSelectionModel selModel = listComp.getListSelectionModel();
        selModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        selModel.addListSelectionListener(new ListSelectionDecorator(listComp));

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

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

        this.itemComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("itemId");

        this.posComp = (ItsNatHTMLInputText)compMgr.createItsNatComponentById("posId");

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

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

    public void initTextArea(ItsNatServletRequest request)
    {
        org.w3c.dom.Document doc = itsNatDoc.getDocument();
        HTMLTextAreaElement elem = (HTMLTextAreaElement)doc.getElementById("textAreaId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLTextArea comp = (ItsNatHTMLTextArea)componentMgr.findItsNatComponent(elem);
        PlainDocument dataModel = new PlainDocument();
        comp.setDocument(dataModel);

        comp.setText("Initial Text");
View Full Code Here

    public void handleEvent(Event evt)
    {
        // Evento "change" o "keyup" o "keydown"
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
        ItsNatHTMLDocument itsNatDoc = (ItsNatHTMLDocument)itsNatEvent.getItsNatDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLTextArea comp = (ItsNatHTMLTextArea)componentMgr.findItsNatComponent((Node)evt.getCurrentTarget());

        if (evt.getType().equals("change"))
            comp.setText(comp.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

    public void initCombo(String id)
    {
        Document doc = itsNatDoc.getDocument();
        HTMLSelectElement selectElem = (HTMLSelectElement)doc.getElementById(id);
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        this.combo = (ItsNatHTMLSelectComboBox)componentMgr.findItsNatComponent(selectElem);
        combo.addEventListener("change",this);

        super.initCombo();
    }
View Full Code Here

    public void handleEvent(Event evt)
    {
        ItsNatDOMStdEvent itsNatEvent = (ItsNatDOMStdEvent)evt;
        ItsNatHTMLDocument itsNatDoc = (ItsNatHTMLDocument)itsNatEvent.getItsNatDocument();
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLSelectComboBox combo = (ItsNatHTMLSelectComboBox)componentMgr.findItsNatComponent((Node)evt.getCurrentTarget());
        int selected = Integer.parseInt((String)itsNatEvent.getExtraParam("selectedIndex"));
        TestUtil.checkError(selected == combo.getSelectedIndex());

        super.handleEvent(evt);
    }
View Full Code Here

    }

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

        this.inputButton = (ItsNatHTMLInputButton)compMgr.createItsNatComponentById("inputButtonId");
        addListeners(inputButton);

        this.inputImage = (ItsNatHTMLInputImage)compMgr.createItsNatComponentById("inputImageId");
        addListeners(inputImage);

        this.inputSubmit = (ItsNatHTMLInputSubmit)compMgr.createItsNatComponentById("inputSubmitId");
        addListeners(inputSubmit);

        this.inputReset = (ItsNatHTMLInputReset)compMgr.createItsNatComponentById("inputResetId");
        addListeners(inputReset);

        this.buttonComp = (ItsNatHTMLButton)compMgr.createItsNatComponentById("buttonId");
        addListeners(buttonComp);

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

TOP

Related Classes of org.itsnat.comp.ItsNatComponentManager

Copyright © 2018 www.massapicom. 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.