org.jdesktop.wonderland.client.cell.registry.spi
Interface CellFactorySPI


public interface CellFactorySPI

A CellFactorySPI class is responsible for generating the necessary information to generate a new cell. This includes:

  1. A default cell setup class.
  2. A display name and image to be used in a palette of cell types.
  3. A list of file extensions which can be rendered by this cell type.
Classes that implement this interface must also annotate themselves with

Author:
Jordan Slott

Method Summary
<T extends CellServerState>
T
getDefaultCellServerState(java.util.Properties props)
          Returns a default cell server state class for this cell type, given a (possibly null) set of properties.
 java.lang.String getDisplayName()
          Returns the human-readable display name of the cell type to display in the palette of cell types.
 java.lang.String[] getExtensions()
          Returns an array of extension file types supported by this cell.
 java.awt.Image getPreviewImage()
          Returns an image preview of the cell type.
 

Method Detail

getExtensions

java.lang.String[] getExtensions()
Returns an array of extension file types supported by this cell. The cell can handle media with these extensions. The file extensions are case insensitive.

Returns:
An array of supported file extension (e.g. 'jpg', 'dae')

getDefaultCellServerState

<T extends CellServerState> T getDefaultCellServerState(java.util.Properties props)
Returns a default cell server state class for this cell type, given a (possibly null) set of properties. The properties carries a collection of key-value pairs used to initialize the state of the cell. The key values are defined by a standard mapping. If this method returns null, a new Cell is not created.

Parameters:
props - A set of initial properties
Returns:
A cell server state class with default values

getDisplayName

java.lang.String getDisplayName()
Returns the human-readable display name of the cell type to display in the palette of cell types. If the cell type should not appear in the palette, this method should return null.

Returns:
The name of the cell type

getPreviewImage

java.awt.Image getPreviewImage()
Returns an image preview of the cell type.

Returns:
An image of the cell type


Open Wonderland - http://openwonderland.org