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


Java Place类代码示例

本文整理汇总了Java中com.google.gwt.place.shared.Place的典型用法代码示例。如果您正苦于以下问题:Java Place类的具体用法?Java Place怎么用?Java Place使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Place类属于com.google.gwt.place.shared包,在下文中一共展示了Place类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getActivity

import com.google.gwt.place.shared.Place; //导入依赖的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.place.shared.Place; //导入依赖的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: start

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
@Override
public void start(AcceptsOneWidget panel, final EventBus eventBus) {
	view = clientFactory.getCameraView();
	this.eventBus = eventBus;
	analytics = clientFactory.getAnalytics();
	view.setPresenter(this);

	Place place = clientFactory.getPlaceController().getWhere();
	
	if (place instanceof CameraPlace) {
		CameraPlace cameraPlace = (CameraPlace) place;
		cameraId = cameraPlace.getId();
		cameraItem = cameraPlace.getCameraItem();
		
		view.showProgressIndicator();
		view.renderCameraImage(cameraItem.getUrl());
	}

       if (Consts.ANALYTICS_ENABLED) {
           analytics.trackView("/Camera/" + cameraId);
       }

	panel.setWidget(view);

}
 
开发者ID:waynedyck,项目名称:mgwt-traffic-flow,代码行数:26,代码来源:CameraActivity.java

