com.google.gwt.activity.shared.Activity Java Examples

The following examples show how to use com.google.gwt.activity.shared.Activity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditorWorkFlow.java    From proarc with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Activity getActivity(Place place) {
    Activity a = null;
    if (place instanceof DigitalObjectEditorPlace) {
        a = new DigitalObjectEditing((DigitalObjectEditorPlace) place,
                presenterFactory.getDigitalObjectEditor());
    } else if (place instanceof DigitalObjectCreatorPlace) {
        a = new DigitalObjectCreating((DigitalObjectCreatorPlace) place,
                presenterFactory);
    } else if (place instanceof ImportPlace) {
        a = new Importing((ImportPlace) place, presenterFactory);
    } else if (place instanceof UsersPlace) {
        a = new UserManaging((UsersPlace) place, presenterFactory);
    } else if (place instanceof DigitalObjectManagerPlace) {
        a = new DigitalObjectManaging((DigitalObjectManagerPlace) place, presenterFactory);
    } else if (place instanceof DeviceManagerPlace) {
        a = new DeviceManaging((DeviceManagerPlace) place, presenterFactory);
    } else if (place instanceof WorkflowPlace) {
        a = new WorkflowManaging((WorkflowPlace) place, presenterFactory);
    }
    return a;
}
 
Example #2
Source File: ApplicationActivityMapper.java    From bitcoin-transaction-explorer with MIT License 6 votes vote down vote up
@Override
public Activity getActivity(final Place place) {
  Activity presenter = null;

  if (place instanceof StartupPlace) {
    presenter = factory.createStartupPresenter((StartupPlace) place);
  } else if (place instanceof TransactionPlace) {
    presenter = factory.createTransactionPresenter((TransactionPlace) place);
  } else if (place instanceof BlockPlace) {
    presenter = factory.createBlockPresenter((BlockPlace) place);
  } else if (place instanceof MinePlace) {
    presenter = factory.createMinePresenter((MinePlace) place);
  } else if (place instanceof ScriptPlace) {
    presenter = factory.createScriptPresenter((ScriptPlace) place);
  } else if (place instanceof ConfigPlace) {
    presenter = factory.createConfigPresenter((ConfigPlace) place);
  } else if (place instanceof ContributePlace) {
    presenter = factory.createContributePresenter((ContributePlace) place);
  } else if (place instanceof RPCResponsePlace) {
    presenter = factory.createRPCReponsePresenter((RPCResponsePlace) place);
  } else if (place instanceof AddressPlace) {
    presenter = factory.createAddressPresenter((AddressPlace) place);
  }

  return presenter;
}
 
Example #3
Source File: StopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
private StopActivityEvent(Activity activity, Place place, IsWidget view, boolean cancelActivity) {
	super();
	this.activity = activity;
	this.place = place;
	this.view = view;
	this.cancelActivity = cancelActivity;
	this.setSource(place);
}
 
Example #4
Source File: ProxyViewCreator.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
private SourceWriter getSourceWriter(PrintWriter printWriter, GeneratorContext ctx) {
	ClassSourceFileComposerFactory composerFactory =
		new ClassSourceFileComposerFactory(this.packageName, this.viewProxySimpleName);

	composerFactory.setSuperclass(this.placeType.getSimpleSourceName());

	composerFactory.addImport(GWT.class.getName());
	composerFactory.addImport(RunAsyncCallback.class.getName());
	composerFactory.addImport(ViewProxy.class.getName());
	composerFactory.addImport(Place.class.getName());
	composerFactory.addImport(ViewPlace.class.getName());
	composerFactory.addImport(Activity.class.getName());
	composerFactory.addImport(ViewActivity.class.getName());
	composerFactory.addImport(ApplicationUnreachableException.class.getName());
	composerFactory.addImport(this.placeType.getQualifiedSourceName());
	composerFactory.addImport(this.activityDescrition.view().getCanonicalName());
	if (this.placeTokenizerClass != null) {
		composerFactory.addImport(this.placeTokenizerClass.getCanonicalName());
	}
	if (this.viewDecoratorClass != null) {
		composerFactory.addImport(this.viewDecoratorClass.getCanonicalName());
	}

	composerFactory.addImplementedInterface(
		ViewProxy.class.getSimpleName() + "<" + this.placeType.getSimpleSourceName() + ">");

	return composerFactory.createSourceWriter(ctx, printWriter);
}
 
