Skip to content

Instantly share code, notes, and snippets.

@Pacane
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pacane/17fdf96f19512e852c17 to your computer and use it in GitHub Desktop.
Save Pacane/17fdf96f19512e852c17 to your computer and use it in GitHub Desktop.
HackerPresenter
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