0
|
1 /*
|
|
2 * TableGui.js
|
|
3 *
|
|
4 * Copyright (c) 2012, Stefan Jänicke. All rights reserved.
|
|
5 *
|
|
6 * This library is free software; you can redistribute it and/or
|
|
7 * modify it under the terms of the GNU Lesser General Public
|
|
8 * License as published by the Free Software Foundation; either
|
|
9 * version 3 of the License, or (at your option) any later version.
|
|
10 *
|
|
11 * This library is distributed in the hope that it will be useful,
|
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 * Lesser General Public License for more details.
|
|
15 *
|
|
16 * You should have received a copy of the GNU Lesser General Public
|
|
17 * License along with this library; if not, write to the Free Software
|
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
|
19 * MA 02110-1301 USA
|
|
20 */
|
|
21
|
|
22 /**
|
|
23 * @class TableGui
|
|
24 * Table GUI Implementation
|
|
25 * @author Stefan Jänicke (stjaenicke@informatik.uni-leipzig.de)
|
|
26 * @release 1.0
|
|
27 * @release date: 2012-07-27
|
|
28 * @version date: 2012-07-27
|
|
29 *
|
|
30 * @param {TableWidget} parent table widget object
|
|
31 * @param {HTML object} div parent div to append the table gui
|
|
32 * @param {JSON} options table configuration
|
|
33 */
|
|
34 function TableGui(table, div, options) {
|
|
35
|
|
36 this.tableContainer = div;
|
|
37 if (options.tableWidth) {
|
|
38 this.tableContainer.style.width = options.tableWidth;
|
|
39 }
|
|
40 if (options.tableHeight) {
|
|
41 this.tableContainer.style.height = options.tableHeight;
|
|
42 }
|
|
43 this.tableContainer.style.position = 'relative';
|
|
44
|
|
45 this.tabs = document.createElement('div');
|
|
46 this.tabs.setAttribute('class', 'tableTabs');
|
|
47 div.appendChild(this.tabs);
|
|
48
|
|
49 this.input = document.createElement('div');
|
|
50 this.input.setAttribute('class', 'tableInput');
|
|
51 div.appendChild(this.input);
|
|
52
|
|
53 };
|