The component will auto-fit within other elements and will float to the right by default, and will show at the top right if appended to icons.
Example:
Badge.create("label")
See also :
public void Badge()
public static Badge create(String content)
content
content
the text to be added to the badge
new badge instance
public Badge setRemovable(boolean removable)
removable
true to set it as removable and show the close button, false the badge is not removable and close button will be removed.
Same badge instance
public Badge removable()
Same badge instance
public Badge unRemovable()
Same badge instance
public boolean isRemovable()
a boolean, true if removable and false otherwise.
public RemoveButton getCloseButton()
the close button element
public Badge withCloseButton(ChildHandler<Badge, RemoveButton> handler)
handler
a ChildHandler to applied on the remove button
same badge instance
public Badge withCloseButton()
same badge instance
public Badge setText(String text)
text
the new content
same badge instance