Mercurial > projects > dwt-addons
comparison dwtx/jface/text/AbstractHoverInformationControlManager.d @ 138:b6bad70d540a
Regex instanceof changes
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:26:23 +0200 |
parents | 25170b5a8951 |
children | 26688fec6d23 |
comparison
equal
deleted
inserted
replaced
137:25170b5a8951 | 138:b6bad70d540a |
---|---|
266 if (fSubjectControl !is null && !fSubjectControl.isDisposed()) { | 266 if (fSubjectControl !is null && !fSubjectControl.isDisposed()) { |
267 fSubjectControl.addMouseListener(this); | 267 fSubjectControl.addMouseListener(this); |
268 fSubjectControl.addMouseMoveListener(this); | 268 fSubjectControl.addMouseMoveListener(this); |
269 fSubjectControl.addControlListener(this); | 269 fSubjectControl.addControlListener(this); |
270 fSubjectControl.addKeyListener(this); | 270 fSubjectControl.addKeyListener(this); |
271 if (fSubjectControl instanceof Scrollable) { | 271 if ( cast(Scrollable)fSubjectControl ) { |
272 Scrollable scrollable= cast(Scrollable) fSubjectControl; | 272 Scrollable scrollable= cast(Scrollable) fSubjectControl; |
273 ScrollBar vBar= scrollable.getVerticalBar(); | 273 ScrollBar vBar= scrollable.getVerticalBar(); |
274 if (vBar !is null) | 274 if (vBar !is null) |
275 vBar.addSelectionListener(this); | 275 vBar.addSelectionListener(this); |
276 ScrollBar hBar= scrollable.getHorizontalBar(); | 276 ScrollBar hBar= scrollable.getHorizontalBar(); |
310 if (fSubjectControl !is null && !fSubjectControl.isDisposed()) { | 310 if (fSubjectControl !is null && !fSubjectControl.isDisposed()) { |
311 fSubjectControl.removeMouseListener(this); | 311 fSubjectControl.removeMouseListener(this); |
312 fSubjectControl.removeMouseMoveListener(this); | 312 fSubjectControl.removeMouseMoveListener(this); |
313 fSubjectControl.removeControlListener(this); | 313 fSubjectControl.removeControlListener(this); |
314 fSubjectControl.removeKeyListener(this); | 314 fSubjectControl.removeKeyListener(this); |
315 if (fSubjectControl instanceof Scrollable) { | 315 if ( cast(Scrollable)fSubjectControl ) { |
316 Scrollable scrollable= cast(Scrollable) fSubjectControl; | 316 Scrollable scrollable= cast(Scrollable) fSubjectControl; |
317 ScrollBar vBar= scrollable.getVerticalBar(); | 317 ScrollBar vBar= scrollable.getVerticalBar(); |
318 if (vBar !is null) | 318 if (vBar !is null) |
319 vBar.removeSelectionListener(this); | 319 vBar.removeSelectionListener(this); |
320 ScrollBar hBar= scrollable.getHorizontalBar(); | 320 ScrollBar hBar= scrollable.getHorizontalBar(); |
453 if (!(iControl5.containsControl(control))) { | 453 if (!(iControl5.containsControl(control))) { |
454 hideInformationControl(); | 454 hideInformationControl(); |
455 } else if (cancelReplacingDelay()) { | 455 } else if (cancelReplacingDelay()) { |
456 if (event.type is DWT.MouseUp) { | 456 if (event.type is DWT.MouseUp) { |
457 stop(); // avoid that someone else replaces the info control before the async is exec'd | 457 stop(); // avoid that someone else replaces the info control before the async is exec'd |
458 if (infoControl instanceof IDelayedInputChangeProvider) { | 458 if ( cast(IDelayedInputChangeProvider)infoControl ) { |
459 final IDelayedInputChangeProvider delayedICP= cast(IDelayedInputChangeProvider) infoControl; | 459 final IDelayedInputChangeProvider delayedICP= cast(IDelayedInputChangeProvider) infoControl; |
460 final IInputChangedListener inputChangeListener= new DelayedInputChangeListener(delayedICP, getInformationControlReplacer()); | 460 final IInputChangedListener inputChangeListener= new DelayedInputChangeListener(delayedICP, getInformationControlReplacer()); |
461 delayedICP.setDelayedInputChangeListener(inputChangeListener); | 461 delayedICP.setDelayedInputChangeListener(inputChangeListener); |
462 // cancel automatic input updating after a small timeout: | 462 // cancel automatic input updating after a small timeout: |
463 control.getShell().getDisplay().timerExec(1000, new class() Runnable { | 463 control.getShell().getDisplay().timerExec(1000, new class() Runnable { |
835 if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) { | 835 if ((iControl instanceof IInformationControlExtension5 && !(cast(IInformationControlExtension5) iControl).isVisible())) { |
836 return false; | 836 return false; |
837 } | 837 } |
838 } | 838 } |
839 } | 839 } |
840 if (iControl instanceof IInformationControlExtension3) { | 840 if ( cast(IInformationControlExtension3)iControl ) { |
841 IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl; | 841 IInformationControlExtension3 iControl3= cast(IInformationControlExtension3) iControl; |
842 | 842 |
843 Rectangle iControlBounds= subjectControl.getDisplay().map(null, subjectControl, iControl3.getBounds()); | 843 Rectangle iControlBounds= subjectControl.getDisplay().map(null, subjectControl, iControl3.getBounds()); |
844 Rectangle totalBounds= Geometry.copy(iControlBounds); | 844 Rectangle totalBounds= Geometry.copy(iControlBounds); |
845 if (blowUp && isReplaceInProgress()) { | 845 if (blowUp && isReplaceInProgress()) { |