use of org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip in project ovirt-engine by oVirt.
the class NetworkItemPanel method initTooltip.
protected void initTooltip() {
tooltip = new WidgetTooltip(getContents());
tooltip.setPlacement(Placement.BOTTOM);
SafeHtml tooltipContent = infoPopup.getTooltipContent(item);
if (tooltipContent != null) {
tooltip.setHtml(tooltipContent);
}
}
use of org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip in project ovirt-engine by oVirt.
the class TooltippedIcon method createTooltip.
private WidgetTooltip createTooltip(Widget widget) {
WidgetTooltip tooltip = new WidgetTooltip(widget);
setWidget(tooltip);
return tooltip;
}
use of org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip in project ovirt-engine by oVirt.
the class VmInterfaceListGroupItem method createLinkStatusPanel.
private IsWidget createLinkStatusPanel(boolean isLinked) {
IconStatusPanel iconStatusPanel = new IconStatusPanel(isLinked ? IconType.ARROW_CIRCLE_O_UP : IconType.ARROW_CIRCLE_O_DOWN);
iconStatusPanel.addStyleName(DOUBLE_SIZE);
iconStatusPanel.getElement().getStyle().setColor(isLinked ? GREEN : RED);
String tooltipText = isLinked ? constants.linkedNetworkInterface() : constants.unlinkedNetworkInterface();
WidgetTooltip tooltip = new WidgetTooltip(iconStatusPanel);
tooltip.setHtml(SafeHtmlUtils.fromString(tooltipText));
return tooltip;
}
use of org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip in project ovirt-engine by oVirt.
the class VmInterfaceListGroupItem method createCardPluggedStatusPanel.
private IsWidget createCardPluggedStatusPanel(boolean isPlugged) {
Span linkStatusPanel = new Span();
Span icon = new Span();
icon.addStyleName(Styles.ICON_STACK);
Italic plugItalic = new Italic();
plugItalic.addStyleName(Styles.FONT_AWESOME_BASE);
plugItalic.addStyleName(Styles.ICON_STACK_TOP);
plugItalic.addStyleName(ROTATE_270);
plugItalic.addStyleName(IconType.PLUG.getCssName());
icon.add(plugItalic);
if (!isPlugged) {
Italic unplugged = new Italic();
unplugged.addStyleName(Styles.FONT_AWESOME_BASE);
unplugged.addStyleName(Styles.ICON_STACK_TOP);
unplugged.addStyleName(DANGER);
unplugged.addStyleName(IconType.BAN.getCssName());
icon.add(unplugged);
}
linkStatusPanel.add(icon);
linkStatusPanel.addStyleName(DOUBLE_SIZE);
String tooltipText = isPlugged ? constants.pluggedNetworkInterface() : constants.unpluggedNetworkInterface();
WidgetTooltip tooltip = new WidgetTooltip(linkStatusPanel);
tooltip.setHtml(SafeHtmlUtils.fromString(tooltipText));
return tooltip;
}
use of org.ovirt.engine.ui.common.widget.tooltip.WidgetTooltip in project ovirt-engine by oVirt.
the class TemplateGeneralModelForm method initialize.
/**
* Initialize the form. Call this after ID has been set on the form,
* so that form fields can use the ID as their prefix.
*/
public void initialize() {
driver.initialize(this);
isHighlyAvailable = new BooleanLabel(constants.yes(), constants.no());
// Build a form using the FormBuilder
formBuilder.addFormItem(new FormItem(constants.nameTemplateGeneral(), name, 0, 0));
formBuilder.addFormItem(new FormItem(constants.descriptionTemplateGeneral(), description, 1, 0));
formBuilder.addFormItem(new FormItem(constants.hostClusterTemplateGeneral(), hostCluster, 2, 0));
formBuilder.addFormItem(new FormItem(constants.osTemplateGeneral(), oS, 3, 0));
formBuilder.addFormItem(new FormItem(constants.graphicsProtocol(), graphicsType, 4, 0));
formBuilder.addFormItem(new FormItem(constants.videoType(), defaultDisplayType, 5, 0));
formBuilder.addFormItem(new FormItem(constants.optimizedFor(), optimizedForSystemProfile, 6, 0));
formBuilder.addFormItem(new FormItem(constants.definedMemTemplateGeneral(), definedMemory, 0, 1));
WidgetTooltip cpuInfoWithTooltip = new WidgetTooltip(cpuInfo);
cpuInfoWithTooltip.setHtml(SafeHtmlUtils.fromString(constants.numOfCpuCoresTooltip()));
formBuilder.addFormItem(new FormItem(constants.numOfCpuCoresTemplateGeneral(), cpuInfoWithTooltip, 1, 1));
formBuilder.addFormItem(new FormItem(constants.numOfMonitorsTemplateGeneral(), monitorCount, 2, 1));
formBuilder.addFormItem(new FormItem(constants.highlyAvailTemplateGeneral(), isHighlyAvailable, 3, 1));
formBuilder.addFormItem(new FormItem(constants.priorityTemplateGeneral(), priority, 4, 1));
formBuilder.addFormItem(new FormItem(constants.usbPolicyTemplateGeneral(), usbPolicy, 5, 1) {
@Override
public boolean getIsAvailable() {
return getModel().getHasUsbPolicy();
}
});
formBuilder.addFormItem(new FormItem(constants.originTemplateGeneral(), origin, 0, 2));
formBuilder.addFormItem(new FormItem(constants.isStatelessTemplateGeneral(), isStateless, 1, 2));
formBuilder.addFormItem(new FormItem(constants.templateId(), templateId, 2, 2));
formBuilder.addFormItem(new FormItem(constants.domainTemplateGeneral(), domain, 3, 2) {
@Override
public boolean getIsAvailable() {
return getModel().getHasDomain();
}
});
formBuilder.addFormItem(new FormItem(constants.tzTemplateGeneral(), timeZone, 4, 2) {
@Override
public boolean getIsAvailable() {
return getModel().getHasTimeZone();
}
});
formBuilder.addFormItem(new FormItem(constants.quotaTemplateGeneral(), quotaName, 5, 2) {
@Override
public boolean getIsAvailable() {
return getModel().isQuotaAvailable();
}
}.withDefaultValue(constants.notConfigured(), () -> {
String quotaName = getModel().getQuotaName();
return quotaName == null || "".equals(quotaName);
}));
}
Aggregations