Skip to content

Commit

Permalink
klighd.piccolo: enabled installation of customized tooltip renderer i…
Browse files Browse the repository at this point in the history
…n sub classes of 'PiccoloViewer', as demanded in #73
  • Loading branch information
sailingKieler authored and NiklasRentzCAU committed Aug 16, 2021
1 parent 0b15965 commit 580b3a1
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public PiccoloViewer(final ContextViewer theParentViewer, final Composite parent
this.magnificationLensVisibleSupplier = installEventHanders(camera);

// add a tooltip element
new PiccoloTooltip(canvas);
this.installToolTip(canvas);

// A timer being in charge of buffering and thus aggregating a bunch of single
// view transform changes occurring closely after each other to a single view
Expand Down Expand Up @@ -223,6 +223,15 @@ protected Supplier<Boolean> installEventHanders(KlighdMainCamera camera) {
return () -> magnificationLensHandler.isLensVisible();
}

/**
* Installs the tooltip support on this diagram viewer, clients may override.
*
* @param canvas the {@link KlighdCanvas} to install the tooltip support on
*/
protected void installToolTip(KlighdCanvas canvas) {
new PiccoloTooltip(canvas);
}

/**
* Provides the visibility state of the magnifying lens.<br>
* This is evaluated by particular Klighd...EventHandlers that are inactive in case the
Expand Down

0 comments on commit 580b3a1

Please sign in to comment.