本文整理匯總了TypeScript中vs/base/browser/ui/grid/gridview.GridView類的典型用法代碼示例。如果您正苦於以下問題:TypeScript GridView類的具體用法?TypeScript GridView怎麽用?TypeScript GridView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了GridView類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
test('addviews before layout call 2', function () {
const view1 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE);
gridview.addView(view1, 200, [0]);
const view2 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE);
gridview.addView(view2, 200, [0]);
const view3 = new TestView(50, Number.MAX_VALUE, 50, Number.MAX_VALUE);
gridview.addView(view3, 200, [0, 0]);
gridview.layout(800, 600);
assert.deepEqual(view1.size, [800, 300]);
assert.deepEqual(view2.size, [400, 300]);
assert.deepEqual(view3.size, [400, 300]);
});
示例2: TestView
test('gridview addView nested', function () {
const views = [
new TestView(20, 20, 20, 20),
[
new TestView(20, 20, 20, 20),
new TestView(20, 20, 20, 20)
]
];
gridview.addView(views[0] as IView, 200, [0]);
gridview.addView(views[1][0] as IView, 200, [1]);
gridview.addView(views[1][1] as IView, 200, [1, 1]);
assert.deepEqual(nodesToArrays(gridview.getViews()), views);
gridview.dispose();
});
示例3:
assert.throws(() => gridview.addView(view, 200, [0, 0]), 'hierarchy overflow');