Package org.jdesktop.wonderland.modules.portal.common

Examples of org.jdesktop.wonderland.modules.portal.common.PortalComponentClientState


    }

    @Override
    public CellComponentClientState getClientState(CellComponentClientState state, WonderlandClientID clientID, ClientCapabilities capabilities) {
        if (state == null) {
            state = new PortalComponentClientState();
        }

  PortalComponentClientState clientState = (PortalComponentClientState) state;

        clientState.setServerURL(serverURL);
        clientState.setLocation(location);
        clientState.setLook(look);
  clientState.setAudioSourceType(audioSourceType);
  clientState.setAudioSource(audioSource);
  clientState.setUploadFile(uploadFile);
  clientState.setCachedAudioSource(cachedAudioSource);
  clientState.setVolume(volume);
       
        clientState.setBackgroundColor(backgroundColor);
        clientState.setTextColor(textColor);
        clientState.setImageURL(imageURL);
        clientState.setMessage(message);

        return super.getClientState(state, clientID, capabilities);
    }
View Full Code Here


    @Override
    public void setClientState(CellComponentClientState clientState) {
        super.setClientState(clientState);

  PortalComponentClientState state = (PortalComponentClientState) clientState;

        serverURL = state.getServerURL();
       
        location = state.getLocation();
       
        look = state.getLook();

  audioSource = state.getAudioSource();
 
  if (audioSource == null || audioSource.length() == 0) {
      audioSource = PortalComponentProperties.getDefaultAudioSource();
  }

  uploadFile = state.getUploadFile();

  volume = state.getVolume();

  if (audioSource != null) {
      try {
                teleportAudioURL =
        PortalComponent.class.getResource(audioSource);

                //URL url = PortalComponent.class.getResource(audioSource);
                //teleportAudio = new AudioResource(url);
          //teleportAudio.setVolume(volume);
      } catch (Exception e) {
    System.out.println("Invalid URL:  " + audioSource
        + ": " + e.getMessage());
      }
  }
       
        backgroundColor = state.getBackgroundColor();
        textColor = state.getTextColor();
        imageURL = state.getImageURL();
        message = state.getMessage();
       
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.modules.portal.common.PortalComponentClientState

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.