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


Java SwingTools.isMouseEventExitedToChildComponents方法代码示例

本文整理汇总了Java中com.rapidminer.gui.tools.SwingTools.isMouseEventExitedToChildComponents方法的典型用法代码示例。如果您正苦于以下问题:Java SwingTools.isMouseEventExitedToChildComponents方法的具体用法?Java SwingTools.isMouseEventExitedToChildComponents怎么用?Java SwingTools.isMouseEventExitedToChildComponents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rapidminer.gui.tools.SwingTools的用法示例。


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

示例1: mouseExited

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void mouseExited(final MouseEvent e) {
	if (!SwingTools.isMouseEventExitedToChildComponents(ProcessRendererView.this, e)) {
		model.setCurrentMousePosition(null);
	}

	// always reset status text
	interactionMouseHandler.mouseExited(e);

	// first come, first served, no limit to specific phases
	boolean wasConsumed = false;
	for (RenderPhase phase : RenderPhase.eventOrder()) {
		wasConsumed |= processPhaseListenerMouseEvent(MouseEventType.MOUSE_EXITED, e, phase);
		// abort if event was consumed
		if (wasConsumed) {
			return;
		}
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:20,代码来源:ProcessRendererView.java

示例2: processMouseEvent

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void processMouseEvent(final ExecutionUnit process, final MouseEventType type, final MouseEvent e) {
	if (!visualizer.isActive()) {
		return;
	}

	Point point = rendererModel.getMousePositionRelativeToProcess();
	if (point == null) {
		point = e.getPoint();
	}

	switch (type) {
		case MOUSE_CLICKED:
			if (!SwingUtilities.isLeftMouseButton(e)) {
				break;
			}
			if (process != null && e.getClickCount() >= 2) {
				if (!AnnotationDrawer.isProcessInteractionHappening(rendererModel)) {
					double x = Math.max(WorkflowAnnotation.MIN_X, point.getX());
					double y = Math.max(WorkflowAnnotation.MIN_Y, point.getY());
					ProcessAnnotation anno = new ProcessAnnotation(
							I18N.getGUILabel("workflow.annotation.default_text.label"), new AnnotationStyle(),
							process, false, false, new Rectangle2D.Double(x, y, ProcessAnnotation.DEFAULT_WIDTH,
									ProcessAnnotation.DEFAULT_HEIGHT));
					model.addProcessAnnotation(anno);
					decorator.editSelected();
					e.consume();
				}
			}
			break;
		case MOUSE_ENTERED:
		case MOUSE_MOVED:
			if (process != null) {
				WorkflowAnnotations annotations = rendererModel.getProcessAnnotations(process);
				if (updateHoveredStatus(point, process, annotations)) {
					e.consume();
				} else {
					model.setHovered(null, null);
				}
			}
			break;
		case MOUSE_EXITED:
			if (!SwingTools.isMouseEventExitedToChildComponents(view, e)) {
				model.setHovered(null, null);
			}
			break;
		case MOUSE_DRAGGED:
			model.setHovered(null, null);
			break;
		case MOUSE_PRESSED:
			if ((SwingTools.isControlOrMetaDown(e) || e.isShiftDown()) && e.getButton() == 1) {
				return;
			}
			if (SwingUtilities.isLeftMouseButton(e) || SwingUtilities.isRightMouseButton(e)) {
				if (model.getHovered() != null) {
					model.setSelected(model.getHovered());
					model.startDragOrResize(e, point, false);
					e.consume();

					// linux/mac only, otherwise the first click will only select
					if (e.isPopupTrigger()) {
						visualizer.showPopupMenu(e);
						return;
					}
				} else {
					if (model.getSelected() != null) {
						model.setSelected(null);
						// if context menu on process should open, don't prevent it
						if (!e.isPopupTrigger()) {
							e.consume();
						}
					}
				}
			}
			break;
		case MOUSE_RELEASED:
		default:
			break;
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:81,代码来源:AnnotationEventHook.java

示例3: mouseExited

import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void mouseExited(MouseEvent e) {
	if (!SwingTools.isMouseEventExitedToChildComponents(IOObjectCacheEntryPanel.this, e)) {
		highlight(false);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:7,代码来源:IOObjectCacheEntryPanel.java


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