Package net.cloudcodex.client.storyboard.player.presenter

Examples of net.cloudcodex.client.storyboard.player.presenter.PlayerBoardPresenter


public class PlayerBoardEventHandler extends BaseEventHandler<PlayerBoardEventBus> {
  private final Map<CharacterKeyCDO, PlayerBoardPresenter> cache = new HashMap<CharacterKeyCDO, PlayerBoardPresenter>();

  public void onNewPlayerBoard(long campaignId, long characterId, Container<PlayerBoardPresenter> container) {
    final CharacterKeyCDO characterKey = new CharacterKeyCDO(campaignId, characterId);
    PlayerBoardPresenter playerBoardPresenter = cache.get(characterKey);
    if (playerBoardPresenter == null) {
      playerBoardPresenter = eventBus.addHandler(PlayerBoardPresenter.class);
      cache.put(characterKey, playerBoardPresenter);
      playerBoardPresenter.initPlayerBoard(campaignId, characterId);
    }
    container.set(playerBoardPresenter);
  }
View Full Code Here

TOP

Related Classes of net.cloudcodex.client.storyboard.player.presenter.PlayerBoardPresenter

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.