Skip to content

Commit 171e962

Browse files
committed
Move Plugin Details to Client
1 parent d56364e commit 171e962

File tree

1 file changed

+65
-70
lines changed

1 file changed

+65
-70
lines changed

src/main/java/com/jwebmp/core/CSSComponent.java

Lines changed: 65 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -16,96 +16,91 @@
1616
*/
1717
package com.jwebmp.core;
1818

19+
import com.guicedee.services.jsonrepresentation.json.StaticStrings;
1920
import com.jwebmp.core.base.html.attributes.NoAttributes;
2021
import com.jwebmp.core.base.html.interfaces.GlobalChildren;
2122
import com.jwebmp.core.base.html.interfaces.GlobalFeatures;
2223
import com.jwebmp.core.base.html.interfaces.events.GlobalEvents;
23-
import com.jwebmp.core.base.interfaces.IComponentHierarchyBase;
2424
import com.jwebmp.core.base.servlets.enumarations.ComponentTypes;
25-
import com.guicedee.services.jsonrepresentation.json.StaticStrings;
26-
25+
import com.jwebmp.core.base.servlets.interfaces.ICSSComponent;
2726
import jakarta.validation.constraints.NotNull;
2827

2928
/**
3029
* Extention of a component with no HTML. Renders the ID and all references to it as a class name instead of ID form
3130
* <p>
3231
*
3332
* @param <J>
34-
*
3533
* @author GedMarc
3634
* @since 2015/04/24
3735
*/
3836
public class CSSComponent<J extends CSSComponent<J>>
39-
extends Component<GlobalChildren, NoAttributes, GlobalFeatures, GlobalEvents, J>
40-
implements GlobalChildren
37+
extends Component<GlobalChildren, NoAttributes, GlobalFeatures, GlobalEvents, J>
38+
implements GlobalChildren, ICSSComponent
4139
{
42-
/**
43-
* Constructs a new CSS Class with the given features and events associated
44-
* <p>
45-
*
46-
* @param className
47-
*/
48-
public CSSComponent(String className)
49-
{
50-
super(ComponentTypes.CSSClass);
51-
setID(className);
52-
}
40+
/**
41+
* Constructs a new CSS Class with the given features and events associated
42+
* <p>
43+
*
44+
* @param className
45+
*/
46+
public CSSComponent(String className)
47+
{
48+
super(ComponentTypes.CSSClass);
49+
setID(className);
50+
}
5351

54-
/**
55-
* CSS Components don't render any HTML
56-
*
57-
* @param tabCount
58-
*
59-
* @return
60-
*/
61-
@Override
62-
@NotNull
63-
protected StringBuilder renderHTML(int tabCount)
64-
{
65-
return new StringBuilder();
66-
}
52+
/**
53+
* CSS Components don't render any HTML
54+
*
55+
* @param tabCount
56+
* @return
57+
*/
58+
@Override
59+
@NotNull
60+
protected StringBuilder renderHTML(int tabCount)
61+
{
62+
return new StringBuilder();
63+
}
6764

68-
/**
69-
* Returns the component rendering for JQuery string Requires the rendering for component is set
70-
* <p>
71-
*
72-
* @return $(' # x ').
73-
*/
74-
@NotNull
75-
@Override
76-
public String getJQueryID()
77-
{
78-
return "$(\'" + getID(true) + "\').";
79-
}
65+
/**
66+
* Returns the component rendering for JQuery string Requires the rendering for component is set
67+
* <p>
68+
*
69+
* @return $(' # x ').
70+
*/
71+
@NotNull
72+
@Override
73+
public String getJQueryID()
74+
{
75+
return "$(\'" + getID(true) + "\').";
76+
}
8077

81-
/**
82-
* Returns the ID with the . in the front of it
83-
* <p>
84-
*
85-
* @param jQueryHolder
86-
* Anything
87-
* <p>
88-
*
89-
* @return An ID starting with .
90-
*/
91-
@NotNull
92-
@Override
93-
public String getID(boolean jQueryHolder)
94-
{
95-
return StaticStrings.STRING_DOT + getID();
96-
}
78+
/**
79+
* Returns the ID with the . in the front of it
80+
* <p>
81+
*
82+
* @param jQueryHolder Anything
83+
* <p>
84+
* @return An ID starting with .
85+
*/
86+
@NotNull
87+
@Override
88+
public String getID(boolean jQueryHolder)
89+
{
90+
return StaticStrings.STRING_DOT + getID();
91+
}
9792

98-
/**
99-
* Replaces the # with a .
100-
*
101-
* @return
102-
*/
103-
@NotNull
104-
@Override
105-
public String getID()
106-
{
107-
return super.getID()
108-
.replace(StaticStrings.CHAR_HASH, StaticStrings.CHAR_DOT);
109-
}
93+
/**
94+
* Replaces the # with a .
95+
*
96+
* @return
97+
*/
98+
@NotNull
99+
@Override
100+
public String getID()
101+
{
102+
return super.getID()
103+
.replace(StaticStrings.CHAR_HASH, StaticStrings.CHAR_DOT);
104+
}
110105

111106
}

0 commit comments

Comments
 (0)