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


Java LocationRequest类代码示例

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


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

示例1: showTargetFeedback

import org.eclipse.gef.requests.LocationRequest; //导入依赖的package包/类
@Override
public void showTargetFeedback(Request request) {
	// Do not be fooled, the REQ_SELECTION is poorly named
	// nothing is actually getting selected here, maybe 
	// TimelineTool should change this to reflect something
	// more accurate (inspect?)
	if (request.getType() == REQ_SELECTION
		&& request instanceof LocationRequest
	) {
		LocationRequest loc = (LocationRequest) request;
		Point pt = loc.getLocation().getCopy();
		PlanTimelineDataRowEditPart rowData = getRowData();
		if (rowData != null) {
			pt = pt.translate(-rowData.getFigure().getBounds().x, 0);
			update(pt.x);
		}
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:19,代码来源:HighlightUpdateEditPolicy.java

示例2: eraseTargetFeedback

import org.eclipse.gef.requests.LocationRequest; //导入依赖的package包/类
@Override
public void eraseTargetFeedback(Request request) {
	super.eraseTargetFeedback(request);
	if (request instanceof LocationRequest 
			&& tooltipShell != null
			&& !tooltipShell.isDisposed()) {
		Timeline activeEditPart = TimelineUtils.getTimeline(this);
		if (activeEditPart != null) {
			EditDomain editDomain = activeEditPart.getEditDomain();
			Tool tool = editDomain.getActiveTool();
			if(tool instanceof TimelineTool) {
				TimelineTool timelineTool = (TimelineTool)tool;
				if(timelineTool != null
						&& timelineTool.getTargetUnderMouse() != null
						&& !timelineTool.getTargetUnderMouse().equals(this.getHost())) {
					tooltipShell.dispose();
					tooltipShell = null;
				}
			}
		}
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:23,代码来源:HeatMapDataEditPartHoverEditPolicy.java

示例3: showTargetFeedback

import org.eclipse.gef.requests.LocationRequest; //导入依赖的package包/类
/**
 * When asked to show target feedback, figure out where to display the tooltip.
 * Next, get the tooltip (maybe a new one will need to be created), and display
 * it at the calculated location.
 *
 * @param request the request
 */
@Override
public void showTargetFeedback(Request request) {
	if (understandsRequest(request)) {
		if (request instanceof LocationRequest) {
			LocationRequest locationRequest = (LocationRequest)request;
			Point location = locationRequest.getLocation();
			GraphicalEditPart host = (GraphicalEditPart)getHost();
			TOOLTIP_SHELL_MANAGER.display(host, location);
		}
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:19,代码来源:TemporalNodeHoverEditPolicy.java

示例4: createHoverRequest

import org.eclipse.gef.requests.LocationRequest; //导入依赖的package包/类
/**
 * Creates the hover request (a {@link LocationRequest}) and sets its type
 * to {@link RequestConstants#REQ_SELECTION_HOVER}.
 */
protected void createHoverRequest() {
	hoverRequest = new LocationRequest();
	hoverRequest.setType(RequestConstants.REQ_SELECTION_HOVER);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:9,代码来源:SelectionTool.java

示例5: updateHoverRequest

import org.eclipse.gef.requests.LocationRequest; //导入依赖的package包/类
/**
 * Updates the location of the hover request.
 */
protected void updateHoverRequest() {
	LocationRequest request = (LocationRequest) getTargetHoverRequest();
	request.setLocation(getLocation());
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:8,代码来源:SelectionTool.java


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