Example #5
Source File: StartActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
private StartActivityEvent(Activity activity, Place place, AcceptsOneWidget container, IsWidget view) {
	this.setSource(place);
	this.activity = activity;
	this.place = place;
	this.container = container;
	this.view = view;
}
 
Example #6
Source File: MayStopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
private MayStopActivityEvent(Activity activity, Place place, IsWidget view) {
	super();
	this.activity = activity;
	this.place = place;
	this.view = view;
	this.setSource(place);
}
 
Example #7
Source File: MvpController.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public Activity getActivity(Place place) {
	String key = MvpUtils.getPlacePrefix(place);
	ActivityFactory activityFactory = this.activityFactories.get(key);
	if (activityFactory != null) {
		return activityFactory.createActivity(place);
	}
	return null;
}
 
Example #8
Source File: DigitalObjectChildrenEditor.java    From proarc with GNU General Public License v3.0 5 votes vote down vote up
@Override
public Activity getActivity(Place place) {
    if (place instanceof DigitalObjectEditorPlace) {
        DigitalObjectEditorPlace editorPlace = (DigitalObjectEditorPlace) place;
        return new DigitalObjectEditing(editorPlace, childEditor);
    }
    return null;
}
 
Example #9
Source File: InterceptorsPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new InterceptorsActivity(getSection(), Showcase.CLIENT_FACTORY.getInterceptors(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #10
Source File: BinaryDataPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new BinaryDataActivity(getSection(), Showcase.CLIENT_FACTORY.getBinaryData(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #11
Source File: HomePlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new HomeActivity(Showcase.CLIENT_FACTORY.getHome());
}
 
Example #12
Source File: GettingStartedPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new GettingStartedActivity(getSection(), Showcase.CLIENT_FACTORY.getGettingStarted());
}
 
Example #13
Source File: AuthPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new AuthActivity(getSection(), Showcase.CLIENT_FACTORY.getAuth(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #14
Source File: RequestingPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new RequestingActivity(getSection(), Showcase.CLIENT_FACTORY.getRequesting(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #15
Source File: FormPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new FormActivity(getSection(), Showcase.CLIENT_FACTORY.getForm(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #16
Source File: SerializationPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new SerializationActivity(getSection(), Showcase.CLIENT_FACTORY.getSerialization(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #17
Source File: SendingRequestsPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new SendingRequestsActivity(getSection(), Showcase.CLIENT_FACTORY.getSendingRequests(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #18
Source File: FiltersPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new FiltersActivity(getSection(), Showcase.CLIENT_FACTORY.getFilters(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #19
Source File: BuildingRequestsPlace.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity() {
    return new BuildingRequestsActivity(getSection(), Showcase.CLIENT_FACTORY.getBuildingRequests(),
            Showcase.CLIENT_FACTORY.getRequestor());
}
 
Example #20
Source File: ShowcaseActivityMapper.java    From requestor with Apache License 2.0 4 votes vote down vote up
@Override
public Activity getActivity(Place place) {
    return ((HasActivity) place).getActivity();
}
 
Example #21
Source File: StartActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static StartActivityEvent fire(Activity activity, Place place, AcceptsOneWidget container, IsWidget view) {
	StartActivityEvent event = new StartActivityEvent(activity, place, container, view);
	EventBus.get().fireEventFromSource(event, place);
	return event;
}
 
Example #22
Source File: StartActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public Activity getActivity() {
	return this.activity;
}
 
Example #23
Source File: StopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static StopActivityEvent fire(Activity activity, Place place, IsWidget view, boolean cancelActivity) {
	StopActivityEvent event = new StopActivityEvent(activity, place, view, cancelActivity);
	EventBus.get().fireEventFromSource(event, place);
	return event;
}
 
Example #24
Source File: StopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public Activity getActivity() {
	return this.activity;
}
 
Example #25
Source File: MayStopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static MayStopActivityEvent fire(Activity activity, Place place, IsWidget view) {
	MayStopActivityEvent event = new MayStopActivityEvent(activity, place, view);
	EventBus.get().fireEventFromSource(event, place);
	return event;
}
 
Example #26
Source File: MayStopActivityEvent.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
public Activity getActivity() {
	return this.activity;
}
 
Example #27
Source File: ActionPlace.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public Activity createActivity(Place place) {
	return this;
}
 
Example #28
Source File: HasActivity.java    From requestor with Apache License 2.0 votes vote down vote up
Activity getActivity(); 
Example #29
Source File: ActivityFactory.java    From putnami-web-toolkit with GNU Lesser General Public License v3.0 votes vote down vote up
Activity createActivity(Place place);