本文整理匯總了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);
}
}