Examples of ItsNatHTMLComponentManager


Examples of org.itsnat.comp.ItsNatHTMLComponentManager

    public void load()
    {
        org.w3c.dom.Document doc = itsNatDoc.getDocument();
        HTMLInputElement inputElem = (HTMLInputElement)doc.getElementById("testJSFromServerId");
        ItsNatHTMLComponentManager componentMgr = itsNatDoc.getItsNatHTMLComponentManager();
        ItsNatHTMLInputButton input = (ItsNatHTMLInputButton)componentMgr.findItsNatComponent(inputElem);

        input.addEventListener("click",this);

        ButtonModel model = input.getButtonModel();
        model.addChangeListener(this);
View Full Code Here

Examples of org.itsnat.comp.ItsNatHTMLComponentManager

        load();
    }

    public void load()
    {
        ItsNatHTMLComponentManager compMgr = itsNatDoc.getItsNatHTMLComponentManager();

        this.inputComp = (ItsNatHTMLInputText)compMgr.addItsNatComponentById("inputId");
        inputComp.setText("Change this text and lost the focus");

        inputComp.addEventListener("change",this);

        PlainDocument dataModel = (PlainDocument)inputComp.getDocument();
View Full Code Here

Examples of org.itsnat.comp.ItsNatHTMLComponentManager

    }

    public static void LABELS()
    {
        ItsNatHTMLDocument itsNatDoc = null;
        ItsNatHTMLComponentManager componentMgr = itsNatDoc.getItsNatHTMLComponentManager();

        ItsNatHTMLLabel label = (ItsNatHTMLLabel)componentMgr.createItsNatComponentById("labelId");
        try { label.setValue(new Integer(3))} // Initial value
        catch(PropertyVetoException ex) { throw new RuntimeException(ex); }

        ItsNatHTMLSelectComboBox editorComp = componentMgr.createItsNatHTMLSelectComboBox(null,null);
        DefaultComboBoxModel model = (DefaultComboBoxModel)editorComp.getComboBoxModel();
        for(int i=0; i < 5; i++) model.addElement(new Integer(i));

        ItsNatLabelEditor editor = componentMgr.createDefaultItsNatLabelEditor(editorComp);
        label.setItsNatLabelEditor(editor);

        EventListener evtListener = new EventListener()
        {
            public void handleEvent(Event evt)
View Full Code Here

Examples of org.itsnat.comp.ItsNatHTMLComponentManager

    }

    public static void LABELS_CUSTOM_EDITOR()
    {
        ItsNatHTMLDocument itsNatDoc = null;
        ItsNatHTMLComponentManager componentMgr = itsNatDoc.getItsNatHTMLComponentManager();

        ItsNatFreeLabel comp = (ItsNatFreeLabel)componentMgr.createItsNatComponentById("labelId","freeLabel",null);
        try { comp.setValue(new Person("Jose M.","Arranz")); }
        catch(PropertyVetoException ex) { throw new RuntimeException(ex); }

        ItsNatLabelEditor editor = new PersonCustomLabelEditor();
        comp.setItsNatLabelEditor(editor);
View Full Code Here

Examples of org.itsnat.comp.ItsNatHTMLComponentManager

    }

    public static void LABELS_CUSTOM_RENDERER()
    {
    ItsNatHTMLDocument itsNatDoc = null;
    ItsNatHTMLComponentManager componentMgr = itsNatDoc.getItsNatHTMLComponentManager();

    ItsNatFreeLabel comp = (ItsNatFreeLabel)componentMgr.createItsNatComponentById("labelId","freeLabel",null);

    ItsNatLabelRenderer renderer = new PersonCustomLabelRenderer();
    comp.setItsNatLabelRenderer(renderer);

    try { comp.setValue(new Person("Jose M.","Arranz")); }
View Full Code Here

Examples of org.itsnat.comp.ItsNatHTMLComponentManager

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

        ItsNatHTMLComponentManager compMgr =
                (ItsNatHTMLComponentManager)itsNatDoc.getItsNatComponentManager();

        Document doc = itsNatDoc.getDocument();
        HTMLSelectElement select = (HTMLSelectElement)doc.getElementById("htmlSelectId");
        this.selComp = compMgr.createItsNatHTMLSelectComboBox(select,null);
        DefaultComboBoxModel dataModel = (DefaultComboBoxModel)selComp.getComboBoxModel();
        dataModel.addElement("One");
        dataModel.addElement("Two");
        dataModel.addElement("Three");
        selComp.addItemListener(this);

        HTMLInputElement input = (HTMLInputElement)doc.getElementById("htmlInputId");
        inputComp = compMgr.createItsNatHTMLInputText(input,null);

        HTMLInputElement button = (HTMLInputElement)doc.getElementById("htmlButtonId");
        buttonComp = compMgr.createItsNatHTMLInputButton(button,null);
        buttonComp.addEventListener("click",this);
    }
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.