Package org.jdesktop.wonderland.client.cell.registry.spi

Examples of org.jdesktop.wonderland.client.cell.registry.spi.CellComponentFactorySPI


        // Fetch the set of component property display names that are already
        // on the set and remove from the list of factories.
        CellServerState state = editframe.getCellServerState();
        Iterator<CellComponentFactorySPI> it = factories.iterator();
        while (it.hasNext() == true) {
            CellComponentFactorySPI spi = it.next();
            Class clazz = spi.getDefaultCellComponentServerState().getClass();
            if (state.getComponentServerState(clazz) != null) {
                it.remove();
            }
        }
View Full Code Here


        dialog.setLocationRelativeTo(this);
        dialog.setVisible(true);

        // If the OK button was pressed on the dialog and we can fetch a valid
        // cell component factory, then try to add it on the server.
        CellComponentFactorySPI spi = dialog.getCellComponentFactorySPI();
        if (dialog.getReturnStatus() == AddComponentDialog.RET_OK && spi != null) {
            addComponent(spi);
        }
    }//GEN-LAST:event_addCapabilityButtonActionPerformed
View Full Code Here

        }

        // Using the registry of Cell components, find a factory to generate
        // a default cell component server state class.
        CellComponentRegistry r = CellComponentRegistry.getCellComponentRegistry();
        CellComponentFactorySPI spi = r.getCellFactoryByStateClass(clazz);
        if (spi == null) {
            LOGGER.warning("Could not find cell component factory for " +
                    clazz.getName());
            return;
        }

        // Create a new (default) instance of the server-side cell component
        // state class. We use this to find out what the class name is for
        // the cell component on the server side.
        CellComponentServerState s = spi.getDefaultCellComponentServerState();
        String className = s.getServerComponentClassName();

        // Send a message to remove the component giving the class name. Wait
        // for a response.
        CellID cellID = selectedCell.getCellID();
View Full Code Here

     */
    public synchronized void unregisterCellComponentFactory(CellComponentFactorySPI factory) {
        // Add to the set containing all cell factories and the map
        componentFactorySet.remove(factory);

        CellComponentFactorySPI cur = componentFactoryMap.get(factory.getClass());
        if (cur == factory) {
            componentFactoryMap.remove(factory.getClass());
        }

        cur = stateFactoryMap.get(factory.getDefaultCellComponentServerState().getClass());
View Full Code Here

        // now search annotations
        ScannedClassLoader cl = manager.getClassloader();
        Iterator<CellComponentFactorySPI> it = cl.getAll(
                CellComponentFactory.class, CellComponentFactorySPI.class);
        while (it.hasNext()) {
            CellComponentFactorySPI factory = it.next();
            registerCellComponentFactory(factory);
            sessionFactories.add(factory);
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.cell.registry.spi.CellComponentFactorySPI

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.