this.res = res;
setElement(Elements.asJsElement(binder.createAndBindUi(this)));
attachHandlers();
// Make these tooltips right aligned since they're so close to the edge of the screen.
PositionerBuilder positioner = new Tooltip.TooltipPositionerBuilder().setHorizontalAlign(
HorizontalAlign.RIGHT).setPosition(Position.OVERLAP);
Positioner historyTooltipPositioner =
positioner.buildAnchorPositioner(Elements.asJsElement(historyIcon));
new Tooltip.Builder(
res, Elements.asJsElement(historyIcon), historyTooltipPositioner).setTooltipText(
"Explore this file's changes over time.").build().setTitle("History");
Positioner debugTooltipPositioner =
positioner.buildAnchorPositioner(Elements.asJsElement(debugIcon));
new Tooltip.Builder(
res, Elements.asJsElement(debugIcon), debugTooltipPositioner).setTooltipText(
"Opens the debug panel where you can set breakpoints and watch expressions.")
.build().setTitle("Debugging Controls");
}