本文整理匯總了TypeScript中phosphor-dockpanel.DockPanel.insertBottom方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript DockPanel.insertBottom方法的具體用法?TypeScript DockPanel.insertBottom怎麽用?TypeScript DockPanel.insertBottom使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phosphor-dockpanel.DockPanel
的用法示例。
在下文中一共展示了DockPanel.insertBottom方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: main
/**
* The main application entry point.
*/
function main(): void {
var r1 = createContent('Red');
var r2 = createContent('Red');
var r3 = createContent('Red');
var b1 = createContent('Blue');
var b2 = createContent('Blue');
var g1 = createContent('Green');
var g2 = createContent('Green');
var g3 = createContent('Green');
var y1 = createContent('Yellow');
var y2 = createContent('Yellow');
var panel = new DockPanel();
panel.id = 'main';
var cmSource = new CodeMirrorWidget({
mode: 'text/typescript',
lineNumbers: true,
tabSize: 2,
});
cmSource.loadTarget('./index.ts');
cmSource.title.text = 'Source';
var cmCss = new CodeMirrorWidget({
mode: 'text/css',
lineNumbers: true,
tabSize: 2,
});
cmCss.loadTarget('./index.css');
cmCss.title.text = 'CSS';
panel.insertLeft(cmSource);
panel.insertRight(b1, cmSource);
panel.insertBottom(y1, b1);
panel.insertLeft(g1, y1);
panel.insertBottom(b2);
panel.insertTabAfter(cmCss, cmSource);
panel.insertTabAfter(r1, cmCss);
panel.insertTabBefore(g2, b2);
panel.insertTabBefore(y2, g2);
panel.insertTabBefore(g3, y2);
panel.insertTabBefore(r2, b1);
panel.insertTabBefore(r3, y1);
panel.attach(document.body);
window.onresize = () => { panel.update() };
}
示例2: createSidePanel
function createSidePanel(app: App): DockPanel {
let panel = new DockPanel();
let pianoRollWidget = new PianoRoll();
let instrumentWidget = new InstrumentEditor();
let oscWidget = new Oscilloscope();
panel.insertRight(instrumentWidget);
panel.insertRight(oscWidget, instrumentWidget);
panel.insertBottom(pianoRollWidget);
return panel;
}
示例3: createContent
let g1 = createContent('White');
g1.id = 'my-plot-container';
let g2 = createContent('Green');
let g3 = createContent('Green');
let y1 = createContent('Yellow');
y1.id = 'my-hero-form-container';
let y2 = createContent('Yellow');
let panel = new DockPanel();
panel.id = 'main';
panel.insertBottom(y1);
panel.insertLeft(g1, y1);
panel.insertBottom(b2);
panel.insertTabBefore(g2, b2);
panel.insertTabBefore(y2, g2);
panel.insertTabBefore(g3, y2);
panel.insertTabBefore(r3, y1);
panel.insertLeft(b1);
panel.insertBottom(r1, b1);
panel.insertTabBefore(r2, b1);
panel.attach(document.body);
window.onresize = () => { panel.update(); };