Skip to content

Commit 19c3dd3

Browse files
committed
Mat chips and local storage
1 parent d7b7595 commit 19c3dd3

File tree

1 file changed

+145
-159
lines changed
  • src/main/java/com/jwebmp/core/base/html

1 file changed

+145
-159
lines changed

src/main/java/com/jwebmp/core/base/html/Link.java

Lines changed: 145 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
import com.jwebmp.core.base.html.interfaces.GlobalChildren;
2323
import com.jwebmp.core.base.html.interfaces.GlobalFeatures;
2424
import com.jwebmp.core.base.html.interfaces.NoNewLineForRawText;
25-
import com.jwebmp.core.base.html.interfaces.children.BodyChildren;
26-
import com.jwebmp.core.base.html.interfaces.children.FormChildren;
27-
import com.jwebmp.core.base.html.interfaces.children.ListChildren;
28-
import com.jwebmp.core.base.html.interfaces.children.ListItemChildren;
25+
import com.jwebmp.core.base.html.interfaces.children.*;
2926
import com.jwebmp.core.base.html.interfaces.events.GlobalEvents;
3027
import com.jwebmp.core.base.interfaces.IComponentHierarchyBase;
3128
import com.jwebmp.core.base.servlets.enumarations.ComponentTypes;
@@ -62,175 +59,164 @@
6259
* HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported.<p>
6360
*
6461
* @param <J>
65-
*
6662
* @author GedMarc
6763
*/
6864
@Log
6965
public class Link<J extends Link<J>>
70-
extends Component<GlobalChildren, LinkAttributes, GlobalFeatures, GlobalEvents, J>
71-
implements BodyChildren, NoNewLineForRawText,
72-
ListItemChildren,
73-
ListChildren, FormChildren
66+
extends Component<GlobalChildren, LinkAttributes, GlobalFeatures, GlobalEvents, J>
67+
implements BodyChildren, NoNewLineForRawText,
68+
ListItemChildren,
69+
ListChildren, FormChildren, HeadChildren
7470
{
75-
/**
76-
* The address directing to
77-
*/
78-
private String directToAddress;
79-
/**
80-
* The target frame
81-
*/
82-
private String targetFrameName;
71+
/**
72+
* The address directing to
73+
*/
74+
private String directToAddress;
75+
/**
76+
* The target frame
77+
*/
78+
private String targetFrameName;
8379

84-
/**
85-
* Constructs a new A tag
86-
*/
87-
public Link()
88-
{
89-
super("a", ComponentTypes.Link);
90-
}
80+
/**
81+
* Constructs a new A tag
82+
*/
83+
public Link()
84+
{
85+
super("a", ComponentTypes.Link);
86+
}
9187

92-
/**
93-
* Creates a link directly to the address in the current window
94-
* <p>
95-
*
96-
* @param directToAddress
97-
* The address to redirect to
98-
*/
99-
public Link(String directToAddress)
100-
{
101-
this(directToAddress, null);
102-
}
88+
/**
89+
* Creates a link directly to the address in the current window
90+
* <p>
91+
*
92+
* @param directToAddress The address to redirect to
93+
*/
94+
public Link(String directToAddress)
95+
{
96+
this(directToAddress, null);
97+
}
10398

104-
/**
105-
* Creates a link directly to the address in the specified target frame
106-
* <p>
107-
*
108-
* @param directToAddress
109-
* The address to redirect to
110-
* @param targetFrameName
111-
* The frame to redirect
112-
*/
113-
public Link(String directToAddress, String targetFrameName)
114-
{
115-
this(directToAddress, targetFrameName, (String) null);
116-
}
99+
/**
100+
* Creates a link directly to the address in the specified target frame
101+
* <p>
102+
*
103+
* @param directToAddress The address to redirect to
104+
* @param targetFrameName The frame to redirect
105+
*/
106+
public Link(String directToAddress, String targetFrameName)
107+
{
108+
this(directToAddress, targetFrameName, (String) null);
109+
}
117110

118-
/**
119-
* Creates a link directly to the address in the specified target frame
120-
* <p>
121-
*
122-
* @param directToAddress
123-
* The address to redirect to
124-
* @param targetFrameName
125-
* The frame to redirect
126-
* @param text
127-
* Includes raw text in the link
128-
*/
129-
public Link(String directToAddress, String targetFrameName, String text)
130-
{
131-
super("a", ComponentTypes.Link);
132-
this.directToAddress = directToAddress;
133-
this.targetFrameName = targetFrameName;
134-
if (directToAddress != null)
135-
{
136-
addAttribute(LinkAttributes.HRef, directToAddress);
137-
}
138-
if (targetFrameName != null)
139-
{
140-
addAttribute(LinkAttributes.Target, targetFrameName);
141-
}
142-
setText(text);
143-
}
111+
/**
112+
* Creates a link directly to the address in the specified target frame
113+
* <p>
114+
*
115+
* @param directToAddress The address to redirect to
116+
* @param targetFrameName The frame to redirect
117+
* @param text Includes raw text in the link
118+
*/
119+
public Link(String directToAddress, String targetFrameName, String text)
120+
{
121+
super("a", ComponentTypes.Link);
122+
this.directToAddress = directToAddress;
123+
this.targetFrameName = targetFrameName;
124+
if (directToAddress != null)
125+
{
126+
addAttribute(LinkAttributes.HRef, directToAddress);
127+
}
128+
if (targetFrameName != null)
129+
{
130+
addAttribute(LinkAttributes.Target, targetFrameName);
131+
}
132+
setText(text);
133+
}
144134

145-
/**
146-
* Creates a link directly to the address in the specified target frame
147-
* <p>
148-
*
149-
* @param directToAddress
150-
* The address to redirect to
151-
* @param targetFrameName
152-
* The frame to redirect
153-
* @param component
154-
* Includes raw text in the link
155-
*/
156-
public Link(String directToAddress, String targetFrameName, IComponentHierarchyBase<?,?> component)
157-
{
158-
super("a", ComponentTypes.Link);
159-
this.directToAddress = directToAddress;
160-
this.targetFrameName = targetFrameName;
161-
if (directToAddress != null)
162-
{
163-
addAttribute(LinkAttributes.HRef, directToAddress);
164-
}
165-
if (targetFrameName != null)
166-
{
167-
addAttribute(LinkAttributes.Target, targetFrameName);
168-
}
169-
add(component);
170-
}
135+
/**
136+
* Creates a link directly to the address in the specified target frame
137+
* <p>
138+
*
139+
* @param directToAddress The address to redirect to
140+
* @param targetFrameName The frame to redirect
141+
* @param component Includes raw text in the link
142+
*/
143+
public Link(String directToAddress, String targetFrameName, IComponentHierarchyBase<?, ?> component)
144+
{
145+
super("a", ComponentTypes.Link);
146+
this.directToAddress = directToAddress;
147+
this.targetFrameName = targetFrameName;
148+
if (directToAddress != null)
149+
{
150+
addAttribute(LinkAttributes.HRef, directToAddress);
151+
}
152+
if (targetFrameName != null)
153+
{
154+
addAttribute(LinkAttributes.Target, targetFrameName);
155+
}
156+
add(component);
157+
}
171158

172-
/**
173-
* Returns the direct to address
174-
* <p>
175-
*
176-
* @return The address redirecting to
177-
*/
178-
public String getDirectToAddress()
179-
{
180-
return directToAddress;
181-
}
159+
/**
160+
* Returns the direct to address
161+
* <p>
162+
*
163+
* @return The address redirecting to
164+
*/
165+
public String getDirectToAddress()
166+
{
167+
return directToAddress;
168+
}
182169

183-
/**
184-
* Sets the address to direct to
185-
* <p>
186-
*
187-
* @param directToAddress
188-
*/
189-
@SuppressWarnings("unchecked")
190-
@NotNull
191-
public J setDirectToAddress(String directToAddress)
192-
{
193-
this.directToAddress = directToAddress;
194-
addAttribute(LinkAttributes.HRef, directToAddress);
195-
return (J) this;
196-
}
170+
/**
171+
* Sets the address to direct to
172+
* <p>
173+
*
174+
* @param directToAddress
175+
*/
176+
@SuppressWarnings("unchecked")
177+
@NotNull
178+
public J setDirectToAddress(String directToAddress)
179+
{
180+
this.directToAddress = directToAddress;
181+
addAttribute(LinkAttributes.HRef, directToAddress);
182+
return (J) this;
183+
}
197184

198-
/**
199-
* Returns the current target frame name
200-
* <p>
201-
*
202-
* @return The current target frame. Can be Null
203-
*/
204-
public String getTargetFrameName()
205-
{
206-
return targetFrameName;
207-
}
185+
/**
186+
* Returns the current target frame name
187+
* <p>
188+
*
189+
* @return The current target frame. Can be Null
190+
*/
191+
public String getTargetFrameName()
192+
{
193+
return targetFrameName;
194+
}
208195

209-
/**
210-
* Sets the target frame
211-
* <p>
212-
*
213-
* @param targetFrameName
214-
* The target frame
215-
*/
216-
@SuppressWarnings("unchecked")
217-
@NotNull
218-
public J setTargetFrameName(String targetFrameName)
219-
{
220-
this.targetFrameName = targetFrameName;
221-
addAttribute(LinkAttributes.Target, targetFrameName);
222-
return (J) this;
223-
}
196+
/**
197+
* Sets the target frame
198+
* <p>
199+
*
200+
* @param targetFrameName The target frame
201+
*/
202+
@SuppressWarnings("unchecked")
203+
@NotNull
204+
public J setTargetFrameName(String targetFrameName)
205+
{
206+
this.targetFrameName = targetFrameName;
207+
addAttribute(LinkAttributes.Target, targetFrameName);
208+
return (J) this;
209+
}
224210

225-
@Override
226-
public int hashCode()
227-
{
228-
return super.hashCode();
229-
}
211+
@Override
212+
public int hashCode()
213+
{
214+
return super.hashCode();
215+
}
230216

231-
@Override
232-
public boolean equals(Object o)
233-
{
234-
return super.equals(o);
235-
}
217+
@Override
218+
public boolean equals(Object o)
219+
{
220+
return super.equals(o);
221+
}
236222
}

0 commit comments

Comments
 (0)