Package net.cloudcodex.client.storyboard.command.view.CommandView

Examples of net.cloudcodex.client.storyboard.command.view.CommandView.CommandTab


  @Override
  public void bind() {
    super.bind();

    final CommandTab actionTab = this.view.getActionTab();
    actionTab.getButton().addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        service.playerPostAction(campaignId, characterId, sceneId, sceneTimestamp, view.getMessageActionType(),
            actionTab.getMessage(), new SuccessCallback<Result<Boolean>>() {
              @Override
              public void onSuccess(Result<Boolean> result) {
                actionTab.emptyMessage();
                eventBus.checkScene(campaignId, characterId);
                GWT.log("result:" + result.getData());
              }
            });
        eventBus.checkScene(campaignId, characterId);
      }
    });
    final CommandTab offTab = this.view.getOffTab();
    offTab.getButton().addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        service.playerPostOFF(campaignId, characterId, sceneId, sceneTimestamp, offTab.getMessage(), new SuccessCallback<Result<Boolean>>() {
          @Override
          public void onSuccess(Result<Boolean> result) {
            offTab.emptyMessage();
            eventBus.checkScene(campaignId, characterId);
            GWT.log("result:" + result.getData());
          }
        });
        eventBus.checkScene(campaignId, characterId);
      }
    });
    final CommandTab diceTab = this.view.getDiceTab();
    diceTab.getButton().addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        final Map<Integer, Integer> dices = view.getDices();
        service.playerRollDices(campaignId, characterId, sceneId, sceneTimestamp, dices,
            diceTab.getMessage(), new SuccessCallback<Result<Boolean>>() {
              @Override
              public void onSuccess(Result<Boolean> result) {
                diceTab.emptyMessage();
                view.emptyDice();
                eventBus.checkScene(campaignId, characterId);
                GWT.log("result:" + result.getData());
              }
            });
View Full Code Here

TOP

Related Classes of net.cloudcodex.client.storyboard.command.view.CommandView.CommandTab

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.