Package org.jdesktop.wonderland.common.cell.messages

Examples of org.jdesktop.wonderland.common.cell.messages.CellHierarchyMessage


        CellMO p = cell.getParent();
        if (p!=null) {
            parent = p.getCellID();
        }
       
        return new CellHierarchyMessage(CellHierarchyMessage.ActionType.LOAD_CELL,
            properties.getClientCellClassName(),
            cell.getLocalBounds(),
            cell.getCellID(),
            parent,
            cell.getLocalTransform(null),
View Full Code Here


        CellMO p = cell.getParent();
        if (p!=null) {
            parent = p.getCellID();
        }
       
        return new CellHierarchyMessage(CellHierarchyMessage.ActionType.LOAD_CLIENT_AVATAR,
            properties.getClientCellClassName(),
            cell.getLocalBounds(),
            cell.getCellID(),
            parent,
            cell.getLocalTransform(null),
View Full Code Here

   
    /**
     * Return a new Delete cell message
     */
    public static CellHierarchyMessage newDeleteCellMessage(CellID cellID) {
        return new CellHierarchyMessage(CellHierarchyMessage.ActionType.DELETE_CELL,
            null,
            null,
            cellID,
            null,
            null,
View Full Code Here

        if (cellMO.getParent() != null) {
            parentID = cellMO.getParent().getCellID();
        }
       
        /* Return a new CellHiearchyMessage class, with populated data fields */
        return new CellHierarchyMessage(CellHierarchyMessage.ActionType.CONFIGURE_CELL,
            cellMO.getClientCellClassName(null,capabilities),
            cellMO.getLocalBounds(),
            cellMO.getCellID(),
            parentID,
            cellMO.getLocalTransform(null),
View Full Code Here

                         ClientCapabilities capabilities) {
            super (desc, clientID, viewCellCacheRef, capabilities);
        }
       
        public void run() {
            CellHierarchyMessage msg;
                   
            // the cell may be inactive or removed.  Try to get the cell,
            // and catch the exception if it no longer exists.
            try {
                CellMO cell = CellManagerMO.getCellManager().getCell(desc.getCellID());
View Full Code Here

        }
       
        if (!(message instanceof CellHierarchyMessage))
            throw new RuntimeException("Unexpected message type "+message.getClass().getName());
       
        CellHierarchyMessage msg = (CellHierarchyMessage)message;
        switch(msg.getActionType()) {
            case LOAD_CELL :
                for(CellCacheMessageListener l : listeners) {
                    l.loadCell(msg.getCellID(),
                                msg.getCellClassName(),
                                msg.getLocalBounds(),
                                msg.getParentID(),
                                msg.getCellTransform(),
                                msg.getSetupData(),
                                msg.getCellName()
                                );
                }
//                if (viewCellID!=null && viewCellID.equals(msg.getCellID())) {
//
//                    clientView.viewCellConfigured(viewCellID);
//                    // We only need notification once
//                    viewCellID = null;
//                }
                break;

            case CONFIGURE_CELL:
                // Update recieving a "configure cell" message, dispatch to all
                // of the listeners. A "configure" message simply send a new
                // client cell state to an already existing cell.
                for (CellCacheMessageListener l : listeners) {
                    l.configureCell(msg.getCellID(), msg.getSetupData(), msg.getCellName());
                }
                break;
            case UNLOAD_CELL :
                for(CellCacheMessageListener l : listeners) {
                    l.unloadCell(msg.getCellID());
                }
                break;
            case DELETE_CELL :
                for(CellCacheMessageListener l : listeners) {
                    l.deleteCell(msg.getCellID());
                }
                break;
            case CHANGE_PARENT:
                // Unused at the moment, CellEditConnectionHandler processes reparenting
//                for(CellCacheMessageListener l : listeners) {
//                    l.changeParent(msg.getCellID(), msg.getParentID(), msg.getCellTransform());
//                }
                break;
            default :
                logger.warning("Message type not implemented "+msg.getActionType());
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.messages.CellHierarchyMessage

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.