Last active
August 29, 2015 14:21
-
-
Save Pacane/17fdf96f19512e852c17 to your computer and use it in GitHub Desktop.
HackerPresenter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HackerPresenter extends PresenterWidget<MyView> | |
implements HackerUiHandlers { | |
public interface MyView extends View, HasUiHandlers<HackerUiHandlers> { | |
} | |
private final String hackerName; | |
@Inject | |
HackerPresenter( | |
EventBus eventBus, | |
MyView view, | |
@Assisted String hackerName) { | |
super(eventBus, view); | |
this.hackerName = hackerName; | |
getView().setUiHandlers(this); | |
} | |
@Override | |
public void onInitiateHacking() { | |
ComputerHackedEvent.fire(hackerName, this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment