# src/scripts/CDP/UI/listview/ExpandableListView.js

## Maintainability

78.51

## Lines of code

122

## Difficulty

38.14

## Estimated Errors

1.06

## Function weight

### By Complexity

### By SLOC

var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var CDP; (function (CDP) { var UI; (function (UI) { var TAG = "[CDP.UI.ExpandableListView] "; /** * @class ExpandableListView * @brief 開閉機能を備えた仮想リストビュークラス */ var ExpandableListView = /** @class */ (function (_super) { __extends(ExpandableListView, _super); /** * constructor * * @param options {ListViewConstructOptions} [in] オプション */ function ExpandableListView(options) { var _this = _super.call(this, options) || this; _this._statusMgr = null; _this._expandManager = null; _this._statusMgr = new UI.StatusManager(); _this._expandManager = new UI.ExpandManager(_this); return _this; } /////////////////////////////////////////////////////////////////////// // Implements: IExpandableListView //! 新規 GroupProfile を作成 ExpandableListView.prototype.newGroup = function (id) { return this._expandManager.newGroup(id); }; //! 登録済み Group を取得 ExpandableListView.prototype.getGroup = function (id) { return this._expandManager.getGroup(id); }; //! 第1階層の Group 登録 ExpandableListView.prototype.registerTopGroup = function (topGroup) { this._expandManager.registerTopGroup(topGroup); }; //! 第1階層の Group を取得 ExpandableListView.prototype.getTopGroups = function () { return this._expandManager.getTopGroups(); }; //! すべてのグループを展開 (1階層) ExpandableListView.prototype.expandAll = function () { this._expandManager.expandAll(); }; //! すべてのグループを収束 (1階層) ExpandableListView.prototype.collapseAll = function (delay) { this._expandManager.collapseAll(delay); }; //! 展開中か判定 ExpandableListView.prototype.isExpanding = function () { return this._expandManager.isExpanding(); }; //! 収束中か判定 ExpandableListView.prototype.isCollapsing = function () { return this._expandManager.isCollapsing(); }; //! 開閉中か判定 ExpandableListView.prototype.isSwitching = function () { return this._expandManager.isSwitching(); }; //! 状態変数の参照カウントのインクリメント ExpandableListView.prototype.statusAddRef = function (status) { return this._statusMgr.statusAddRef(status); }; //! 状態変数の参照カウントのデクリメント ExpandableListView.prototype.statusRelease = function (status) { return this._statusMgr.statusRelease(status); }; //! 処理スコープ毎に状態変数を設定 ExpandableListView.prototype.statusScope = function (status, callback) { this._statusMgr.statusScope(status, callback); }; //! 指定した状態中であるか確認 ExpandableListView.prototype.isStatusIn = function (status) { return this._statusMgr.isStatusIn(status); }; Object.defineProperty(ExpandableListView.prototype, "layoutKey", { //! layout key を取得 get: function () { return this._expandManager.layoutKey; }, //! layout key を設定 set: function (key) { this._expandManager.layoutKey = key; }, enumerable: true, configurable: true }); /////////////////////////////////////////////////////////////////////// // Override: ListView //! データを破棄 ExpandableListView.prototype.release = function () { _super.prototype.release.call(this); this._expandManager.release(); }; //! 内部データをバックアップ ExpandableListView.prototype.backup = function (key) { return this._expandManager.backup(key); }; //! 内部データをリストア ExpandableListView.prototype.restore = function (key, rebuild) { if (rebuild === void 0) { rebuild = true; } return this._expandManager.restore(key, rebuild); }; return ExpandableListView; }(UI.ListView)); UI.ExpandableListView = ExpandableListView; })(UI = CDP.UI || (CDP.UI = {})); })(CDP || (CDP = {})); //# sourceMappingURL=data:application/json;base64,