Package org.itsnat.impl.comp.list

Examples of org.itsnat.impl.comp.list.ListSelectionModelMgrImpl


        if (!synchListModelFromTreeModel) return;

        boolean oldState = synchTreeModelFromListModel;
        this.synchTreeModelFromListModel = false; // por si acaso (actualizaci�n recursiva al cambiar el list selection)

        ListSelectionModelMgrImpl listSelModelMgr = getListSelectionModelMgr();
        ListSelectionModel listSelection = listSelModelMgr.getListSelectionModel();

        TreePath[] paths = e.getPaths();
        int[] rows = tree.getRowsForPaths(paths);

        boolean oldAdjusting = listSelection.getValueIsAdjusting();
        listSelection.setValueIsAdjusting(true)// Evita procesar muchos eventos para procesar al final todos en uno
        try
        {
            for(int i = 0; i < paths.length; i++)
            {
                int row = rows[i];


                if (row >= 0)
                {
                    if (e.isAddedPath(i)) // es m�s eficiente que pasar el TreePath
                    {
                        listSelModelMgr.addSelectionInterval(row,row);
                    }
                    else
                    {
                        listSelModelMgr.removeSelectionInterval(row,row);
                    }
                }
                else // No se visualiza por tanto no puede estar seleccionado
                {
                    throw new ItsNatException("A hidden node can not be selected/unselected",e);
View Full Code Here

TOP

Related Classes of org.itsnat.impl.comp.list.ListSelectionModelMgrImpl

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.