當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。