Search in sources :

Example 1 with Tooltip

use of org.jboss.hal.ballroom.Tooltip in project console by hal.

the class LogFileView method copyToClipboard.

private void copyToClipboard(Clipboard clipboard) {
    String value = editor.getEditor().getSession().getValue();
    if (!Strings.isNullOrEmpty(value)) {
        clipboard.setText(value);
        Tooltip tooltip = Tooltip.element(copyToClipboard);
        tooltip.hide().setTitle(resources.constants().copied()).show().onHide(() -> tooltip.setTitle(resources.constants().copyToClipboard()));
        setTimeout((o) -> tooltip.hide(), 1000);
    }
}
Also used : Tooltip(org.jboss.hal.ballroom.Tooltip)

Example 2 with Tooltip

use of org.jboss.hal.ballroom.Tooltip in project console by hal.

the class MacroEditorView method copyToClipboard.

private void copyToClipboard(Clipboard clipboard) {
    if (dataProvider.getSelectionInfo().getSingleSelection() != null) {
        clipboard.setText(dataProvider.getSelectionInfo().getSingleSelection().asCli());
        Tooltip tooltip = Tooltip.element(copyToClipboard);
        tooltip.hide().setTitle(resources.constants().copied()).show().onHide(() -> tooltip.setTitle(resources.constants().copyToClipboard()));
        setTimeout((o) -> tooltip.hide(), 1000);
    }
}
Also used : Tooltip(org.jboss.hal.ballroom.Tooltip)

Aggregations

Tooltip (org.jboss.hal.ballroom.Tooltip)2