Last active
August 29, 2015 14:21
-
-
Save Pacane/e63706b45d5f9001334c to your computer and use it in GitHub Desktop.
RootView
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 RootView extends ViewImpl | |
implements RootPresenter.MyView { | |
interface Binder extends UiBinder<Widget, RootView> { | |
} | |
@UiField | |
HTMLPanel computers; | |
@UiField | |
HTMLPanel hackers; | |
@Inject | |
RootView(Binder uiBinder) { | |
initWidget(uiBinder.createAndBindUi(this)); | |
} | |
@Override | |
public void addToSlot(Object slot, IsWidget content) { | |
super.addToSlot(slot, content); | |
if (slot == RootPresenter.SLOT_COMPUTERS) { | |
computers.add(content); | |
} else if (slot == RootPresenter.SLOT_HACKERS) { | |
hackers.add(content); | |
} | |
} | |
@Override | |
public void removeFromSlot(Object slot, IsWidget content) { | |
super.removeFromSlot(slot, content); | |
if (slot == RootPresenter.SLOT_COMPUTERS) { | |
computers.remove(content); | |
} else if (slot == RootPresenter.SLOT_HACKERS) { | |
hackers.remove(content); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment