From 19c3dd31ad36dddde6e380354b8f5c8ad7d12b84 Mon Sep 17 00:00:00 2001 From: GedMarc Date: Tue, 3 Sep 2024 07:54:18 +0200 Subject: [PATCH] Mat chips and local storage --- .../java/com/jwebmp/core/base/html/Link.java | 304 +++++++++--------- 1 file changed, 145 insertions(+), 159 deletions(-) diff --git a/src/main/java/com/jwebmp/core/base/html/Link.java b/src/main/java/com/jwebmp/core/base/html/Link.java index 58a0fe29..e20ceb0c 100644 --- a/src/main/java/com/jwebmp/core/base/html/Link.java +++ b/src/main/java/com/jwebmp/core/base/html/Link.java @@ -22,10 +22,7 @@ import com.jwebmp.core.base.html.interfaces.GlobalChildren; import com.jwebmp.core.base.html.interfaces.GlobalFeatures; import com.jwebmp.core.base.html.interfaces.NoNewLineForRawText; -import com.jwebmp.core.base.html.interfaces.children.BodyChildren; -import com.jwebmp.core.base.html.interfaces.children.FormChildren; -import com.jwebmp.core.base.html.interfaces.children.ListChildren; -import com.jwebmp.core.base.html.interfaces.children.ListItemChildren; +import com.jwebmp.core.base.html.interfaces.children.*; import com.jwebmp.core.base.html.interfaces.events.GlobalEvents; import com.jwebmp.core.base.interfaces.IComponentHierarchyBase; import com.jwebmp.core.base.servlets.enumarations.ComponentTypes; @@ -62,175 +59,164 @@ * HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported.

* * @param - * * @author GedMarc */ @Log public class Link> - extends Component - implements BodyChildren, NoNewLineForRawText, - ListItemChildren, - ListChildren, FormChildren + extends Component + implements BodyChildren, NoNewLineForRawText, + ListItemChildren, + ListChildren, FormChildren, HeadChildren { - /** - * The address directing to - */ - private String directToAddress; - /** - * The target frame - */ - private String targetFrameName; + /** + * The address directing to + */ + private String directToAddress; + /** + * The target frame + */ + private String targetFrameName; - /** - * Constructs a new A tag - */ - public Link() - { - super("a", ComponentTypes.Link); - } + /** + * Constructs a new A tag + */ + public Link() + { + super("a", ComponentTypes.Link); + } - /** - * Creates a link directly to the address in the current window - *

- * - * @param directToAddress - * The address to redirect to - */ - public Link(String directToAddress) - { - this(directToAddress, null); - } + /** + * Creates a link directly to the address in the current window + *

+ * + * @param directToAddress The address to redirect to + */ + public Link(String directToAddress) + { + this(directToAddress, null); + } - /** - * Creates a link directly to the address in the specified target frame - *

- * - * @param directToAddress - * The address to redirect to - * @param targetFrameName - * The frame to redirect - */ - public Link(String directToAddress, String targetFrameName) - { - this(directToAddress, targetFrameName, (String) null); - } + /** + * Creates a link directly to the address in the specified target frame + *

+ * + * @param directToAddress The address to redirect to + * @param targetFrameName The frame to redirect + */ + public Link(String directToAddress, String targetFrameName) + { + this(directToAddress, targetFrameName, (String) null); + } - /** - * Creates a link directly to the address in the specified target frame - *

- * - * @param directToAddress - * The address to redirect to - * @param targetFrameName - * The frame to redirect - * @param text - * Includes raw text in the link - */ - public Link(String directToAddress, String targetFrameName, String text) - { - super("a", ComponentTypes.Link); - this.directToAddress = directToAddress; - this.targetFrameName = targetFrameName; - if (directToAddress != null) - { - addAttribute(LinkAttributes.HRef, directToAddress); - } - if (targetFrameName != null) - { - addAttribute(LinkAttributes.Target, targetFrameName); - } - setText(text); - } + /** + * Creates a link directly to the address in the specified target frame + *

+ * + * @param directToAddress The address to redirect to + * @param targetFrameName The frame to redirect + * @param text Includes raw text in the link + */ + public Link(String directToAddress, String targetFrameName, String text) + { + super("a", ComponentTypes.Link); + this.directToAddress = directToAddress; + this.targetFrameName = targetFrameName; + if (directToAddress != null) + { + addAttribute(LinkAttributes.HRef, directToAddress); + } + if (targetFrameName != null) + { + addAttribute(LinkAttributes.Target, targetFrameName); + } + setText(text); + } - /** - * Creates a link directly to the address in the specified target frame - *

- * - * @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, IComponentHierarchyBase 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 link directly to the address in the specified target frame + *

+ * + * @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, IComponentHierarchyBase 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); + } - /** - * Returns the direct to address - *

- * - * @return The address redirecting to - */ - public String getDirectToAddress() - { - return directToAddress; - } + /** + * Returns the direct to address + *

+ * + * @return The address redirecting to + */ + public String getDirectToAddress() + { + return directToAddress; + } - /** - * Sets the address to direct to - *

- * - * @param directToAddress - */ - @SuppressWarnings("unchecked") - @NotNull - public J setDirectToAddress(String directToAddress) - { - this.directToAddress = directToAddress; - addAttribute(LinkAttributes.HRef, directToAddress); - return (J) this; - } + /** + * Sets the address to direct to + *

+ * + * @param directToAddress + */ + @SuppressWarnings("unchecked") + @NotNull + public J setDirectToAddress(String directToAddress) + { + this.directToAddress = directToAddress; + addAttribute(LinkAttributes.HRef, directToAddress); + return (J) this; + } - /** - * Returns the current target frame name - *

- * - * @return The current target frame. Can be Null - */ - public String getTargetFrameName() - { - return targetFrameName; - } + /** + * Returns the current target frame name + *

+ * + * @return The current target frame. Can be Null + */ + public String getTargetFrameName() + { + return targetFrameName; + } - /** - * Sets the target frame - *

- * - * @param targetFrameName - * The target frame - */ - @SuppressWarnings("unchecked") - @NotNull - public J setTargetFrameName(String targetFrameName) - { - this.targetFrameName = targetFrameName; - addAttribute(LinkAttributes.Target, targetFrameName); - return (J) this; - } + /** + * Sets the target frame + *

+ * + * @param targetFrameName The target frame + */ + @SuppressWarnings("unchecked") + @NotNull + public J setTargetFrameName(String targetFrameName) + { + this.targetFrameName = targetFrameName; + addAttribute(LinkAttributes.Target, targetFrameName); + return (J) this; + } - @Override - public int hashCode() - { - return super.hashCode(); - } + @Override + public int hashCode() + { + return super.hashCode(); + } - @Override - public boolean equals(Object o) - { - return super.equals(o); - } + @Override + public boolean equals(Object o) + { + return super.equals(o); + } }