Package org.itsnat.comp.table

Examples of org.itsnat.comp.table.ItsNatHTMLTable


        return null;
    }

    public ItsNatHTMLTable createItsNatHTMLTable(HTMLTableElement element,ItsNatTableStructure structure,NameValue[] artifacts,boolean execCreateFilters,ItsNatStfulDocComponentManagerImpl compMgr)
    {
        ItsNatHTMLTable comp = null;
        boolean doFilters = hasBeforeAfterCreateItsNatComponentListener(execCreateFilters,compMgr);
        if (doFilters) comp = (ItsNatHTMLTable)processBeforeCreateItsNatComponentListener(element,getCompType(),getUseStructureParamArray(structure),artifacts,compMgr);
        if (comp == null)
            comp = new ItsNatHTMLTableImpl(element,structure,artifacts,compMgr);
        if (doFilters) comp = (ItsNatHTMLTable)processAfterCreateItsNatComponentListener(comp,compMgr);
View Full Code Here


    public void initTable()
    {
        Document doc = itsNatDoc.getDocument();
        HTMLTableElement tableElem = (HTMLTableElement)doc.getElementById("tableId2");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLTable comp = (ItsNatHTMLTable)componentMgr.findItsNatComponent(tableElem);
        initTable(comp,"addRowTableId2","removeRowTableId2","joystickModeTableId2");
    }
View Full Code Here

    public void initTable()
    {
        Document doc = itsNatDoc.getDocument();
        HTMLTableElement tableElem = (HTMLTableElement)doc.getElementById("tableNoHeaderId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLTable comp = (ItsNatHTMLTable)componentMgr.findItsNatComponent(tableElem);
        initTable(comp,"addRowTableNoHeaderId","removeRowTableNoHeaderId","joystickModeTableNoHeaderId");
    }
View Full Code Here

    public void initTable()
    {
        Document doc = itsNatDoc.getDocument();
        HTMLTableElement tableElem = (HTMLTableElement)doc.getElementById("tableId");
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();
        ItsNatHTMLTable comp = (ItsNatHTMLTable)componentMgr.findItsNatComponent(tableElem);
        initTable(comp,"addRowTableId","removeRowTableId","joystickModeTableId");
    }
View Full Code Here

        ((DefaultListModel)freeList.getListModel()).addElement("Option 1");
        ((DefaultListModel)freeList.getListModel()).addElement("Option 2");

        // Tables

        ItsNatHTMLTable table = (ItsNatHTMLTable)compMgr.findItsNatComponentById("tableId");
        check(table);
        ((DefaultTableModel)table.getTableModel()).addColumn("Col 1");
        ((DefaultTableModel)table.getTableModel()).addColumn("Col 2");
        ((DefaultTableModel)table.getTableModel()).addRow(new String[]{"Item 1,1","Item 1,2"});
        ((DefaultTableModel)table.getTableModel()).addRow(new String[]{"Item 2,1","Item 2,2"});

        ItsNatFreeTable freeTable = (ItsNatFreeTable)compMgr.findItsNatComponentById("freeTableId");
        check(freeTable);
        ((DefaultTableModel)freeTable.getTableModel()).addColumn("Col 1");
        ((DefaultTableModel)freeTable.getTableModel()).addColumn("Col 2");
View Full Code Here

    public static void TABLES()
    {
        ItsNatDocument itsNatDoc = null;
        ItsNatComponentManager componentMgr = itsNatDoc.getItsNatComponentManager();

        ItsNatHTMLTable tableComp = (ItsNatHTMLTable)componentMgr.createItsNatComponentById("compId");

        DefaultTableModel dataModel = (DefaultTableModel)tableComp.getTableModel();
        dataModel.addColumn("City");
        dataModel.addColumn("Public square");
        dataModel.addColumn("Monument");
        dataModel.addRow(new String[] {"Madrid","Plaza Mayor","Palacio Real"});
        dataModel.addRow(new String[] {"Sevilla","Plaza de Espa�a","Giralda"});
        dataModel.addRow(new String[] {"Segovia","Plaza del Azoguejo","Acueducto Romano"});

        ListSelectionModel rowSelModel = tableComp.getRowSelectionModel();
        ListSelectionModel columnSelModel = tableComp.getColumnSelectionModel();

        rowSelModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
        columnSelModel.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);

        tableComp.setRowSelectionAllowed(true);
        tableComp.setColumnSelectionAllowed(false);

        rowSelModel.addListSelectionListener(new TableRowSelectionDecoration(tableComp));

        rowSelModel.setSelectionInterval(1,1);
View Full Code Here

TOP

Related Classes of org.itsnat.comp.table.ItsNatHTMLTable

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.