Tooltip noFileSelectedTooltip = new Tooltip.Builder(
context.getResources(), target, positioner).setShouldListenToHover(false)
.setTooltipRenderer(new TooltipRenderer() {
@Override
public elemental.html.Element renderDom() {
DivElement container = Elements.createDivElement();
DivElement header = Elements.createDivElement();
header.setTextContent("No File Selected");
header.getStyle().setFontWeight(CSSStyleDeclaration.FontWeight.BOLDER);
header.getStyle().setMarginBottom(5, CSSStyleDeclaration.Unit.PX);
container.appendChild(header);
DivElement text = Elements.createDivElement();
text.setTextContent(
"Choose a file from the tree to preview it, or select a custom run target.");
container.appendChild(text);
return container;
}
}).build();
Tooltip yamlAddedTooltip = new Tooltip.Builder(
context.getResources(), target, positioner).setShouldListenToHover(false)
.setTooltipRenderer(new TooltipRenderer() {
@Override
public elemental.html.Element renderDom() {
DivElement container = Elements.createDivElement();
SpanElement text = Elements.createSpanElement();
text.setTextContent(
"The run target has been set to your newly created app.yaml file. ");
container.appendChild(text);
// TODO: We'd like to offer an option to undo the
// automatic setting of the run target, but I don't have time
// to write a coach tips class right now and tool tips can't be
// clicked.
return container;
}
}).build();
Tooltip targetResetTooltip = new Tooltip.Builder(
context.getResources(), target, positioner).setShouldListenToHover(false)
.setTooltipRenderer(new TooltipRenderer() {
@Override
public elemental.html.Element renderDom() {
DivElement container = Elements.createDivElement();
SpanElement text = Elements.createSpanElement();
text.setTextContent(
"You deleted your run target, the run button has been reset to preview "
+ "the active file.");
container.appendChild(text);
// TODO: We'd like to offer undo, but I don't have time
// to write a coach tips class right now and tool tips can't be
// clicked.
return container;