public void dispose() { if (fShell != null) { if (!fShell.isDisposed()) fShell.dispose(); fShell= null; fComposite= null; if (fHandCursor != null) fHandCursor.dispose(); fHandCursor= null; if (fHoverManager != null) fHoverManager.dispose(); fHoverManager= null; fSelection= null; } }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(getHandCursor(disp)); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(fHandCursor); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
public void selected() { Display disp= fShell.getDisplay(); canvas.setCursor(getHandCursor(disp)); // TODO: shade - for now: set grey background canvas.setBackground(getSelectionColor(disp)); // highlight the viewer background at its position oldStyles= setViewerBackground(fAnnotation); // set the selection fSelection= this; if (fHoverManager != null) fHoverManager.showInformation(); if (fInput.fAnnotationListener != null) { VerticalRulerEvent event= new VerticalRulerEvent(fAnnotation); fInput.fAnnotationListener.annotationSelected(event); } }
/** * */ public HoverManager() { super(new IInformationControlCreator() { @Override public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent); } }); setMargins(5, 10); setAnchor(ANCHOR_BOTTOM); setFallbackAnchors(new Anchor[] {ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT} ); }
@Override public void dispose() { if (fShell != null) { if (!fShell.isDisposed()) fShell.dispose(); fShell= null; fComposite= null; if (fHoverManager != null) fHoverManager.dispose(); fHoverManager= null; fSelection= null; } }
@Override public void dispose() { if (fShell != null) { if (!fShell.isDisposed()) fShell.dispose(); fShell= null; fComposite= null; if (fHoverManager != null) fHoverManager.dispose(); fHoverManager= null; fSelection= null; } }
@Override protected void computeInformation() { if (fSelection != null) { Rectangle subjectArea= fSelection.canvas.getBounds(); Annotation annotation= fSelection.fAnnotation; String msg; if (annotation != null) msg= annotation.getText(); else msg= null; setInformation(msg, subjectArea); } }
/** * */ public HoverManager() { super(new IInformationControlCreator() { public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent); } }); setMargins(5, 10); setAnchor(ANCHOR_BOTTOM); setFallbackAnchors(new Anchor[] {ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT} ); }
protected void computeInformation() { if (fSelection != null) { Rectangle subjectArea= fSelection.canvas.getBounds(); Annotation annotation= fSelection.fAnnotation; String msg; if (annotation != null) msg= annotation.getText(); else msg= null; setInformation(msg, subjectArea); } }
/** * */ public HoverManager() { super(new IInformationControlCreator() { @Override public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent); } }); setMargins(5, 10); setAnchor(ANCHOR_BOTTOM); setFallbackAnchors(new Anchor[] {ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT} ); }
public void mouseHover(MouseEvent e) { if (fHoverManager == null) { fHoverManager= new HoverManager(); fHoverManager.takesFocusWhenVisible(false); fHoverManager.install(fComposite); fHoverManager.showInformation(); } } }
@Override public void mouseHover(MouseEvent e) { if (fHoverManager == null) { fHoverManager= new HoverManager(); fHoverManager.takesFocusWhenVisible(false); fHoverManager.install(fComposite); fHoverManager.showInformation(); } } }
@Override public void mouseHover(MouseEvent e) { if (fHoverManager == null) { fHoverManager= new HoverManager(); fHoverManager.takesFocusWhenVisible(false); fHoverManager.install(fComposite); fHoverManager.showInformation(); } } }
@Override protected void computeInformation() { if (fSelection != null) { Rectangle subjectArea= fSelection.canvas.getBounds(); Annotation annotation= fSelection.fAnnotation; String msg; if (annotation != null) msg= annotation.getText(); else msg= null; setInformation(msg, subjectArea); } }