当前位置: 首页>>代码示例>>Java>>正文


Java Activity类代码示例

本文整理汇总了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;
}
 
开发者ID:kaaproject,项目名称:sandbox-frame,代码行数:21,代码来源:SandboxActivityMapper.java

示例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;
}
 
开发者ID:waynedyck,项目名称:mgwt-traffic-flow,代码行数:24,代码来源:AppMainActivityMapper.java

示例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;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:23,代码来源:EditorWorkFlow.java

示例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);
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:8,代码来源:PhoneActivityMapper.java

示例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;
}
 
开发者ID:JornC,项目名称:bitcoin-transaction-explorer,代码行数:27,代码来源:ApplicationActivityMapper.java

示例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;
}
 
开发者ID:thorntonv,项目名称:mechaverse,代码行数:18,代码来源:ManagerActivityMapper.java

示例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);
}
 
开发者ID:WSDOT,项目名称:Archetypes,代码行数:17,代码来源:PhoneActivityMapper.java

示例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;
}
 
开发者ID:realityforge,项目名称:gwt-presenter,代码行数:26,代码来源:AbstractActivityMapper.java

示例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;
}
 
开发者ID:Peergos,项目名称:Peergos,代码行数:26,代码来源:AppActivityMapper.java

示例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;
	
}
 
开发者ID:vsite-hr,项目名称:mentor,代码行数:16,代码来源:MentorActivityMapper.java

示例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;
}
 
开发者ID:kaaproject,项目名称:sandbox-frame,代码行数:10,代码来源:HeaderActivityMapper.java

示例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;
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:10,代码来源:AppActivityMapper.java

示例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;
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:9,代码来源:AddNoteActivityMapper.java

示例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;
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:8,代码来源:UserActivityMapper.java

示例15: getMenuActivity

import com.google.gwt.activity.shared.Activity; //导入依赖的package包/类
private Activity getMenuActivity() {
	if (menuActivity == null) {
		menuActivity = new MenuActivity(clientFactory);
	}
	
	return menuActivity;
}
 
开发者ID:waynedyck,项目名称:mgwt-traffic-flow,代码行数:8,代码来源:AppNavActivityMapper.java


注:本文中的com.google.gwt.activity.shared.Activity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。