Skip to content

Commit c35b6bf

Browse files
committed
Angular Material Add a few more components
1 parent 8354a57 commit c35b6bf

File tree

1 file changed

+84
-84
lines changed

1 file changed

+84
-84
lines changed

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

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
import com.jwebmp.core.base.html.interfaces.GlobalFeatures;
2424
import com.jwebmp.core.base.html.interfaces.children.TableRowChildren;
2525
import com.jwebmp.core.base.html.interfaces.events.GlobalEvents;
26-
import com.jwebmp.core.base.interfaces.IComponentHierarchyBase;
2726
import com.jwebmp.core.base.servlets.enumarations.ComponentTypes;
28-
2927
import jakarta.validation.constraints.NotNull;
3028

3129
/**
@@ -61,99 +59,101 @@
6159
* <p>
6260
*
6361
* @param <J>
64-
*
6562
* @author GedMarc
6663
* @version 1.0
6764
* @since 2012/10/01
6865
*/
6966
@SuppressWarnings("MissingClassJavaDoc")
7067
public class TableCell<J extends TableCell<J>>
71-
extends Component<GlobalChildren, TableCellAttributes, GlobalFeatures, GlobalEvents, J>
72-
implements TableRowChildren
68+
extends Component<GlobalChildren, TableCellAttributes, GlobalFeatures, GlobalEvents, J>
69+
implements TableRowChildren
7370
{
74-
/**
75-
* Constructs a normal table cell
76-
*/
77-
public TableCell()
78-
{
79-
this((GlobalChildren) null);
80-
}
71+
/**
72+
* Constructs a normal table cell
73+
*/
74+
public TableCell()
75+
{
76+
this((GlobalChildren) null);
77+
}
78+
79+
/**
80+
* Constructs a table cell with the given child.
81+
*
82+
* @param dataDisplay The component that is a child
83+
*/
84+
public TableCell(GlobalChildren dataDisplay)
85+
{
86+
super(ComponentTypes.TableCell);
87+
if (dataDisplay != null)
88+
{
89+
add(dataDisplay);
90+
}
91+
}
8192

82-
/**
83-
* Constructs a table cell with the given child.
84-
*
85-
* @param dataDisplay
86-
* The component that is a child
87-
*/
88-
public TableCell(GlobalChildren dataDisplay)
89-
{
90-
super(ComponentTypes.TableCell);
91-
if (dataDisplay != null)
92-
{
93-
add(dataDisplay);
94-
}
95-
}
93+
/**
94+
* A paragraph as a child. Good for testing or Render on Load
95+
*
96+
* @param dataDisplay The display for the table cell
97+
*/
98+
public TableCell(String dataDisplay)
99+
{
100+
this((GlobalChildren) null);
101+
setText(dataDisplay);
102+
}
96103

97-
/**
98-
* A paragraph as a child. Good for testing or Render on Load
99-
*
100-
* @param dataDisplay
101-
* The display for the table cell
102-
*/
103-
public TableCell(String dataDisplay)
104-
{
105-
this((GlobalChildren) null);
106-
setText(dataDisplay);
107-
}
104+
/**
105+
* Returns this table cell column span
106+
*
107+
* @return Integer of Column Span
108+
*/
109+
public int getColumnSpan()
110+
{
111+
String s = getAttribute(TableCellAttributes.ColSpan);
112+
if (Strings.isNullOrEmpty(s))
113+
{
114+
s = "0";
115+
}
116+
return Integer.parseInt(s);
117+
}
108118

109-
/**
110-
* Returns this table cell column span
111-
*
112-
* @return Integer of Column Span
113-
*/
114-
public int getColumnSpan()
115-
{
116-
String s = getAttribute(TableCellAttributes.ColSpan);
117-
if (Strings.isNullOrEmpty(s))
118-
{
119-
s = "0";
120-
}
121-
return Integer.parseInt(s);
122-
}
119+
/**
120+
* @param columnSpan Sets this table cells column span
121+
*/
122+
@NotNull
123+
@SuppressWarnings("unchecked")
124+
public J setColumnSpan(int columnSpan)
125+
{
126+
addAttribute(TableCellAttributes.ColSpan, columnSpan);
127+
return (J) this;
128+
}
123129

124-
/**
125-
* @param columnSpan
126-
* Sets this table cells column span
127-
*/
128-
@NotNull
129-
@SuppressWarnings("unchecked")
130-
public J setColumnSpan(int columnSpan)
131-
{
132-
addAttribute(TableCellAttributes.ColSpan, columnSpan);
133-
return (J) this;
134-
}
130+
/**
131+
* Gets this table cells row span
132+
*
133+
* @return Integer of Row Span
134+
*/
135+
public int getRowSpan()
136+
{
137+
return Integer.parseInt(getAttribute(TableCellAttributes.RowSpan));
138+
}
135139

136-
/**
137-
* Gets this table cells row span
138-
*
139-
* @return Integer of Row Span
140-
*/
141-
public int getRowSpan()
142-
{
143-
return Integer.parseInt(getAttribute(TableCellAttributes.RowSpan));
144-
}
140+
/**
141+
* Sets this objects row span
142+
*
143+
* @param rowSpan Integer that is row span
144+
*/
145+
@NotNull
146+
@SuppressWarnings("unchecked")
147+
public J setRowSpan(int rowSpan)
148+
{
149+
addAttribute(TableCellAttributes.RowSpan, Integer.toString(rowSpan));
150+
return (J) this;
151+
}
145152

146-
/**
147-
* Sets this objects row span
148-
*
149-
* @param rowSpan
150-
* Integer that is row span
151-
*/
152-
@NotNull
153-
@SuppressWarnings("unchecked")
154-
public J setRowSpan(int rowSpan)
155-
{
156-
addAttribute(TableCellAttributes.RowSpan, Integer.toString(rowSpan));
157-
return (J) this;
158-
}
153+
@Override
154+
public J bind(String variableName)
155+
{
156+
setText("{{" + variableName + "}}");
157+
return (J) this;
158+
}
159159
}

0 commit comments

Comments
 (0)