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


TypeScript DockPanel.insertBottom方法代碼示例

本文整理匯總了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() };
}
開發者ID:SimonBiggs,項目名稱:phosphorjs.github.io,代碼行數:56,代碼來源:index.ts

示例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;
  }
開發者ID:munshkr,項目名稱:gakuon-editor,代碼行數:13,代碼來源:panel.ts

示例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(); };
開發者ID:SimonBiggs,項目名稱:angular-phosphor,代碼行數:31,代碼來源:index.ts


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