API Reference 0.3.24dart_web_toolkit_activityAbstractActivity

AbstractActivity abstract class

Simple Activity implementation that is always willing to stop, and does nothing onStop and onCancel.

abstract class AbstractActivity implements Activity {

 String mayStop() {
   return null;
 }

 void onCancel() {
 }

 void onStop() {
 }
}

Implements

Activity

Methods

String mayStop() #

Called when the user is trying to navigate away from this activity.

@return A message to display to the user, e.g. to warn of unsaved work, or

    null to say nothing
docs inherited from Activity
String mayStop() {
 return null;
}

void onCancel() #

Called when {@link #start} has not yet replied to its callback, but the user has lost interest.

docs inherited from Activity
void onCancel() {
}

void onStop() #

Called when the Activity's widget has been removed from view. All event handlers it registered will have been removed before this method is called.

docs inherited from Activity
void onStop() {
}

abstract void start(AcceptsOneWidget panel, EventBus eventBus) #

inherited from Activity

Called when the Activity should ready its widget for the user. When the widget is ready (typically after an RPC response has been received), receiver should present it by calling {@link AcceptsOneWidget#setWidget} on the given panel. <p> Any handlers attached to the provided event bus will be de-registered when the activity is stopped, so activities will rarely need to hold on to the {@link com.google.gwt.event.shared.HandlerRegistration HandlerRegistration} instances returned by {@link EventBus#addHandler}.

@param panel the panel to display this activity's widget when it is ready @param eventBus the event bus