本文整理汇总了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');