This class allows you to create and customize information boxes for displaying various types of information. You can set an icon, title, and value to be displayed within the box. Additionally, you can customize the hover effect and flip the box if needed.
Example usage:
// Create an InfoBox with an icon, title, and value InfoBox infoBox = InfoBox.create(icon, "Title", "Value"); // Customize the hover effect infoBox.setHoverEffect(InfoBox.HoverEffect.EXPAND); // Flip the InfoBox infoBox.setFlipped(true); // Add the InfoBox to a parent element Document.get().getBody().appendChild(infoBox.element());
See also :
public void InfoBox()
public void InfoBox(IsElement<HTMLElement> icon)
icon
The icon element to be displayed.
public void InfoBox(IsElement<HTMLElement> icon, String title)
icon
The icon element to be displayed.
title
The title to be displayed in the InfoBox.
public void InfoBox(IsElement<HTMLElement> icon, String title, String value)
icon
The icon element to be displayed.
title
The title to be displayed in the InfoBox.
value
The value to be displayed in the InfoBox.
public static InfoBox create(Icon<?> icon, String title, String value)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
value
The value to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(IsElement<HTMLElement> icon, String title, String value)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
value
The value to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(HTMLElement icon, String title, String value)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
value
The value to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(HTMLElement icon, String title)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(IsElement<HTMLElement> icon, String title)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(Icon<?> icon, String title)
icon
The icon to be displayed.
title
The title to be displayed in the InfoBox.
A new InfoBox instance.
public static InfoBox create(Icon<?> icon)
icon
The icon to be displayed.
A new InfoBox instance.
public static InfoBox create(IsElement<HTMLElement> icon)
icon
The icon to be displayed.
A new InfoBox instance.
public static InfoBox create(HTMLElement icon)
icon
The icon to be displayed.
A new InfoBox instance.
public InfoBox setHoverEffect(HoverEffect effect)
effect
The hover effect style to apply.
This InfoBox instance.
public InfoBox setFlipped(boolean flipped)
flipped
true to flip the InfoBox, false otherwise.
This InfoBox instance.
public InfoBox setIcon(IsElement<HTMLElement> element)
element
The icon element to be displayed.
This InfoBox instance.
public InfoBox setInfo(String value)
value
The value to be displayed in the InfoBox.
This InfoBox instance.
public InfoBox setTitle(String title)
title
The title to be displayed in the InfoBox.
This InfoBox instance.
public DivElement getIcon()
The icon element.
public InfoBox withIcon(ChildHandler<InfoBox, DivElement> handler)
handler
The handler to configure the icon.
This InfoBox instance.
public DivElement getTitle()
The title element.
public InfoBox withTitle(ChildHandler<InfoBox, DivElement> handler)
handler
The handler to configure the title.
This InfoBox instance.
public InfoBox withTitle()
This InfoBox instance.
public DivElement getInfo()
The value element.
public InfoBox withInfo()
This InfoBox instance.
public InfoBox withInfo(ChildHandler<InfoBox, DivElement> handler)
handler
The handler to configure the informational value.
This InfoBox instance.
public DivElement getContent()
The content element.
public InfoBox withContent()
This InfoBox instance.
public InfoBox withContent(ChildHandler<InfoBox, DivElement> handler)
handler
The handler to configure the content.
This InfoBox instance.
public HTMLDivElement element()