DescribeIconResult クラス
名前空間
使用方法
Schema.DescribeTabResult クラスの getIcons メソッドは、タブに使用する色を示す Schema.DescribeIconResult オブジェクトのリストを返します。
Schema.DescribeIconResult クラスのメソッドは、対応するプロパティを使用してコールできます。get で始まる各メソッドでは、get プレフィックスと末尾の括弧 () を省略して対応するプロパティをコールできます。たとえば、iconResultObj.url は iconResultObj.getUrl() と同じです。
例
このサンプルでは、Sales アプリケーションの最初のタブの最初のアイコンの情報を取得する方法を示します。
1swfobject.registerObject("clippy.codeblock-0", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17// Get tab set describes for each app
18List<Schema.DescribeTabSetResult> tabSetDesc = Schema.describeTabs();
19
20// Iterate through each tab set
21for(Schema.DescribeTabSetResult tsr : tabSetDesc) {
22 // Get tab info for the Sales app
23 if (tsr.getLabel() == 'Sales') {
24 // Get icon information for the first tab
25 List<Schema.DescribeIconResult> iconDesc = tsr.getTabs()[0].getIcons();
26 // Display the icon height and width of the first icon
27 System.debug('Height: ' + iconDesc[0].getHeight());
28 System.debug('Width: ' + iconDesc[0].getWidth());
29 }
30}
31
32// Example debug statement output
33// DEBUG|Height: 32
34// DEBUG|Width: 32DescribeIconResult メソッド
DescribeIconResult のメソッドは��のとおりです。すべてインスタンスメソッドです。
getTheme()
タブのアイコンのテーマを返します。
署名
public String getTheme()
戻り値
型: String
テーマに使用できる値には、theme3、theme4、および custom があります。
- theme3 は Spring '10 で導入された、Salesforce テーマです。
- theme4 は、Salesforce のモバイルタッチスクリーンバージョン向けの Winter '14 で導入された、Salesforce テーマです。
- custom はカスタムアイコンに関連付けられたテーマの名前です。