|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.customware.gwt.presenter.client.BasicPresenter<D>
public abstract class BasicPresenter<D extends Display>
| Field Summary | |
|---|---|
protected D |
display
The display for the presenter. |
protected EventBus |
eventBus
The EventBus for the application. |
| Constructor Summary | |
|---|---|
BasicPresenter(D display,
EventBus eventBus)
|
|
| Method Summary | |
|---|---|
void |
bind()
Called when the presenter is initialised. |
protected void |
firePresenterChangedEvent()
Fires a PresenterChangedEvent to the EventBus. |
protected void |
firePresenterRevealedEvent(boolean originator)
Fires a PresenterRevealedEvent to the EventBus. |
D |
getDisplay()
Returns the display for the presenter. |
boolean |
isBound()
Checks if the presenter has been bound. |
protected abstract void |
onBind()
This method is called when binding the presenter. |
protected abstract void |
onRevealDisplay()
Called before firing a PresenterRevealedEvent. |
protected abstract void |
onUnbind()
This method is called when unbinding the presenter. |
protected void |
registerHandler(com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
Any HandlerRegistrations added will be removed when
unbind() is called. |
void |
revealDisplay()
Triggers a PresenterRevealedEvent. |
void |
unbind()
Called after the presenter and display have been finished with for the moment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final D extends Display display
protected final EventBus eventBus
EventBus for the application.
| Constructor Detail |
|---|
public BasicPresenter(D display,
EventBus eventBus)
| Method Detail |
|---|
public void bind()
Presenter
bind in interface Presenterprotected void registerHandler(com.google.gwt.event.shared.HandlerRegistration handlerRegistration)
HandlerRegistrations added will be removed when
unbind() is called. This provides a handy way to track event
handler registrations when binding and unbinding.
handlerRegistration - The registration.public void unbind()
Presenter
unbind in interface Presenterprotected abstract void onBind()
protected abstract void onUnbind()
registerHandler(HandlerRegistration)
will have already been removed at this point.
public boolean isBound()
unbind().
isBound in interface Presenterpublic D getDisplay()
getDisplay in interface Presenterprotected void firePresenterChangedEvent()
PresenterChangedEvent to the EventBus.
Call this method any time the presenter's state has been modified.
protected void firePresenterRevealedEvent(boolean originator)
PresenterRevealedEvent to the EventBus.
Implementations should call this when the presenter has been
revealed onscreen.
originator - If set to true, this specifies that this presenter
was the originator of the 'revelation' request.public void revealDisplay()
PresenterRevealedEvent. Subclasses should override
this method and call super.revealDisplay() if they need to
perform extra operations when being revealed.
revealDisplay in interface Presenterprotected abstract void onRevealDisplay()
PresenterRevealedEvent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||