protected void validatePage() { if (!isPageComplete()) { this.rootDirectoryTextDecorator.show(); setErrorMessage(this.rootDirectoryTextDecorator.getDescriptionText()); } else { this.rootDirectoryTextDecorator.hide(); setErrorMessage(null); } setPageComplete(isPageComplete()); }
/** * Something has changed, requiring redraw. Redraw the decoration and update * the hover text if appropriate. */ protected void update() { if (control == null || control.isDisposed()) { return; } Rectangle rect = getDecorationRectangle(control.getShell()); // If this update is happening due to an image reset, we need to make // sure we clear the area from the old image. // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212501 if (previousDecorationRectangle != null) { rect = rect.union(previousDecorationRectangle); } // Redraw this rectangle in all children control.getShell() .redraw(rect.x, rect.y, rect.width, rect.height, true); control.getShell().update(); if (hover != null && getDescriptionText() != null) { hover.setText(getDescriptionText(), getDecorationRectangle(control .getParent()), control); } previousDecorationRectangle = null; }
/** * Something has changed, requiring redraw. Redraw the decoration and update * the hover text if appropriate. */ protected void update() { if (control == null || control.isDisposed()) { return; } Rectangle rect = getDecorationRectangle(control.getShell()); // If this update is happening due to an image reset, we need to make // sure we clear the area from the old image. // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=212501 if (previousDecorationRectangle != null) { rect = rect.union(previousDecorationRectangle); } // Redraw this rectangle in all children control.getShell() .redraw(rect.x, rect.y, rect.width, rect.height, true); control.getShell().update(); if (hover != null && getDescriptionText() != null) { hover.setText(getDescriptionText(), getDecorationRectangle(control .getParent()), control); } previousDecorationRectangle = null; }
@Override public void mouseHover(MouseEvent event) { if (showHover) { decorationRectangle = getDecorationRectangle((Control) event.widget); if (decorationRectangle.contains(event.x, event.y)) { showHoverText(getDescriptionText()); Control target = (Control) event.widget; if (moveListeningTarget == null) { printAddListener(target, "MOUSEMOVE"); //$NON-NLS-1$ target.addMouseMoveListener(mouseMoveListener); moveListeningTarget = target; } else if (target != moveListeningTarget) { printRemoveListener(moveListeningTarget, "MOUSEMOVE"); //$NON-NLS-1$ moveListeningTarget .removeMouseMoveListener(mouseMoveListener); printAddListener(target, "MOUSEMOVE"); //$NON-NLS-1$ target.addMouseMoveListener(mouseMoveListener); moveListeningTarget = target; } else { // It is already installed on this control. } } } }
@Override public void mouseHover(MouseEvent event) { if (showHover) { decorationRectangle = getDecorationRectangle((Control) event.widget); if (decorationRectangle.contains(event.x, event.y)) { showHoverText(getDescriptionText()); Control target = (Control) event.widget; if (moveListeningTarget == null) { printAddListener(target, "MOUSEMOVE"); //$NON-NLS-1$ target.addMouseMoveListener(mouseMoveListener); moveListeningTarget = target; } else if (target != moveListeningTarget) { printRemoveListener(moveListeningTarget, "MOUSEMOVE"); //$NON-NLS-1$ moveListeningTarget .removeMouseMoveListener(mouseMoveListener); printAddListener(target, "MOUSEMOVE"); //$NON-NLS-1$ target.addMouseMoveListener(mouseMoveListener); moveListeningTarget = target; } else { // It is already installed on this control. } } } }