@Override public void viewportChanged(int verticalOffset) { dispose(); }
@Override public void menuHidden(MenuEvent e) { dispose(); }
@Override public void viewportChanged(int verticalOffset) { dispose(); }
@Override public void menuHidden(MenuEvent e) { dispose(); }
public void defaultSelected() { if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }
public void defaultSelected(MouseEvent e) { if (fInput.fAnnotationListener != null) { Event swtEvent= new Event(); swtEvent.type= SWT.MouseDown; swtEvent.display= e.display; swtEvent.widget= e.widget; swtEvent.time= e.time; swtEvent.data= e.data; swtEvent.x= e.x; swtEvent.y= e.y; swtEvent.button= e.button; swtEvent.stateMask= e.stateMask; swtEvent.count= e.count; VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation, swtEvent); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }
public void defaultSelected(MouseEvent e) { if (fInput.fAnnotationListener != null) { Event swtEvent= new Event(); swtEvent.type= SWT.MouseDown; swtEvent.display= e.display; swtEvent.widget= e.widget; swtEvent.time= e.time; swtEvent.data= e.data; swtEvent.x= e.x; swtEvent.y= e.y; swtEvent.button= e.button; swtEvent.stateMask= e.stateMask; swtEvent.count= e.count; VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation, swtEvent); fInput.fAnnotationListener.annotationDefaultSelected(event); } dispose(); }
@Override public void mouseExit(MouseEvent e) { if (fComposite == null) return; Control[] children= fComposite.getChildren(); Rectangle bounds= null; for (int i= 0; i < children.length; i++) { if (bounds == null) bounds= children[i].getBounds(); else bounds.add(children[i].getBounds()); if (bounds.contains(e.x, e.y)) return; } // if none of the children contains the event, we leave the popup dispose(); }
@Override public void mouseExit(MouseEvent e) { if (fComposite == null) return; Control[] children= fComposite.getChildren(); Rectangle bounds= null; for (int i= 0; i < children.length; i++) { if (bounds == null) bounds= children[i].getBounds(); else bounds.add(children[i].getBounds()); if (bounds.contains(e.x, e.y)) return; } // if none of the children contains the event, we leave the popup dispose(); }
public void mouseExit(MouseEvent e) { Item item= (Item) ((Widget) e.getSource()).getData(); if (item != null) item.deselect(); // if the event lies outside the entire popup, dispose org.eclipse.swt.graphics.Region region= fShell.getRegion(); Canvas can= (Canvas) e.getSource(); Point p= can.toDisplay(e.x, e.y); if (region == null) { Rectangle bounds= fShell.getBounds(); // p= fShell.toControl(p); if (!bounds.contains(p)) dispose(); } else { p= fShell.toControl(p); if (!region.contains(p)) dispose(); } }
@Override public void mouseExit(MouseEvent e) { Item item= (Item) ((Widget) e.getSource()).getData(); if (item != null) item.deselect(); // if the event lies outside the entire popup, dispose org.eclipse.swt.graphics.Region region= fShell.getRegion(); Canvas can= (Canvas) e.getSource(); Point p= can.toDisplay(e.x, e.y); if (region == null) { Rectangle bounds= fShell.getBounds(); // p= fShell.toControl(p); if (!bounds.contains(p)) dispose(); } else { p= fShell.toControl(p); if (!region.contains(p)) dispose(); } }
@Override public void mouseExit(MouseEvent e) { Item item= (Item) ((Widget) e.getSource()).getData(); if (item != null) item.deselect(); // if the event lies outside the entire popup, dispose org.eclipse.swt.graphics.Region region= fShell.getRegion(); Canvas can= (Canvas) e.getSource(); Point p= can.toDisplay(e.x, e.y); if (region == null) { Rectangle bounds= fShell.getBounds(); // p= fShell.toControl(p); if (!bounds.contains(p)) dispose(); } else { p= fShell.toControl(p); if (!region.contains(p)) dispose(); } }