示例4: createTreeNode

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
private TreeNode createTreeNode(String name, String displayName, Place place, TreeNode... children) {
    if (name == null) {
        throw new NullPointerException("name");
    }
    TreeNode treeNode = new TreeNode(name);
    if (displayName != null) {
        treeNode.setTitle(displayName);
    }
    if (children != null && children.length > 0) {
        treeNode.setChildren(children);
    }
    if (place != null) {
        treeNode.setAttribute(PLACE_ATTRIBUTE, place);
    }
    return treeNode;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:17,代码来源:Editor.java

示例5: loadItemInChildEditor

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
/**
 * Handles a new children selection.
 */
private void loadItemInChildEditor(Record[] records) {
    actionSource.fireEvent();
    if (records == null || records.length == 0 || reorderTask.isReordered()) {
        childPlaces.goTo(Place.NOWHERE);
    } else {
        Place lastPlace = childPlaces.getWhere();
        DatastreamEditorType lastEditorType = null;
        if (lastPlace instanceof DigitalObjectEditorPlace) {
            DigitalObjectEditorPlace lastDOEPlace = (DigitalObjectEditorPlace) lastPlace;
            lastEditorType = lastDOEPlace.getEditorId();
        }
        lastEditorType = lastEditorType != null
                ? lastEditorType
                : DatastreamEditorType.MODS;
        childPlaces.goTo(new DigitalObjectEditorPlace(lastEditorType, records));
    }
}
 
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:ImportBatchItemEditor.java

示例6: EditorWorkFlow

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
public EditorWorkFlow(EventBus ebus, PlaceController placeController,
        ActivityManager activityManager, Layout delegate,
        PresenterFactory presenterFactory, ClientMessages i18n) {

    this.presenterFactory = presenterFactory;
    this.i18n = i18n;
    this.ebus = (ebus != null) ? ebus : new SimpleEventBus();
    // PlaceController uses delegate to ask user with blocking Window.confirm
    // whether to leave the current place.
    // In order to use non blocking SmartGWT dialog
    // it will be necessary to override PlaceController.goto method.
    this.placeController = (placeController != null) ? placeController
            : new PlaceController(this.ebus);
    this.activityManager = (activityManager != null) ? activityManager
            : new ActivityManager(new EditorActivityMapper(), this.ebus);
    this.activityManager.setDisplay(new EditorDisplay(delegate));
    EditorPlaceHistoryMapper historyMapper = GWT.create(EditorPlaceHistoryMapper.class);
    placeHistoryHandler = new PlaceHistoryHandler(historyMapper);
    placeHistoryHandler.register(this.placeController, this.ebus, Place.NOWHERE);
}
 
开发者ID:proarc,项目名称:proarc,代码行数:21,代码来源:EditorWorkFlow.java

示例7: getActivity

import com.google.gwt.place.shared.Place; //导入依赖的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

示例8: getActivity

import com.google.gwt.place.shared.Place; //导入依赖的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

示例9: getActivity

import com.google.gwt.place.shared.Place; //导入依赖的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

示例10: getAnimation

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
@Override
public Animation getAnimation(Place oldPlace, Place newPlace) {
  if (oldPlace == null) {
    return Animations.FADE;
  }
  
  if (oldPlace instanceof SamplePlace && newPlace instanceof HomePlace) {
      return Animations.FADE_REVERSE;
  }
  
  if (oldPlace instanceof AboutPlace && newPlace instanceof HomePlace) {
      return Animations.FADE_REVERSE;
  }
  
  return Animations.FADE;

}
 
开发者ID:WSDOT,项目名称:Archetypes,代码行数:18,代码来源:AppMainAnimationMapper.java

示例11: configure

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
@Override
protected void configure() {
  // Binding application critical architecture
  bind(ActivityMapper.class).to(ApplicationActivityMapper.class).in(Singleton.class);;
  bind(Place.class).annotatedWith(DefaultPlace.class).to(StartupPlace.class).in(Singleton.class);
  bind(PlaceController.class).to(ApplicationPlaceController.class).in(Singleton.class);
  bind(BitcoinPlaceRouter.class).to(ApplicationPlaceController.class).in(Singleton.class);
  bind(PlaceHistoryMapper.class).to(ApplicationPlaceHistoryMapper.class).in(Singleton.class);
  bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
  bind(ColorPicker.class).to(SimpleColorPicker.class).in(Singleton.class);

  // Binding views
  bind(StartupView.class).to(StartupViewImpl.class).in(Singleton.class);
  bind(TransactionView.class).to(TransactionViewImpl.class);
  bind(BlockView.class).to(BlockViewImpl.class);
  bind(MineView.class).to(MineViewImpl.class);
  bind(ScriptView.class).to(ScriptViewImpl.class);
  bind(ConfigView.class).to(ConfigViewImpl.class);
  bind(ContributeView.class).to(ContributeViewImpl.class);
  bind(RPCResponseView.class).to(RPCResponseViewImpl.class);
  bind(AddressView.class).to(AddressViewImpl.class);

  install(new GinFactoryModuleBuilder().build(ActivityFactory.class));
}
 
开发者ID:JornC,项目名称:bitcoin-transaction-explorer,代码行数:25,代码来源:ApplicationClientModule.java

示例12: goTo

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
@Override
public void goTo(final Place newPlace) {

	if (this.getWhere().equals(newPlace)) {
		return;
	}

	PlaceChangeRequestEvent willChange = new PlaceChangeRequestEvent(newPlace);
	EventBus.get().fireEvent(willChange);
	String warning = willChange.getWarning();
	if (warning == null || Window.confirm(warning)) {
		this.doGo(newPlace);
	} else {
		this.goTo(this.getWhere());
	}
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:17,代码来源:MvpController.java

示例13: getActivity

import com.google.gwt.place.shared.Place; //导入依赖的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

示例14: isAncestor

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
public static boolean isAncestor(Place parent, Place place) {
	Place cursor = place;
	while (cursor != null) {
		if (cursor instanceof ViewPlace) {
			ViewPlace viewPlace = (ViewPlace) cursor;
			if (cursor.equals(parent)) {
				return true;
			}
			if (viewPlace.getParent() == null) {
				return false;
			}
			if (viewPlace.getParent().equals(parent)) {
				return true;
			}
			cursor = viewPlace.getParent();
		} else {
			cursor = null;
		}
	}
	return false;
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:22,代码来源:MvpUtils.java

示例15: initComposer

import com.google.gwt.place.shared.Place; //导入依赖的package包/类
@Override
public void initComposer(ClassSourceFileComposerFactory composerFactory) {
	composerFactory.addImport(Place.class.getName());
	composerFactory.addImport(Presenter.class.getName());
	for (JMethod presenterMethod : this.presenterMethods) {
		if (presenterMethod.getParameters().length > 0) {
			JType placeType = presenterMethod.getParameters()[0].getType();
			composerFactory.addImport(placeType.getQualifiedSourceName());
			if (placeType instanceof JParameterizedType) {
				JParameterizedType parameterizedType = (JParameterizedType) placeType;
				for (JType paramType : parameterizedType.getTypeArgs()) {
					composerFactory.addImport(paramType.getQualifiedSourceName());
				}
			}
		}
	}

	composerFactory.addImplementedInterface(Presenter.class.getSimpleName());
	composerFactory.addImport(AcceptsOneWidget.class.getName());
}
 
开发者ID:Putnami,项目名称:putnami-web-toolkit,代码行数:21,代码来源:InjectPresenterCreator.java


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