-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-150.html
603 lines (571 loc) · 99.7 KB
/
template-150.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
<link rel="stylesheet" href="./resources/styles/elf-template.css">
<h1 id="native-html-table">Native HTML table</h1>
<p>Sometimes you only need a simple table for your app. Native <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table">HTML table</a> could be used in place of Grid component for quick and easy table layout. The main advantages of native HTML table is simplicity, flexibility, and style customization. However, manipulating HTML element directly could be tedious and cumbersome. <code>Table</code> class from our utility package can help managing native <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table">HTML table</a> with ease.</p>
<blockquote>
<p>Note that <code>Table</code> class only provides JavaScript logic for HTML element manipulation. Styles and CSS are not provided by Grid utility package.</p>
</blockquote>
<h2 id="usage">Usage</h2>
<p><code>Table</code> class is located in the utility package as shown in the code snippet below: </p>
<pre><code class="language-js">import {Table} from "@refinitiv-ui/efx-grid/utils";
var tableInstance = new Table(divElement, {
colCount: 4,
rowCount: 5
});
</code></pre>
<code-sandbox hash="1f731b6d"><pre><code class="language-css">table td {
text-align: center;
}
</code></pre>
<pre><code class="language-html"><div id="table_div">
</code></pre>
<pre><code class="language-javascript">import { halo } from './theme-loader.js'; // This line is only required for demo purpose. It is not relevant for your application.
await halo(); // This line is only required for demo purpose. It is not relevant for your application.
/* ---------------------------------- Note ----------------------------------
DataGenerator, Formatters and extensions are exposed to global scope
in the bundle file to make it easier to create live examples.
Importing formatters and extensions is still required in your application.
Please see the document for further information.
---------------------------------------------------------------------------*/
var tableInstance = new Table(table_div, {
colCount: 4,
rowCount: 5
});
var rowCount = tableInstance.getRowCount();
for(var r = 0; r < rowCount; ++r) {
tableInstance.getCellsInRow(r).forEach(function(cell, colIndex) {
cell.textContent = ([colIndex, r]).join(", ");
});
}
</code></pre>
</code-sandbox><h2 id="table-initialization">Table initialization</h2>
<p><code>Table</code> class takes two parameters for its constructor. The first parameter is a placeholder element. It is used for positioning the table in the HTML document. The second parameter is a table configuration object, where you can define various parameters and options (e.g., number of columns, number of rows, width, height). For all available options, see Table API Reference section.</p>
<code-sandbox hash="11f2df0c"><pre><code class="language-css">html hr {
margin-top: 5px;
margin-bottom: 10px;
}
</code></pre>
<pre><code class="language-html"><big>Table with default column size</big>
<div id="table_div1"></div>
<hr>
<big>Table with fixed column size and header section</big>
<div id="table_div2"></div>
</code></pre>
<pre><code class="language-javascript">import { halo } from './theme-loader.js'; // This line is only required for demo purpose. It is not relevant for your application.
await halo(); // This line is only required for demo purpose. It is not relevant for your application.
/* ---------------------------------- Note ----------------------------------
DataGenerator, Formatters and extensions are exposed to global scope
in the bundle file to make it easier to create live examples.
Importing formatters and extensions is still required in your application.
Please see the document for further information.
---------------------------------------------------------------------------*/
var tableDiv1 = document.getElementById("table_div1");
var tbl1 = new Table(tableDiv1, {
colCount: 4,
rowCount: 5,
cellHeight: 30
});
var tableDiv2 = document.getElementById("table_div2");
var tbl2 = new Table(tableDiv2, {
colCount: 4,
rowCount: 5,
cellWidth: 100,
cellHeight: 30,
header: 1
});
tbl2.getHeader().getCellsInRow(0).forEach(function(cell, idx) {
cell.textContent = "Header " + (idx + 1);
});
</code></pre>
</code-sandbox><h2 id="table-structure">Table structure</h2>
<p><code>Table</code> class generates HTML elements and table structure based on the given configuration. The general structure created by the class will look like the code snippet below:</p>
<pre><code class="language-html"><div>
<table>
<colgroup>
<col>
...
</colgroup>
<thead>
<tr>
<th></th>
...
<tr>
...
</thead>
<tbody>
<tr>
<td></td>
...
</tr>
...
</tbody>
</table>
</div>
</code></pre>
<p><code>Table</code> class instance itself represent the placeholder element (root element) and not the table element. The table below shows how to get corresponding element from the <code>Table</code> instance. </p>
<table>
<thead>
<tr>
<th>Element</th>
<th>API</th>
</tr>
</thead>
<tbody><tr>
<td>Placeholder element</td>
<td>Table.getElement()</td>
</tr>
<tr>
<td>table</td>
<td>Table.getTableElement()</td>
</tr>
<tr>
<td>tbody</td>
<td>Table.getBody().getElement()</td>
</tr>
<tr>
<td>thead</td>
<td>Table.getHeader().getElement()</td>
</tr>
<tr>
<td>tfoot</td>
<td>Table.getFooter().getElement()</td>
</tr>
<tr>
<td>tr</td>
<td>Table.getRow(r), Table.getBody().getRow(r)</td>
</tr>
<tr>
<td>td (tbody)</td>
<td>Table.getCell(c, r), Table.getBody().getCell(c, r)</td>
</tr>
<tr>
<td>th (thead)</td>
<td>Table.getHeaderCell(c, r), Table.getHeader().getCell(c, r)</td>
</tr>
<tr>
<td>td (tfoot)</td>
<td>Table.getFooterCell(c, r), Table.getFooter().getCell(c, r)</td>
</tr>
</tbody></table>
<h2 id="table-manipulation">Table manipulation</h2>
<p>With <code>Table</code> class, you can add and remove rows and columns at runtime. For changing content and styles, you need to retrieve the element from <code>Table</code> instance, and then manipulate the element properties directly.</p>
<p>To change number of rows, use <code>addRows</code> and <code>removeRows</code> methods.</p>
<p>To change number of columns, use <code>addColumns</code> and <code>removeColumns</code> methods. </p>
<p>The example below also shows how to change row height of each row in the table.</p>
<code-sandbox hash="68612916"><pre><code class="language-css">html hr {
margin: 5px;
}
i:empty {
padding-left: 20px;
}
.compact td, .compact th {
padding-top: 2px;
padding-bottom: 2px;
}
td:nth-child(1), th:nth-child(1) {
text-align: center;
}
#table_div {
height: 300px;
}
</code></pre>
<pre><code class="language-html"><button id="add_row_btn">Add row</button>
<button id="rem_row_btn">Remove row</button>
<i></i>
<label for="set_row_in">Set row count:</label>
<input id="set_row_in" type="number" value="6">
<hr>
<button id="add_col_btn">Add column</button>
<button id="rem_col_btn">Remove column</button>
<i></i>
<label for="set_col_in">Set col count:</label>
<input id="set_col_in" type="number" value="6">
<hr>
<button id="row_height_btn1">Compact row height</button>
<button id="row_height_btn2">Regular row height</button>
<button id="row_height_btn3">Spacious row height</button>
<i></i>
<label for="col_width_in">Set 1st column width:</label>
<input id="col_width_in" type="number" value="150">
<hr>
<div id="table_div"></div>
</code></pre>
<pre><code class="language-javascript">import { halo } from './theme-loader.js'; // This line is only required for demo purpose. It is not relevant for your application.
await halo(); // This line is only required for demo purpose. It is not relevant for your application.
/* ---------------------------------- Note ----------------------------------
DataGenerator, Formatters and extensions are exposed to global scope
in the bundle file to make it easier to create live examples.
Importing formatters and extensions is still required in your application.
Please see the document for further information.
---------------------------------------------------------------------------*/
var rowId = 0;
var tbl = new Table(document.getElementById("table_div"), {
colCount: 4,
rowCount: 7,
cellWidth: 100,
rowHeight: 30,
header: 1
});
var cells = tbl.getCellsInColumn(0);
cells.forEach(function(cell) {
cell.textContent = "" + (rowId++);
});
tbl.getHeader().getCellsInRow(0).forEach(function(cell, idx) {
cell.textContent = "Header " + (idx + 1);
});
tbl.getHeaderCell(0, 0).textContent = "Row id";
document.getElementById("add_row_btn").addEventListener("click", function(e) {
var ary = tbl.addRows();
var trElem = ary[0];
var cell = trElem.cells[0];
cell.textContent = "" + (rowId++);
});
document.getElementById("rem_row_btn").addEventListener("click", function(e) {
tbl.removeRows(1);
});
document.getElementById("set_row_in").addEventListener("change", function(e) {
var rowCount = +e.currentTarget.value;
if(rowCount !== rowCount) {
return; // Cannot process NaN value;
}
tbl.setRowCount(rowCount);
});
document.getElementById("add_col_btn").addEventListener("click", function(e) {
var colCount = tbl.getColumnCount();
tbl.addColumns();
tbl.getHeaderCell(colCount, 0).textContent = "Header " + (colCount + 1);
});
document.getElementById("rem_col_btn").addEventListener("click", function(e) {
tbl.removeColumns(1);
});
document.getElementById("set_col_in").addEventListener("change", function(e) {
var colCount = +e.currentTarget.value;
if(colCount !== colCount) {
return; // Cannot process NaN value;
}
tbl.setColumnCount(colCount);
});
document.getElementById("row_height_btn1").addEventListener("click", function(e) {
tbl.setDefaultRowHeight(24);
tbl.getElement().classList.add("compact");
});
document.getElementById("row_height_btn2").addEventListener("click", function(e) {
tbl.setDefaultRowHeight(30);
tbl.getElement().classList.remove("compact");
});
document.getElementById("row_height_btn3").addEventListener("click", function(e) {
tbl.setDefaultRowHeight(36);
tbl.getElement().classList.remove("compact");
});
document.getElementById("col_width_in").addEventListener("change", function(e) {
var width = +(e.currentTarget.value);
if(!width) {
width = 100;
}
tbl.setColMinWidths(width, 0);
});
</code></pre>
</code-sandbox><h2 id="cell-manipulation">Cell manipulation</h2>
<p><code>Table</code> class does not provide APIs for modifying its cells. However, you can get cell elements through various Table APIs.</p>
<p>To get a single cell element from the body section of the table, use <code>getCell</code> method.</p>
<p>To get all cell elements in a single column from the body section of the table, use <code>getCellsInColumn</code> method.</p>
<p>To get all cell elements in a single row from the body section of the table, use <code>getCellsInRow</code> method.</p>
<p>To set colSpan or rowSpan on a cell, use <code>spanBlock</code> method</p>
<p>Event listeners can be added on <code>Table</code> instance and its sub table (i.e., body section) for all native events. To add an event listener to <code>Table</code> instance, use <code>addEventListener</code> method.</p>
<p>The example below shows how to set cell span and get cell position from a <code>mousemove</code> event.</p>
<code-sandbox hash="e7c6060a"><pre><code class="language-css">html hr {
margin: 5px;
}
i:empty {
padding-left: 20px;
}
input[type="number"] {
width: 50px;
}
td:nth-child(1), th:nth-child(1) {
text-align: center;
}
#table_div {
display: inline-block;
}
#msg_ta {
height: 260px;
width: 150px;
vertical-align: top;
}
</code></pre>
<pre><code class="language-html"><button id="span_btn">Span cells</button>
<button id="reset_btn">Clear cell span</button>
<hr>
<span>Starting from:</span>
<input id="from_col_in" type="number" value="0">
<input id="from_row_in" type="number" value="0">
<i></i>
<span>Span size:</span>
<input id="col_span_in" type="number" value="2">
<input id="row_span_in" type="number" value="2">
<hr>
<div>
<div id="table_div"></div>
<textarea id="msg_ta"></textarea>
</div>
</code></pre>
<pre><code class="language-javascript">import { halo } from './theme-loader.js'; // This line is only required for demo purpose. It is not relevant for your application.
await halo(); // This line is only required for demo purpose. It is not relevant for your application.
/* ---------------------------------- Note ----------------------------------
DataGenerator, Formatters and extensions are exposed to global scope
in the bundle file to make it easier to create live examples.
Importing formatters and extensions is still required in your application.
Please see the document for further information.
---------------------------------------------------------------------------*/
var fields = ["id", "companyName", "market", "industry", "CF_LAST"];
var colCount = fields.length;
var rowCount = 10;
var records = DataGenerator.generateRecords(fields, rowCount);
var tbl = new Table(document.getElementById("table_div"), {
colCount: colCount,
rowCount: rowCount,
rowHeight: 30,
header: 1
});
tbl.setColumnWidths([50, 140, 90, 190, 90]);
var cells = tbl.getAllHeaderCells();
var cell;
var record;
cells.forEach(function(cell, idx) {
cell.textContent = fields[idx];
});
for(var r = 0; r < rowCount; ++r) {
record = records[r];
cells = tbl.getCellsInRow(r);
for(var c = 0; c < colCount; ++c) {
cell = cells[c];
cell.textContent = record[fields[c]];
}
}
var bodyTbl = tbl.getBody();
var headTbl = tbl.getHeader();
bodyTbl.addEventListener("mousemove", onMouseMoveOverBody);
function onMouseMoveOverBody(e) {
var colIndex = bodyTbl.getColumnIndex(e);
var rowIndex = bodyTbl.getRowIndex(e);
var cell = bodyTbl.getCell(colIndex, rowIndex);
var cellContent = cell ? cell.textContent : null;
var lines = [
"Column index: " + colIndex,
"Row index: " + rowIndex,
"Cell content: " + cellContent
];
msg_ta.value = lines.join("\n");
}
var fromColIn = document.getElementById("from_col_in");
var fromRowIn = document.getElementById("from_row_in");
var colSpanIn = document.getElementById("col_span_in");
var rowSpanIn = document.getElementById("row_span_in");
document.getElementById("span_btn").addEventListener("click", function(e) {
var c1 = +fromColIn.value;
var r1 = +fromRowIn.value;
var colSpan = +colSpanIn.value;
var rowSpan = +rowSpanIn.value;
var c2 = c1 + colSpan - 1;
var r2 = r1 + rowSpan - 1;
tbl.spanBlock(c1, c2, r1, r2);
});
document.getElementById("reset_btn").addEventListener("click", function(e) {
var c1 = +fromColIn.value;
var r1 = +fromRowIn.value;
tbl.spanBlock(c1, c1, r1, r1);
});
</code></pre>
</code-sandbox><h2 id="quoteline-example">QuoteLine example</h2>
<p>You are free to customize the table in any way you like. <code>Table</code> class is just a utility that helps you create HTML table and provide some APIs for accessing some part of the table.</p>
<code-sandbox hash="82a136b9"><pre><code class="language-css">html hr {
margin: 5px;
}
#table_div {
display: inline-block;
}
td.no-border-right, .no-border-right td {
border-right-width: 0;
}
td.no-border-left, .no-border-left td {
border-left-width: 0;
}
.big-font {
font-size: 2em;
}
.big-font td {
padding-top: 0;
padding-bottom: 0;
}
.blue-font-color {
color: #7777FF;
}
.red-font-color {
color: red;
}
.red-bg-color {
background-color: red;
}
.green-font-color {
color: green;
}
.align-center {
text-align: center;
}
</code></pre>
<pre><code class="language-html"><div id="table_div"></div>
</code></pre>
<pre><code class="language-javascript">import { halo } from './theme-loader.js'; // This line is only required for demo purpose. It is not relevant for your application.
await halo(); // This line is only required for demo purpose. It is not relevant for your application.
/* ---------------------------------- Note ----------------------------------
DataGenerator, Formatters and extensions are exposed to global scope
in the bundle file to make it easier to create live examples.
Importing formatters and extensions is still required in your application.
Please see the document for further information.
---------------------------------------------------------------------------*/
var tbl = new Table(table_div, {
colCount: 9,
rowCount: 8,
cellWidth: 100,
rowHeight: 30,
header: 1
});
tbl.setColMinWidths(30, 6);
tbl.setColMinWidths(110, 7);
tbl.setColMinWidths(110, 8);
var cellTexts = [
["", "GBP=", "", "", "", "1.1926", "/", "1.1930", "0.71%"],
["UK Pound Sterling/US Dollar FX Spot Rate", "", "", "", "", "SANTANDER", "", "HKG", "SAHK"],
["Change Summary", "", "Daily View", "", "", "Weekly", "", "Monthly", "Yearly"],
["MTD %", "-0.78 %", "O", 1.1843, "High", 1.2065, "", 1.2088, 1.2447],
["3M %", "-2.68 %", "H", 1.1936, "H Date", "01-Mar-2023", "", "01-Mar-2023", "23-Jan-2023"],
["6M %", "2.93 %", "L", 1.1832, "Low ", 1.1805, "", 1.1805, 1.1805],
["YTD %", "1.41 %", "C", 1.1842, "L Date", "08-Mar-2023", "", "08-Mar-2023", "08-Mar-2023"],
["Latest Trade", "", "09-Mar-2023 15:33", "", "", "", "", "", ""]
];
hideMiddleBorders(0, 1);
hideMiddleBorders(2, 3);
hideMiddleBorders(4, 5);
spanColumn(1, 0, 3);
spanColumn(2, 0, 1);
spanColumn(2, 2, 3);
spanColumn(7, 0, 1);
spanColumn(7, 2, 5);
tbl.getRow(0).classList.add("big-font");
tbl.getRow(2).classList.add("blue-font-color");
tbl.getCellsInColumn(6).forEach(addClass.bind(null, "align-center"));
tbl.getCellsInColumn(0).slice(2).forEach(addClass.bind(null, "blue-font-color"));
tbl.getCellsInColumn(2).slice(2).forEach(addClass.bind(null, "blue-font-color"));
tbl.getCellsInColumn(4).slice(2).forEach(addClass.bind(null, "blue-font-color"));
addClass("red-font-color", tbl.getCell(1, 3));
addClass("red-font-color", tbl.getCell(1, 4));
addClass("green-font-color", tbl.getCell(1, 5));
addClass("green-font-color", tbl.getCell(1, 6));
tbl.getCellsInRow(0).slice(5, 8).forEach(addClass.bind(null, "green-font-color"));
var colCount = tbl.getColumnCount();
var rowCount = tbl.getRowCount();
for(var r = 0; r < rowCount; ++r) {
var rowText = cellTexts[r];
for(var c = 0; c < colCount; ++c) {
var cellText = rowText[c];
var cell = tbl.getCell(c, r);
cell.textContent = cellText;
}
}
var newsIcon = document.createElement("ef-icon");
newsIcon.icon = "news";
addClass("blue-font-color", newsIcon);
tbl.getCell(0, 0).appendChild(newsIcon);
var downIcon = document.createElement("ef-icon");
downIcon.icon = "hollow-arrow-down";
addClass("red-font-color", downIcon);
tbl.getCell(2, 0).appendChild(downIcon);
addClass("red-bg-color", tbl.getCell(8, 0));
function spanColumn(rowIndex, c1, c2) {
tbl.spanBlock(c1, c2, rowIndex, rowIndex);
}
function hideMiddleBorders(c1, c2) {
var rowCount = tbl.getRowCount();
for(var r = 0; r < rowCount; ++r) {
var cell1 = tbl.getCell(c1, r);
var cell2 = tbl.getCell(c2, r);
cell1.classList.add("no-border-right");
cell2.classList.add("no-border-left");
}
}
function addClass(classStr, elem) {
elem.classList.add(classStr);
}
</code></pre>
</code-sandbox><h2 style="margin-bottom:5px" id="api-refs">Table API Reference</h2>
<div id="elf-api-container"><div id="main-template" class="elf-template"> <section><header> <h1 class="subsection-title"><span class="attribs"><span class="type-signature"></span></span>Table<span class="signature">(elem<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h1> </header><article> <h3 class="subsection-title" id="type_definitions">Type Definitions</h3>
<div class="item"> <div class="item-type">typedef</div> <h4 class="name" id="~Options">Options</h4><div class="description"> Options for Table initialization</div> <h5>Type:</h5> <span class="param-type">Object</span> <h5>Properties:</h5> <div class="props"><table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>colCount</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last">Number of columns</td> </tr> <tr> <td class="name"><code>rowCount</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last">Number of rows in content table (tbody)</td> </tr> <tr> <td class="name"><code>cellWidth</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> </td> <td class="description last">Default cell width of each column</td> </tr> <tr> <td class="name"><code>cellHeight</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> </td> <td class="description last">Default cell height of each row</td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> </td> <td class="description last">Total width of the table. If it is specified, it will override cellWidth</td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> </td> <td class="description last">Total height of the table. If it is specified, it will override cellHeight</td> </tr> <tr> <td class="name"><code>header</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last">Number of header rows</td> </tr> <tr> <td class="name"><code>footer</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last">Number of footer rows</td> </tr> </tbody></table></div><div class="details"> </div></div> <h3 class="subsection-title" id="methods">Methods</h3>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="addColumns"><span class="type-signature"></span>addColumns<span class="signature">(count<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="default"> [default: 1] </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of col elements (not td or cell)</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="addFooterRows"><span class="type-signature"></span>addFooterRows<span class="signature">(opt_count<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="addHeaderRows"><span class="type-signature"></span>addHeaderRows<span class="signature">(opt_count<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="addListener"><span class="type-signature"></span>addListener<span class="signature">(obj, type)</span><span class="type-signature"></span></h4> <div class="description"> A shorthand to retrieve function from an object and add it as an Eventlistener </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">obj</div> <div class="type"> <span class="param-type">Object</span> </div> <div class="description"> Object that contains a handler with the same name as the given `type` </div> </div> <div class="param"> <div class="name">type</div> <div class="type"> <span class="param-type">string</span> </div> <div class="description"> Event name </div> </div> </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="EventDispatcher.html#addListener">EventDispatcher#addListener</a> </dd> </div> <h5>Example:</h5> <pre><code>let obj = {"mouseUp": function(e) { console.log(e); }};
plugin.addListener(obj, "mouseUp");
plugin.addListener(obj, "mouseDown");</code></pre> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="addRows"><span class="type-signature"></span>addRows<span class="signature">(count<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="default"> [default: 1] </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="cloak"><span class="type-signature"></span>cloak<span class="signature">(tblElem)</span><span class="type-signature"></span></h4> <div class="description"> This will change size of the table </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">tblElem</div> <div class="type"> <span class="param-type">Element</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="distributeColumnWidth"><span class="type-signature"></span>distributeColumnWidth<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Distribute columns based on their textContent length </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="fixateTableWidth"><span class="type-signature"></span>fixateTableWidth<span class="signature">(opt_bool<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Try to make table to have fixed size. Table may not have a fixed size, if one of its column has no width (dynamic width). </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_bool</div> <div class="type"> <span class="param-type">boolean</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getAllCells"><span class="type-signature"></span>getAllCells<span class="signature">()</span><span class="type-signature"> → {Array.<Element>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of td (HTMLTableCellElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getAllFooterCells"><span class="type-signature"></span>getAllFooterCells<span class="signature">()</span><span class="type-signature"> → {Array.<Element>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of td (HTMLTableCellElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getAllHeaderCells"><span class="type-signature"></span>getAllHeaderCells<span class="signature">()</span><span class="type-signature"> → {Array.<Element>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of td (HTMLTableCellElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getAllRows"><span class="type-signature"></span>getAllRows<span class="signature">()</span><span class="type-signature"> → {Array.<Element>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getBody"><span class="type-signature"></span>getBody<span class="signature">()</span><span class="type-signature"> → {<a href="Sub#/utilities/native-table">SubTable</a>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type"><a href="Sub#/utilities/native-table">SubTable</a></span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getBoundingClientRect"><span class="type-signature"></span>getBoundingClientRect<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="ElementWrapper.html#getBoundingClientRect">ElementWrapper#getBoundingClientRect</a> </dd> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Object</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getCell"><span class="type-signature"></span>getCell<span class="signature">(c, r)</span><span class="type-signature"> → {Element}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getCellPosition"><span class="type-signature"></span>getCellPosition<span class="signature">(cell, ret_obj<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">cell</div> <div class="type"> <span class="param-type">Element</span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">ret_obj</div> <div class="type"> <span class="param-type">Object</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Object</span> </div><div class="sub-content-desc"> Object with x and y property</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getCellsInColumn"><span class="type-signature"></span>getCellsInColumn<span class="signature">(c)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of td (HTMLTableCellElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getCellsInRow"><span class="type-signature"></span>getCellsInRow<span class="signature">(r)</span><span class="type-signature"> → {Array.<Element>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of td (HTMLTableCellElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getCellTextContent"><span class="type-signature"></span>getCellTextContent<span class="signature">(c, r)</span><span class="type-signature"> → {string}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">string</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getColumnCount"><span class="type-signature"></span>getColumnCount<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getColumnIndex"><span class="type-signature"></span>getColumnIndex<span class="signature">(e)</span><span class="type-signature"> → {number}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">e</div> <div class="type"> <span class="param-type">Event</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getColumnLeft"><span class="type-signature"></span>getColumnLeft<span class="signature">(colIndex, rowIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {number}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">rowIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getColumnTextContent"><span class="type-signature"></span>getColumnTextContent<span class="signature">(c)</span><span class="type-signature"> → {string}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">string</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getDefaultColumnWidth"><span class="type-signature"></span>getDefaultColumnWidth<span class="signature">()</span><span class="type-signature"> → {number|null}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> | <span class="param-type">null</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getDefaultRowHeight"><span class="type-signature"></span>getDefaultRowHeight<span class="signature">()</span><span class="type-signature"> → {number|null}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> | <span class="param-type">null</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getElement"><span class="type-signature"></span>getElement<span class="signature">()</span><span class="type-signature"> → {Element}</span></h4> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="ElementWrapper.html#getElement">ElementWrapper#getElement</a> </dd> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getFooter"><span class="type-signature"></span>getFooter<span class="signature">()</span><span class="type-signature"> → {<a href="Sub#/utilities/native-table">SubTable</a>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type"><a href="Sub#/utilities/native-table">SubTable</a></span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getFooterCell"><span class="type-signature"></span>getFooterCell<span class="signature">(c, r)</span><span class="type-signature"> → {Element}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getHeader"><span class="type-signature"></span>getHeader<span class="signature">()</span><span class="type-signature"> → {<a href="Sub#/utilities/native-table">SubTable</a>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type"><a href="Sub#/utilities/native-table">SubTable</a></span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getHeaderCell"><span class="type-signature"></span>getHeaderCell<span class="signature">(c, r)</span><span class="type-signature"> → {Element}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getListener"><span class="type-signature"></span>getListener<span class="signature">(type, idx<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {function}</span></h4> <div class="description"> Get event listener (function handler) from the specified event. </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">type</div> <div class="type"> <span class="param-type">string</span> </div> <div class="attributes"> </div> <div class="default"> </div> <div class="description"> Event name </div> </div> <div class="param"> <div class="name">idx</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="default"> [default: 0] </div> <div class="description"> Index of the listener to be retrieved. This is used when there are multiple event listeners </div> </div> </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="EventDispatcher.html#getListener">EventDispatcher#getListener</a> </dd> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">function</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getMousePosition"><span class="type-signature"></span>getMousePosition<span class="signature">(e, retObj<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4> <div class="description"> Get mouse position relative to this element </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">e</div> <div class="type"> <span class="param-type">Event</span> </div> <div class="attributes"> </div> <div class="description"> MouseEvent should be given </div> </div> <div class="param"> <div class="name">retObj</div> <div class="type"> <span class="param-type">Object</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="ElementWrapper.html#getMousePosition">ElementWrapper#getMousePosition</a> </dd> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Object</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRow"><span class="type-signature"></span>getRow<span class="signature">(r)</span><span class="type-signature"> → {Element}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRowCount"><span class="type-signature"></span>getRowCount<span class="signature">()</span><span class="type-signature"> → {number}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRowIndex"><span class="type-signature"></span>getRowIndex<span class="signature">(e)</span><span class="type-signature"> → {number}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">e</div> <div class="type"> <span class="param-type">Event</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRows"><span class="type-signature"></span>getRows<span class="signature">()</span><span class="type-signature"> → {Array.<Element>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Element></span> </div><div class="sub-content-desc"> Array of tr (HTMLTableRowElement) elements</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRowTextContent"><span class="type-signature"></span>getRowTextContent<span class="signature">(r)</span><span class="type-signature"> → {string}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">string</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getRowTop"><span class="type-signature"></span>getRowTop<span class="signature">(rowRef)</span><span class="type-signature"> → {number}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">rowRef</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">Element</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">number</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getTableElement"><span class="type-signature"></span>getTableElement<span class="signature">()</span><span class="type-signature"> → {Element}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getTableTextContent"><span class="type-signature"></span>getTableTextContent<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">string</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="getTextContents"><span class="type-signature"></span>getTextContents<span class="signature">()</span><span class="type-signature"> → {Array.<Array.<string>>}</span></h4> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Array.<string>></span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="hasListener"><span class="type-signature"></span>hasListener<span class="signature">(type)</span><span class="type-signature"> → {boolean}</span></h4> <div class="description"> Check whether the specified event has a function handler. </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">type</div> <div class="type"> <span class="param-type">string</span> </div> <div class="description"> Event name </div> </div> </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="EventDispatcher.html#hasListener">EventDispatcher#hasListener</a> </dd> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">boolean</span> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="init"><span class="type-signature"></span>init<span class="signature">(options)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">options</div> <div class="type"> <span class="param-type"><a href="#/utilities/native-table#~Options">Table~Options</a></span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="log"><span class="type-signature"></span>log<span class="signature">(opt_rowLimit<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<Object>}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_rowLimit</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Array.<Object></span> </div><div class="sub-content-desc"> Array of rows that just log in console</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="loosenTableWidth"><span class="type-signature"></span>loosenTableWidth<span class="signature">(opt_bool<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <div class="description"> Opposite of <a href="#/utilities/native-table#fixateTableWidth">Table#fixateTableWidth</a> </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_bool</div> <div class="type"> <span class="param-type">boolean</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeAllColumns"><span class="type-signature"></span>removeAllColumns<span class="signature">()</span><span class="type-signature"></span></h4> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeAllEventListeners"><span class="type-signature"></span>removeAllEventListeners<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Remove all function handlers from all events. </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="EventDispatcher.html#removeAllEventListeners">EventDispatcher#removeAllEventListeners</a> </dd> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeAllRows"><span class="type-signature"></span>removeAllRows<span class="signature">()</span><span class="type-signature"></span></h4> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeColumns"><span class="type-signature"></span>removeColumns<span class="signature">(opt_count<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeFooterRows"><span class="type-signature"></span>removeFooterRows<span class="signature">(opt_count<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeHeaderRows"><span class="type-signature"></span>removeHeaderRows<span class="signature">(opt_count<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">opt_count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="removeRows"><span class="type-signature"></span>removeRows<span class="signature">(count<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">count</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Number of rows to be removed. If count is not specified, all rows are removed </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setCellSize"><span class="type-signature"></span>setCellSize<span class="signature">(defaultWidth, defaultHeight)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">defaultWidth</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">defaultHeight</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColBackgroundColors"><span class="type-signature"></span>setColBackgroundColors<span class="signature">(val, colIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">string</span> | <span class="param-type">Array.<string></span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Column index </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColBGColors"><span class="type-signature"></span>setColBGColors<span class="signature">(val, colIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">string</span> | <span class="param-type">Array.<string></span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Column index </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColBorders"><span class="type-signature"></span>setColBorders<span class="signature">(val, colIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> | <span class="param-type">Array.<(number|string)></span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Column index </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColMinWidths"><span class="type-signature"></span>setColMinWidths<span class="signature">(val, colIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> | <span class="param-type">Array.<(string|number)></span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Column index </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColumnCount"><span class="type-signature"></span>setColumnCount<span class="signature">(val)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setColumnWidths"><span class="type-signature"></span>setColumnWidths<span class="signature">(val, colIndex<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> | <span class="param-type">Array.<(string|number)></span> </div> <div class="attributes"> </div> </div> <div class="param"> <div class="name">colIndex</div> <div class="type"> <span class="param-type">number</span> </div> <div class="attributes"> <optional> </div> <div class="description"> Column index </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setCRWH"><span class="type-signature"></span>setCRWH<span class="signature">(col, row, width, height)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">col</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">row</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">width</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">height</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setDefaultColumnWidth"><span class="type-signature"></span>setDefaultColumnWidth<span class="signature">(val<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">null</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setDefaultRowHeight"><span class="type-signature"></span>setDefaultRowHeight<span class="signature">(val<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> | <span class="param-type">null</span> </div> <div class="attributes"> <optional> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setParent"><span class="type-signature"></span>setParent<span class="signature">(parent)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">parent</div> <div class="type"> <span class="param-type">Node</span> | <span class="param-type"><a href="ElementWrapper.html">ElementWrapper</a></span> </div> </div> </div> <div class="details"> <dt class="inherited-from">Inherited From:</dt> <dd class="inherited-from"> <a href="ElementWrapper.html#setParent">ElementWrapper#setParent</a> </dd> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setRowCount"><span class="type-signature"></span>setRowCount<span class="signature">(val)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">val</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="setSize"><span class="type-signature"></span>setSize<span class="signature">(width, height)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">width</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">height</div> <div class="type"> <span class="param-type">number</span> </div> </div> </div> <div class="details"> </div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="spanBlock"><span class="type-signature"></span>spanBlock<span class="signature">(c1, c2, r1, r2)</span><span class="type-signature"> → {Element}</span></h4> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">c1</div> <div class="type"> <span class="param-type">number</span> </div> <div class="description"> Starting column index </div> </div> <div class="param"> <div class="name">c2</div> <div class="type"> <span class="param-type">number</span> </div> <div class="description"> Destination column index </div> </div> <div class="param"> <div class="name">r1</div> <div class="type"> <span class="param-type">number</span> </div> <div class="description"> Starting row index </div> </div> <div class="param"> <div class="name">r2</div> <div class="type"> <span class="param-type">number</span> </div> <div class="description"> Destination row index </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div><div class="sub-content-desc"> Top left cell element</div> </div>
<div class="item"> <div class="item-type">function</div> <h4 class="name" id="spanHorizontally"><span class="type-signature"></span>spanHorizontally<span class="signature">(r, bool)</span><span class="type-signature"> → {Element}</span></h4> <div class="description"> Horizontally span the cell from the first column to cover the entire row. This is useful for creating header row </div> <h5>Parameters:</h5> <div class="params"> <div class="param"> <div class="name">r</div> <div class="type"> <span class="param-type">number</span> </div> </div> <div class="param"> <div class="name">bool</div> <div class="type"> <span class="param-type">boolean</span> </div> </div> </div> <div class="details"> </div> <h5>Returns:</h5> <div class="sub-content"> <span class="param-type">Element</span> </div><div class="sub-content-desc"> Top left cell element</div> </div> </article></section></div></div>