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

Examples of org.jdesktop.wonderland.client.cell.registry.CellRegistry


     * @{@inheritDoc}
     */
    public CellFactorySPI getCellSelection(String extension) throws CellCreationException {
        // Find the list of Cells that support the given extension. If none,
        // then throw an exception.
        CellRegistry registry = CellRegistry.getCellRegistry();
        Set<CellFactorySPI> factorySet = registry.getCellFactoriesByExtension(extension);
        if (factorySet == null || factorySet.size() == 0) {
            throw new CellCreationException();
        }

        // If there is only one, then just return it, since there is no choices
View Full Code Here


    @Override
    public void setVisible(boolean visible) {
        // Update the list values. We also want to (de)register a listener for
        // changes to the list of registered Cell factories any time after we
        // make it (in)visible.
        CellRegistry cellRegistry = CellRegistry.getCellRegistry();
        if (visible == true) {
            updateListValues();
            cellRegistry.addCellRegistryListener(cellListener);
        }
        else {
            cellRegistry.removeCellRegistryListener(cellListener);
        }

        // Finally, ask the superclass to make the dialog visible.
        super.setVisible(visible);
    }
View Full Code Here

            // Clear out any existing entries in the map of registered Cells
            cellFactoryMap.clear();

            // Fetch the registry of cells and for each, get the palette info
            // and populate the list.
            CellRegistry registry = CellRegistry.getCellRegistry();
            Set<CellFactorySPI> cellFactories = registry.getAllCellFactories();
            List<String> listNames = new LinkedList();

            // Loop through each cell factory we find. Insert the cell names
            // into a list. Ignore any factories without a cell name.
            for (CellFactorySPI cellFactory : cellFactories) {
View Full Code Here

            componentList.removeAll();
            imageList.clear();

            // Fetch the registry of cells and for each, get the palette info and
            // populate the list.
            CellRegistry registry = CellRegistry.getCellRegistry();
            Set<CellFactorySPI> cellFactories = registry.getAllCellFactories();

            for (CellFactorySPI cellFactory : cellFactories) {
                try {
                    // We only add the entry if it has a non-null display name.
                    // Fetch the preview image (use the default if none exists
View Full Code Here

    /**
     * @inheritDoc()
     */
    @Override
    protected void activate() {
        CellRegistry registry = CellRegistry.getCellRegistry();

        // Fetch the list of X Apps registered for the system and register them
        // with the Cell Registry. We synchronize over the set of factories
        // in case one is added/removed via the configuration channel at the
        // same time.
        synchronized (factorySet) {
            List<XAppRegistryItem> systemItems =
                    XAppRegistryItemUtils.getSystemXAppRegistryItemList();
            for (XAppRegistryItem item : systemItems) {
                String appName = item.getAppName();
                String command = item.getCommand();
                XAppCellFactory factory = new XAppCellFactory(appName, command);
                registry.registerCellFactory(factory);
                factorySet.add(factory);
            }
        }
    }
View Full Code Here

        // Remove the set of cell factories that this plugin has registered
        // on the Cell Registry. We synchronize over the set of factories
        // in case one is added/removed via the configuration channel at the
        // same time.
        synchronized (factorySet) {
            CellRegistry registry = CellRegistry.getCellRegistry();
            for (CellFactorySPI factory : factorySet) {
                registry.unregisterCellFactory(factory);
            }
            factorySet.clear();
        }
    }
View Full Code Here

        public void xappAdded(String appName, String command) {
            // Add the new factory to the registry.  We synchronize over the
            // set of factories in case the primary connection changes.
            synchronized (factorySet) {
                CellRegistry registry = CellRegistry.getCellRegistry();
                XAppCellFactory factory = new XAppCellFactory(appName, command);
                registry.registerCellFactory(factory);
                factorySet.add(factory);
            }
        }
View Full Code Here

            // Remove the X11 App from the Cell registry. We only need the app
            // name to create a suitable XAppCellFactory to remove. We
            // synchronize over the set of factories in case the primary
            // connection changes.
            synchronized (factorySet) {
                CellRegistry registry = CellRegistry.getCellRegistry();
                XAppCellFactory factory = new XAppCellFactory(appName, null);
                registry.unregisterCellFactory(factory);
                factorySet.remove(factory);
            }
        }
View Full Code Here

                        " user's x-apps store", ex);
            }

            // Register the new app in the Cell registry. The listener mechanism
            // on CellRegistry will notify everyone else of the update.
            CellRegistry registry = CellRegistry.getCellRegistry();
            appName = appName + " (User)";
            XAppCellFactory factory = new XAppCellFactory(appName, command);
            registry.registerCellFactory(factory);
        }
    }//GEN-LAST:event_userAddButtonActionPerformed
View Full Code Here

        // Remove it from the table model too.
        xAppTableModel.removeItem(item);

        // Remove it from the Cell registry, make sure we add " (User)" to the
        // app name, since that is how it appears in the Cell registry
        CellRegistry registry = CellRegistry.getCellRegistry();
        appName = appName + " (User)";
        XAppCellFactory factory = new XAppCellFactory(appName, command);
        registry.unregisterCellFactory(factory);
    }//GEN-LAST:event_userRemoveButtonActionPerformed
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.cell.registry.CellRegistry

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.