Package org.jdesktop.wonderland.modules.avatarbase.client.registry.AvatarRegistry

Examples of org.jdesktop.wonderland.modules.avatarbase.client.registry.AvatarRegistry.AvatarInUseListener


        });

        // Listen for when a new avatar has been selected for use and repaint
        // the list. We do not need to do this in the AWT Event Thread because
        // repaint() just schedules something there
        registry.addAvatarInUseListener(new AvatarInUseListener() {
            public void avatarInUse(AvatarSPI avatar, boolean isLocal) {
                avatarList.repaint();
            }
        });
View Full Code Here


        }

        // We also want to listen (if we aren't doing so already) for when the
        // avatar in-use has changed.
        if (inUseListener == null) {
            inUseListener = new AvatarInUseListener() {
                public void avatarInUse(AvatarSPI avatar, boolean isLocal) {
                    refreshAvatarInUse(newViewCell, isLocal);
                }
            };
            AvatarRegistry.getAvatarRegistry().addAvatarInUseListener(inUseListener);
        }

        // set the current avatar
        avatarCellRenderer = (AvatarImiJME) rend;

        // start listener for new changes. This is used for the chase camera.
        avatarCellRenderer.addAvatarChangedListener(avatarChangedListener);

        // Set the state of the chase camera from the current avatar in the
        // cell renderer.
        if (camState != null) {
            camState.setTargetCharacter(avatarCellRenderer.getAvatarCharacter());
            camModel.reset(camState);
        }

        // Initialize the avatar control panel (test) with the current avatar
        // character.
        //        if (testPanelRef != null && testPanelRef.get() != null) {
        //            testPanelRef.get().setAvatarCharacter(avatarCellRenderer.getAvatarCharacter());
        //        }

        // Initialize the gesture HUD panel with the current avatar character.
        if (gestureHUDRef != null && gestureHUDRef.get() != null) {
            gestureHUDRef.get().setAvatarCharacter(avatarCellRenderer.getAvatarCharacter(),
                                                   gestureMI.isSelected());
        }

        // We also want to listen (if we aren't doing so already) for when the
        // avatar in-use has changed.
        if (inUseListener == null) {
            inUseListener = new AvatarInUseListener() {
                public void avatarInUse(AvatarSPI avatar, boolean isLocal) {
                    refreshAvatarInUse(newViewCell, isLocal);
                }
            };
            AvatarRegistry.getAvatarRegistry().addAvatarInUseListener(inUseListener);
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.avatarbase.client.registry.AvatarRegistry.AvatarInUseListener

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.