/** * Adds a BS Image with the image properties all set * * @param imageUrl * * @return */ @NotNull public BSNavBarBrandImage<?> addImage(String imageUrl, String textAfter) { Image image = new Image(imageUrl); BSNavBarBrandImage<?> brandImage = new BSNavBarBrandImage(image); image.addStyle("width", "30px"); image.addStyle("height", "30px"); image.addClass("d-inline-block align-top"); add(image); addText(textAfter); return brandImage; }
/** * Construct a new Image * * @param image */ public Image(String image) { super(ComponentTypes.Image); setInlineClosingTag(true); addAttribute(ImageAttributes.Src, image); }
@Override public boolean equals(Object obj) { if (!(obj instanceof Image)) { return false; } return getAttribute(ImageAttributes.Src).equals(((Image) obj) .getAttribute(ImageAttributes.Src)); }
/** * Creates a new theme pack item with the given values * * @param name * @param cssClass * @param iconImageLocation */ public ThemePackItem(String name, String cssClass, String iconImageLocation) { this.name = name; this.cssClass = cssClass; this.iconImageLocation = iconImageLocation; link = new Link(cssClass); add(link); if (iconImageLocation != null && !iconImageLocation.isEmpty()) { image = new Image(iconImageLocation); add(image); } span = new Span(); span.addClass("themeName"); span.setText(this.name); addClass(JQUIThemeBlocks.UI_Widget.toString()); addClass(JQUIThemeBlocks.UI_Widget_Input.toString()); addClass(JQUIThemeBlocks.UI_State_Active.toString()); link.add(span); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getCssClass() != null ? getCssClass().hashCode() : 0); result = 31 * result + (getIconImageLocation() != null ? getIconImageLocation().hashCode() : 0); result = 31 * result + (link != null ? link.hashCode() : 0); result = 31 * result + (image != null ? image.hashCode() : 0); result = 31 * result + (span != null ? span.hashCode() : 0); return result; }
if (image != null ? !image.equals(that.image) : that.image != null)
/** * Creates a new theme pack item with the given values * * @param name * @param cssClass * @param iconImageLocation */ public ThemePackItem(String name, String cssClass, String iconImageLocation) { this.name = name; this.cssClass = cssClass; this.iconImageLocation = iconImageLocation; link = new Link(cssClass); add(link); if (iconImageLocation != null && !iconImageLocation.isEmpty()) { image = new Image(iconImageLocation); add(image); } span = new Span(); span.addClass("themeName"); span.setText(this.name); addClass(JQUIThemeBlocks.UI_Widget.toString()); addClass(JQUIThemeBlocks.UI_Widget_Input.toString()); addClass(JQUIThemeBlocks.UI_State_Active.toString()); link.add(span); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getCssClass() != null ? getCssClass().hashCode() : 0); result = 31 * result + (getIconImageLocation() != null ? getIconImageLocation().hashCode() : 0); result = 31 * result + (link != null ? link.hashCode() : 0); result = 31 * result + (image != null ? image.hashCode() : 0); result = 31 * result + (span != null ? span.hashCode() : 0); return result; }
if (image != null ? !image.equals(that.image) : that.image != null)
/** * Adds a BS Image with the image properties all set * * @param imageUrl * * @return */ @NotNull public BSNavBarBrandImage<?> addImage(String imageUrl, String textAfter) { Image image = new Image(imageUrl); BSNavBarBrandImage<?> brandImage = new BSNavBarBrandImage(image); image.addStyle("width", "30px"); image.addStyle("height", "30px"); image.addClass("d-inline-block align-top"); add(image); addText(textAfter); return brandImage; }
/** * Construct a new Image * * @param image */ public Image(String image) { super(ComponentTypes.Image); setInlineClosingTag(true); addAttribute(ImageAttributes.Src, image); }
/** * Creates a new theme pack item with the given values * * @param name * @param cssClass * @param iconImageLocation */ public ThemePackItem(String name, String cssClass, String iconImageLocation) { this.name = name; this.cssClass = cssClass; this.iconImageLocation = iconImageLocation; link = new Link(cssClass); add(link); if (iconImageLocation != null && !iconImageLocation.isEmpty()) { image = new Image(iconImageLocation); add(image); } span = new Span(); span.addClass("themeName"); span.setText(this.name); addClass(JQUIThemeBlocks.UI_Widget.toString()); addClass(JQUIThemeBlocks.UI_Widget_Input.toString()); addClass(JQUIThemeBlocks.UI_State_Active.toString()); link.add(span); }
@Override public boolean equals(Object obj) { if (!(obj instanceof Image)) { return false; } return getAttribute(ImageAttributes.Src).equals(((Image) obj) .getAttribute(ImageAttributes.Src)); }
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + (getName() != null ? getName().hashCode() : 0); result = 31 * result + (getCssClass() != null ? getCssClass().hashCode() : 0); result = 31 * result + (getIconImageLocation() != null ? getIconImageLocation().hashCode() : 0); result = 31 * result + (link != null ? link.hashCode() : 0); result = 31 * result + (image != null ? image.hashCode() : 0); result = 31 * result + (span != null ? span.hashCode() : 0); return result; }
if (image != null ? !image.equals(that.image) : that.image != null)
/** * Adds a BS Image with the image properties all set * * @param imageUrl * * @return */ @NotNull public BSNavBarBrandImage<?> addImage(String imageUrl, String textAfter) { Image image = new Image(imageUrl); BSNavBarBrandImage<?> brandImage = new BSNavBarBrandImage(image); image.addStyle("width", "30px"); image.addStyle("height", "30px"); image.addClass("d-inline-block align-top"); add(image); addText(textAfter); return brandImage; }
/** * Construct a new Image * * @param image */ public Image(String image) { super(ComponentTypes.Image); setInlineClosingTag(true); addAttribute(ImageAttributes.Src, image); }
@Override public boolean equals(Object obj) { if (!(obj instanceof Image)) { return false; } return getAttribute(ImageAttributes.Src).equals(((Image) obj) .getAttribute(ImageAttributes.Src)); }