本文整理汇总了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;
}
}
}
示例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;
}
}
示例3: mouseExited
import com.rapidminer.gui.tools.SwingTools; //导入方法依赖的package包/类
@Override
public void mouseExited(MouseEvent e) {
if (!SwingTools.isMouseEventExitedToChildComponents(IOObjectCacheEntryPanel.this, e)) {
highlight(false);
}
}