Package org.itsnat.comp.table

Examples of org.itsnat.comp.table.ItsNatTableUI


        }
    }

    public void decorateSelection(int row,boolean selected)
    {
        ItsNatTableUI tableUI = comp.getItsNatTableUI();
        int cols = comp.getTableModel().getColumnCount();
        for(int i = 0; i < cols; i++)
        {
            Element cellElem = tableUI.getCellContentElementAt(row,i);
            if (cellElem == null) return;
            decorateSelection(cellElem,selected);
        }
    }
View Full Code Here


            decorateSelection(i,selModel.isSelectedIndex(i));
    }

    public void decorateSelection(int row,boolean selected)
    {
        ItsNatTableUI tableUI = comp.getItsNatTableUI();
        Element rowElem = tableUI.getRowElementAt(row);
        if (rowElem instanceof HTMLTableRowElement)
            decorateSelection(rowElem,selected);
        else
        {   // Free Table
            int cols = comp.getTableModel().getColumnCount();
            for(int i = 0; i < cols; i++)
            {
                Element cellElem = tableUI.getCellContentElementAt(row,i);
                if (cellElem == null) continue;
                decorateSelection(cellElem,selected);
            }
        }
    }
View Full Code Here

        }
    }

    public void decorateSelection(int row,boolean selected)
    {
        ItsNatTableUI tableUI = comp.getItsNatTableUI();
        Element divElem = tableUI.getRowElementAt(row);
        if (divElem == null) return;
        String cssClass = divElem.getAttribute("class");

        if (selected)
            cssClass = cssClass + " x-grid3-row-selected";
View Full Code Here

        }
    }

    protected void openEditor(int row,int column)
    {
        ItsNatTableUI bodyUI = getItsNatTable().getItsNatTableUI();
        ItsNatTableCellUI cellInfo = bodyUI.getItsNatTableCellUIAt(row,column);
        openEditor(cellInfo);
    }
View Full Code Here

    protected void openEditor(Event evt)
    {
        Node nodeClicked = (Node)evt.getTarget(); // Puede ser un nodo interior del elemento pulsado

        ItsNatTableUI bodyUI = getItsNatTable().getItsNatTableUI();
        ItsNatTableCellUI cellInfo = bodyUI.getItsNatTableCellUIFromNode(nodeClicked);
        openEditor(cellInfo);
    }
View Full Code Here

            }

            if ((headerCellInfo == null) && (isRowSelectionAllowed() || isColumnSelectionAllowed()))
            {
                // Ha sido seguramente pulsado el cuerpo de la tabla
                ItsNatTableUI bodyUI = getItsNatTableUI();
                ItsNatTableCellUI cellInfo = bodyUI.getItsNatTableCellUIFromNode(nodeClicked);
                if (cellInfo != null)
                {
                    int row = cellInfo.getRowIndex();
                    int column = cellInfo.getColumnIndex();
                    changeSelection(row,column,toggle,extend);
View Full Code Here

    }

    public Element[] getContentElementList()
    {
        // Toda la tabla incluido el header
        ItsNatTableUI compUI = getItsNatTableUI();
        int rowCount = compUI.getRowCount();
        int colCount = compUI.getColumnCount();

        int headColCount = 0;
        ItsNatTableHeaderImpl header = getItsNatTableHeaderImpl();
        if (header != null) headColCount = colCount;

        Element[] elemList = new Element[rowCount * colCount + headColCount];
        for(int i = 0; i < rowCount; i++)
        {
            int firstCellInRow = i*colCount;
            for(int j = 0; j < colCount; j++)
                elemList[firstCellInRow + j] = compUI.getCellContentElementAt(i,j);
        }

        if (header != null)
            elemList = header.getContentElementList(elemList, headColCount);

View Full Code Here

        return elemList;
    }

    public Element[] getContentElementListOfRow(int row)
    {
        ItsNatTableUI compUI = getItsNatTableUI();
        TableModel dataModel = getTableModel();
        int colCount = dataModel.getColumnCount();
        Element[] elemList = new Element[colCount];
        for(int i = 0; i < colCount; i++)
            elemList[i] = compUI.getCellContentElementAt(row,i);
        return elemList;
    }
View Full Code Here

        return elemList;
    }

    public Element[] getContentElementListOfColumn(int column)
    {
        ItsNatTableUI compUI = getItsNatTableUI();
        TableModel dataModel = getTableModel();
        int rowCount = dataModel.getRowCount();
        Element[] elemList = new Element[rowCount];
        for(int i = 0; i < rowCount; i++)
            elemList[i] = compUI.getCellContentElementAt(i,column);
        return elemList;
    }
View Full Code Here

        }
    }

    public void decorateSelection(int row,boolean selected)
    {
        ItsNatTableUI tableUI = comp.getItsNatTableUI();
        int cols = comp.getTableModel().getColumnCount();
        for(int i = 0; i < cols; i++)
        {
            Element circleElem = tableUI.getCellContentElementAt(row,i);
            if (circleElem == null) return;
            decorateSelection(circleElem,selected);
        }
    }
View Full Code Here

TOP

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

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.