void (final MouseEvent e) { if(myCurrentProcessor != null){ if (myCurrentProcessor.needMousePressed()) { myCurrentProcessor.processMouseEvent(e); return; } // Sun sometimes skips mouse released events... myCurrentProcessor.cancelOperation(); myCurrentProcessor = null; } RadComponent component = null; final RadComponent draggerHost = FormEditingUtil.getDraggerHost(myEditor); // Try to understand whether we pressed inside dragger area if(draggerHost != null){ final JComponent delegee = draggerHost.getDelegee(); final Point p = SwingUtilities.convertPoint(delegee, 0, 0, e.getComponent()); if( p.x - MainProcessor.DRAGGER_SIZE <= e.getX() && e.getX() <= p.x && p.y - MainProcessor.DRAGGER_SIZE <= e.getY() && e.getY() <= p.y ){ component = draggerHost; } } // If user clicked not inside dragger then we have find RadComponent at the click point if(component == null){ component = FormEditingUtil.getRadComponentAt(myEditor.getRootContainer(), e.getX(), e.getY()); } if (component == null) { return; } final ComponentItem selectedItem = PaletteToolWindowManager.getInstance(myEditor).getActiveItem(ComponentItem.class); if (selectedItem != null) { myInsertComponentProcessor.setSticky(UIUtil.isControlKeyDown(e)); myCurrentProcessor = myInsertComponentProcessor; return; } if (!UIUtil.isControlKeyDown(e) && !e.isShiftDown()) { if (!component.isSelected() || FormEditingUtil.getSelectedComponents(myEditor).size() != 1) { FormEditingUtil.selectSingleComponent(myEditor, component); } } final Point point = SwingUtilities.convertPoint(e.getComponent(), e.getPoint(), component.getDelegee()); final int resizeMask = Painter.getResizeMask(component, point.x, point.y); LOG.debug("MainProcessor.processMousePressed: resizeMask at (" + point.x + "," + point.y + ") is " + resizeMask); if (resizeMask != 0) { if (component.getParent() != null) { component = component.getParent().getActionTargetComponent(component); } myCurrentProcessor = new ResizeProcessor(myEditor, component, resizeMask); } else if (component instanceof RadRootContainer || e.isShiftDown()) { myCurrentProcessor = new GroupSelectionProcessor(myEditor, component); } else if (!e.isShiftDown()) { myCurrentProcessor = new DragSelectionProcessor(myEditor); } updateDragger(e); }