@Override public IInformationControl createInformationControl(Shell parent) { return new AnnotationExpansionControl(parent, SWT.NONE, fAnnotationAccess); }
@Override public void viewportChanged(int verticalOffset) { dispose(); }
@Override public void setInput(Object input) { if (fInput != null && fInput.fViewer != null) fInput.fViewer.removeViewportListener(fViewportListener); if (input instanceof AnnotationHoverInput) fInput= (AnnotationHoverInput) input; else fInput= null; inputChanged(fInput, null); }
private void setInfoSystemColor() { Display display= fShell.getDisplay(); setForegroundColor(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND)); setBackgroundColor(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); }
dispose(); fComposite.setCursor(fHandCursor); setInfoSystemColor();
Cursor handCursor= getHandCursor(display); fShell.setCursor(handCursor); fComposite.setCursor(handCursor); setInfoSystemColor();
/** * Internal hook method called when the input is * initially set or subsequently changed. * * @param newInput the new input * @param newSelection the new selection */ protected void inputChanged(Object newInput, Object newSelection) { refresh(); }
@Override public void setInformation(String information) { setInput(null); }
protected void refresh() { adjustItemNumber(); if (fInput == null) return; if (fInput.fAnnotations == null) return; if (fInput.fViewer != null) fInput.fViewer.addViewportListener(fViewportListener); fShell.setRegion(fLayouter.getShellRegion(fInput.fAnnotations.length)); Layout layout= fLayouter.getLayout(fInput.fAnnotations.length); fComposite.setLayout(layout); Control[] children= fComposite.getChildren(); for (int i= 0; i < fInput.fAnnotations.length; i++) { Canvas canvas= (Canvas) children[i]; Item item= new Item(); item.canvas= canvas; item.fAnnotation= fInput.fAnnotations[i]; canvas.setData(item); canvas.redraw(); } }
StyleRange range= (StyleRange) ((StyleRange) it.next()).clone(); shadedRanges.add(range); range.background= getHighlightColor(disp);
private void setInfoSystemColor() { Display display= fShell.getDisplay(); setForegroundColor(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND)); setBackgroundColor(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); }
Cursor handCursor= getHandCursor(display); fShell.setCursor(handCursor); fComposite.setCursor(handCursor); setInfoSystemColor();
/** * Internal hook method called when the input is * initially set or subsequently changed. * * @param newInput the new input * @param newSelection the new selection */ protected void inputChanged(Object newInput, Object newSelection) { refresh(); }
@Override public void setInformation(String information) { setInput(null); }
protected void refresh() { adjustItemNumber(); if (fInput == null) return; if (fInput.fAnnotations == null) return; if (fInput.fViewer != null) fInput.fViewer.addViewportListener(fViewportListener); fShell.setRegion(fLayouter.getShellRegion(fInput.fAnnotations.length)); Layout layout= fLayouter.getLayout(fInput.fAnnotations.length); fComposite.setLayout(layout); Control[] children= fComposite.getChildren(); for (int i= 0; i < fInput.fAnnotations.length; i++) { Canvas canvas= (Canvas) children[i]; Item item= new Item(); item.canvas= canvas; item.fAnnotation= fInput.fAnnotations[i]; canvas.setData(item); canvas.redraw(); } }
StyleRange range= (StyleRange) it.next().clone(); shadedRanges.add(range); range.background= getHighlightColor(disp);
@Override public void menuHidden(MenuEvent e) { dispose(); }
private void setInfoSystemColor() { Display display= fShell.getDisplay(); setForegroundColor(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND)); setBackgroundColor(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); }
protected void inputChanged(Object newInput, Object newSelection) { refresh(); }
public void setInput(Object input) { if (fInput != null && fInput.fViewer != null) fInput.fViewer.removeViewportListener(fViewportListener); if (input instanceof AnnotationHoverInput) fInput= (AnnotationHoverInput) input; else fInput= null; inputChanged(fInput, null); }