當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript gridview.GridView類代碼示例

本文整理匯總了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]);
	});
開發者ID:burhandodhy,項目名稱:azuredatastudio,代碼行數:17,代碼來源:gridview.test.ts

示例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();
	});
開發者ID:burhandodhy,項目名稱:azuredatastudio,代碼行數:18,代碼來源:gridview.test.ts

示例3:

		assert.throws(() => gridview.addView(view, 200, [0, 0]), 'hierarchy overflow');
開發者ID:burhandodhy,項目名稱:azuredatastudio,代碼行數:1,代碼來源:gridview.test.ts


注:本文中的vs/base/browser/ui/grid/gridview.GridView類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。