調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >blockRendering >ConstantProvider >setTheme
blockRendering.ConstantProvider.setTheme() メソッド
テーマに依存する定数プロパティを更新します。
署名:
setTheme(theme: Theme): void;
パラメータ
パラメータ |
型 |
説明 |
テーマ |
テーマ |
現在のワークスペースのテーマ。 |
戻り値:
void
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-29 UTC。
[null,null,["最終更新日 2024-08-29 UTC。"],[[["The `blockRendering.ConstantProvider.setTheme()` method updates the constant properties of a block rendering based on the provided theme."],["This method accepts a single parameter, `theme`, which is an instance of the `Theme` class representing the current workspace theme."],["Calling `setTheme()` ensures that visual elements of blocks are aligned with the active theme, maintaining consistency in the workspace appearance."]]],["The `setTheme()` method within the `ConstantProvider` class updates constant properties based on the workspace's current theme. It accepts a `Theme` object as input, which dictates the visual styles. This method does not return any value. Its purpose is to refresh the rendering constants when the workspace theme is changed.\n"]]