OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 /** | 453 /** |
454 * @param {string=} text | 454 * @param {string=} text |
455 */ | 455 */ |
456 constructor(text) { | 456 constructor(text) { |
457 super(createElementWithClass('div', 'toolbar-text')); | 457 super(createElementWithClass('div', 'toolbar-text')); |
458 this.element.classList.add('toolbar-text'); | 458 this.element.classList.add('toolbar-text'); |
459 this.setText(text || ''); | 459 this.setText(text || ''); |
460 } | 460 } |
461 | 461 |
462 /** | 462 /** |
| 463 * @return {string} |
| 464 */ |
| 465 text() { |
| 466 return this.element.textContent; |
| 467 } |
| 468 |
| 469 /** |
463 * @param {string} text | 470 * @param {string} text |
464 */ | 471 */ |
465 setText(text) { | 472 setText(text) { |
466 this.element.textContent = text; | 473 this.element.textContent = text; |
467 } | 474 } |
468 }; | 475 }; |
469 | 476 |
470 /** | 477 /** |
471 * @unrestricted | 478 * @unrestricted |
472 */ | 479 */ |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 /** | 1076 /** |
1070 * @param {!Common.Setting} setting | 1077 * @param {!Common.Setting} setting |
1071 * @param {string=} tooltip | 1078 * @param {string=} tooltip |
1072 * @param {string=} alternateTitle | 1079 * @param {string=} alternateTitle |
1073 */ | 1080 */ |
1074 constructor(setting, tooltip, alternateTitle) { | 1081 constructor(setting, tooltip, alternateTitle) { |
1075 super(alternateTitle || setting.title() || '', tooltip); | 1082 super(alternateTitle || setting.title() || '', tooltip); |
1076 UI.SettingsUI.bindCheckbox(this.inputElement, setting); | 1083 UI.SettingsUI.bindCheckbox(this.inputElement, setting); |
1077 } | 1084 } |
1078 }; | 1085 }; |
OLD | NEW |