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);
}
}
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);
}
}
Aggregations