/** * Creates a link directly to the address in the specified target frame * <p> * * @param directToAddress * The address to redirect to * @param targetFrameName * The frame to redirect * @param component * Includes raw text in the link */ public Link(String directToAddress, String targetFrameName, ComponentHierarchyBase component) { super("a", ComponentTypes.Link); this.directToAddress = directToAddress; this.targetFrameName = targetFrameName; if (directToAddress != null) { addAttribute(LinkAttributes.HRef, directToAddress); } if (targetFrameName != null) { addAttribute(LinkAttributes.Target, targetFrameName); } add(component); }
mediaLink.add(getMediaComponent()); getChildren().remove(this.mediaLink); this.mediaLink = null;
/** * Sets the component displayed to the left or right (set that in the link) * * @param mediaComponent * * @return */ @Override public BSMedia setMediaComponent(Component mediaComponent) { if (this.mediaComponent != null) { getMediaLink().remove(this.mediaComponent); this.mediaComponent = null; } this.mediaComponent = mediaComponent; if (this.mediaComponent != null) { this.mediaComponent.addClass(BSComponentMediaOptions.Media_Object); getMediaLink().add(this.mediaComponent); } return this; }
/** * Creates a link directly to the address in the specified target frame * <p> * * @param directToAddress * The address to redirect to * @param targetFrameName * The frame to redirect * @param component * Includes raw text in the link */ public Link(String directToAddress, String targetFrameName, ComponentHierarchyBase component) { super("a", ComponentTypes.Link); this.directToAddress = directToAddress; this.targetFrameName = targetFrameName; if (directToAddress != null) { addAttribute(LinkAttributes.HRef, directToAddress); } if (targetFrameName != null) { addAttribute(LinkAttributes.Target, targetFrameName); } add(component); }
mediaLink.add(getMediaComponent()); getChildren().remove(this.mediaLink); this.mediaLink = null;
/** * Sets the component displayed to the left or right (set that in the link) * * @param mediaComponent * * @return */ @Override public BSMedia setMediaComponent(Component mediaComponent) { if (this.mediaComponent != null) { getMediaLink().remove(this.mediaComponent); this.mediaComponent = null; } this.mediaComponent = mediaComponent; if (this.mediaComponent != null) { this.mediaComponent.addClass(BSComponentMediaOptions.Media_Object); getMediaLink().add(this.mediaComponent); } return this; }
/** * Creates a link directly to the address in the specified target frame * <p> * * @param directToAddress * The address to redirect to * @param targetFrameName * The frame to redirect * @param component * Includes raw text in the link */ public Link(String directToAddress, String targetFrameName, ComponentHierarchyBase component) { super("a", ComponentTypes.Link); this.directToAddress = directToAddress; this.targetFrameName = targetFrameName; if (directToAddress != null) { addAttribute(LinkAttributes.HRef, directToAddress); } if (targetFrameName != null) { addAttribute(LinkAttributes.Target, targetFrameName); } add(component); }
/** * 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); }
/** * 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); }
/** * 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); }