本文整理汇总了Java中com.google.gwt.activity.shared.Activity类的典型用法代码示例。如果您正苦于以下问题:Java Activity类的具体用法?Java Activity怎么用?Java Activity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Activity类属于com.google.gwt.activity.shared包,在下文中一共展示了Activity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place != null) {
Class<? extends Place> clazz = place.getClass();
if (clazz == MainPlace.class) {
return new MainActivity((MainPlace)place, clientFactory);
} else if (clazz == ProjectPlace.class) {
return new ProjectActivity((ProjectPlace)place, clientFactory);
} else if (clazz == BundlePlace.class) {
return new BundleActivity((BundlePlace)place, clientFactory);
} else if (clazz == ChangeKaaHostPlace.class) {
return new ChangeKaaHostActivity((ChangeKaaHostPlace)place, clientFactory);
}
}
return null;
}
示例2: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
private Activity getActivity(Place lastPlace, Place newPlace) {
if (newPlace instanceof SeattlePlace) {
return getHomeActivity();
}
if (newPlace instanceof TacomaPlace) {
return new TacomaActivity(clientFactory);
}
if (newPlace instanceof AboutPlace) {
return new AboutActivity(clientFactory);
}
if (newPlace instanceof SettingsPlace) {
return new SettingsActivity(clientFactory);
}
if (newPlace instanceof CameraPlace) {
return new CameraActivity(clientFactory);
}
return null;
}
示例3: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@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;
}
示例4: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place instanceof WindowPlace) {
return new WindowActivity(getClientFactory(), (WindowPlace)place);
}
return super.getActivity(place);
}
示例5: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@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;
}
示例6: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
clientFactory.getNotificationBar().hide();
clientFactory.getLayoutView().clearActionButtons();
clientFactory.getLayoutView().setNavWidget(new SimplePanel());
if (place instanceof ManagerDashboardPlace) {
return new ManagerDashboardPresenter(clientFactory);
} else if (place instanceof SimulationInfoPlace) {
return new SimulationInfoPresenter((SimulationInfoPlace) place, clientFactory);
} else if (place instanceof SimulationPlace) {
SimulationPlace simulationPlace = (SimulationPlace) place;
return new SimulationPresenter(simulationPlace.getSimulationId(),
simulationPlace.getInstanceId(), simulationPlace.getIteration(), clientFactory);
}
return null;
}
示例7: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place instanceof HomePlace) {
return new HomeActivity(clientFactory);
}
if (place instanceof AboutPlace) {
return new AboutActivity(clientFactory);
}
if (place instanceof SamplePlace) {
return new SampleActivity(clientFactory);
}
return new HomeActivity(clientFactory);
}
示例8: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity( final Place place )
{
if ( null != _currentActivity && _currentActivity instanceof PlaceAware )
{
if ( ( (PlaceAware) _currentActivity ).atPlace( place ) )
{
return _currentActivity;
}
_currentActivity = null;
}
final Provider<? extends Activity> provider = _providers.get( place.getClass() );
if ( null != provider )
{
final Activity activity = provider.get();
if ( activity instanceof PlaceAware )
{
final boolean changed = ( (PlaceAware) activity ).atPlace( place );
assert ( changed );
}
_currentActivity = activity;
return activity;
}
return null;
}
示例9: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
public Activity getActivity(final Place place) {
if (place instanceof TaskListPlace) {
// The list of tasks.
return new AbstractActivity() {
@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
TaskListPresenter presenter = new TaskListPresenter(clientFactory, (TaskListPlace) place);
presenter.start(eventBus);
panel.setWidget(presenter);
}
/*
* Note no call to presenter.stop(). The TaskListViews do that
* themselves as a side effect of setPresenter.
*/
};
}
if (place instanceof TaskPlace) {
// Editable view of a task.
return new TaskActivity(clientFactory, (TaskPlace) place);
}
return null;
}
示例10: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place instanceof ClassroomPlace)
return new ClassroomActivity((ClassroomPlace) place);
else if (place instanceof LecturersPlace)
return new LecturersActivity((LecturersPlace) place);
else if (place instanceof CoursePlace)
return new CourseActivity((CoursePlace) place);
else if (place instanceof LecturePlace)
return new LectureActivity((LecturePlace) place);
return null;
}
示例11: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (headerActivity == null) {
headerActivity = new HeaderActivity(place, clientFactory);
} else {
headerActivity.setPlace(place);
}
return headerActivity;
}
示例12: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place instanceof HomePlace) {
return new ManageNotesActivity((HomePlace) place);
} else if (place instanceof ProfilePlace) {
return new ProfileActivity((ProfilePlace) place);
}
return null;
}
示例13: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
//Hide AddNote if not at HomePlace
if (place instanceof HomePlace) {
return new AddNoteActivity((HomePlace) place);
}
return null;
}
示例14: getActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
@Override
public Activity getActivity(Place place) {
if (place instanceof HomePlace) {
return new UserActivity((HomePlace) place);
}
return null;
}
示例15: getMenuActivity
import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
private Activity getMenuActivity() {
if (menuActivity == null) {
menuActivity = new MenuActivity(clientFactory);
}
return menuActivity;
}