OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * | 10 * |
(...skipping 27 matching lines...) Expand all Loading... |
38 viewForFile(uiSourceCode) {}, | 38 viewForFile(uiSourceCode) {}, |
39 }; | 39 }; |
40 | 40 |
41 /** | 41 /** |
42 * @unrestricted | 42 * @unrestricted |
43 */ | 43 */ |
44 Sources.TabbedEditorContainer = class extends Common.Object { | 44 Sources.TabbedEditorContainer = class extends Common.Object { |
45 /** | 45 /** |
46 * @param {!Sources.TabbedEditorContainerDelegate} delegate | 46 * @param {!Sources.TabbedEditorContainerDelegate} delegate |
47 * @param {!Common.Setting} setting | 47 * @param {!Common.Setting} setting |
48 * @param {string} placeholderText | 48 * @param {!Element} placeholderElement |
49 */ | 49 */ |
50 constructor(delegate, setting, placeholderText) { | 50 constructor(delegate, setting, placeholderElement) { |
51 super(); | 51 super(); |
52 this._delegate = delegate; | 52 this._delegate = delegate; |
53 | 53 |
54 this._tabbedPane = new UI.TabbedPane(); | 54 this._tabbedPane = new UI.TabbedPane(); |
55 this._tabbedPane.setPlaceholderText(placeholderText); | 55 this._tabbedPane.setPlaceholderElement(placeholderElement); |
56 this._tabbedPane.setTabDelegate(new Sources.EditorContainerTabDelegate(this)
); | 56 this._tabbedPane.setTabDelegate(new Sources.EditorContainerTabDelegate(this)
); |
57 | 57 |
58 this._tabbedPane.setCloseableTabs(true); | 58 this._tabbedPane.setCloseableTabs(true); |
59 this._tabbedPane.setAllowTabReorder(true, true); | 59 this._tabbedPane.setAllowTabReorder(true, true); |
60 | 60 |
61 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this._tabC
losed, this); | 61 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabClosed, this._tabC
losed, this); |
62 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ta
bSelected, this); | 62 this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._ta
bSelected, this); |
63 | 63 |
64 Persistence.persistence.addEventListener( | 64 Persistence.persistence.addEventListener( |
65 Persistence.Persistence.Events.BindingCreated, this._onBindingCreated, t
his); | 65 Persistence.Persistence.Events.BindingCreated, this._onBindingCreated, t
his); |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 /** | 809 /** |
810 * @override | 810 * @override |
811 * @param {string} tabId | 811 * @param {string} tabId |
812 * @param {!UI.ContextMenu} contextMenu | 812 * @param {!UI.ContextMenu} contextMenu |
813 */ | 813 */ |
814 onContextMenu(tabId, contextMenu) { | 814 onContextMenu(tabId, contextMenu) { |
815 this._editorContainer._onContextMenu(tabId, contextMenu); | 815 this._editorContainer._onContextMenu(tabId, contextMenu); |
816 } | 816 } |
817 }; | 817 }; |
OLD | NEW |