Package net.rim.device.api.util

Examples of net.rim.device.api.util.SimpleSortingVector


            }
        }

        // Sort by feature id so that the JS gets loaded in the right order
        if( !jsExtensionsByFeatureId.isEmpty() ) {
            SimpleSortingVector featureIds = new SimpleSortingVector();
            Enumeration keys = jsExtensionsByFeatureId.keys();
            while( keys.hasMoreElements() ) {
                featureIds.addElement( keys.nextElement() );
            }

            featureIds.setSortComparator( JSUtilities.getStringComparator() );
            featureIds.reSort();

            Enumeration sortedFeatureIds = featureIds.elements();
            while( sortedFeatureIds.hasMoreElements() ) {
                IJSExtension jsExtension = (IJSExtension) jsExtensionsByFeatureId.get( sortedFeatureIds.nextElement() );
                jsExtension.loadFeature( feature.getID(), feature.getVersion(), doc, scriptEngine, ( (WidgetConfigImpl) _widgetConfig ).getJSInjectionPaths() );
            }
        }
View Full Code Here


        try {
            if( _widgetConfig instanceof WidgetConfigImpl ) {
                WidgetConfigImpl wConfigImpl = (WidgetConfigImpl) _widgetConfig;

                // shared global JS files
                SimpleSortingVector sharedGlobalJSPaths = wConfigImpl.getSharedGlobalJSInjectionPaths();
                sharedGlobalJSPaths.setSortComparator( JSUtilities.getStringComparator() );
                // sort to ensure JS is loaded in correct order
                sharedGlobalJSPaths.reSort();
                Enumeration sharedGlobalJSPathElems = sharedGlobalJSPaths.elements();
                while( sharedGlobalJSPathElems.hasMoreElements() ) {
                    String jsPath = getValidPath( (String) sharedGlobalJSPathElems.nextElement() );
                    Object compiledScript = scriptEngine.compileScript( readJSContent( jsPath ) );
                    scriptEngine.executeCompiledScript( compiledScript, null );
                }
View Full Code Here

        // Add this object as the folder listener for the store email service
        _store.addFolderListener(this);

        // Initialize the simple sorting vector to sort manually according to
        // most recent date.
        _messages = new SimpleSortingVector();
        _messages.setSortComparator(Util.SORT_BY_MOST_RECENT_DATE);
        _messages.setSort(false);

        // Fill the message vector then sort it
        populateList(_store.list(Folder.SUBTREE));
View Full Code Here

TOP

Related Classes of net.rim.device.api.util.SimpleSortingVector

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.