Windchill のその他の機能 > 製造プロセス管理 > MPMLink ブラウザのカスタマイズ > 関連構造ブラウザへの操作アイコンの追加
  
関連構造ブラウザへの操作アイコンの追加
関連構造ブラウザ内のテーブルは、次の方法でカスタマイズできます。
新規ステータス列を追加する。詳細については、属性のカスタマイズを参照してください。
操作アイコンを追加する。
操作アイコンの追加
独立したカスタム操作を起動するアイコンを作成するには、次の手順に従います。
1. LogicSeparatedDataUtility を実装し、getPlainDataValue メソッドをオーバーライドするクラスを作成して、アイコンのコンポーネントをテーブルコンポーネントに追加します。たとえば、CustomStatusDataUtility:
@Override
public Object getPlainDataValue(String component_id, Object datum, ModelContext mc) throws WTException {
JSONObject icon_object = new JSONObject();
try {
WTProperties serverProperties = null;
serverProperties = WTProperties.getServerProperties();
String serverBaseURL = serverProperties.getProperty("wt.server.codebase");
icon_object.put("type", "icon");
icon_object.put("iconPath", serverBaseURL + "/netmarkets/images/<icon_file>");
icon_object.put("tooltip", getLabel(component_id, mc));
icon_object.put("target", "_top");
NmObject obj = getNmObject(mc);
String oid = obj.getOid().toString();
icon_object.put("link", "app/#ptc1/tcomp/infoPage?oid=" + oid);
} catch (Exception e) {
throw new WTException(e);
}
return icon_object.toJSONString();
という名前のサブクラスを使用します。
2. getColumnId メソッドを実装し、一意な識別子を返すよう CustomStatusDataUtility サブクラスを設定します。この例では、customStatusAction789:
@Override
protected String getColumnId() {
return "customStatusAction789";
}
です。
3. タイプおよび属性の管理ユーティリティで、「計算」属性を作成します。たとえば、customStatusAction789 です。このエントリを <Windchill>\codebase\LogicalAttributes.xml:
<class name="wt.part.WTPart">
...
<Property>
<LogicalForm>customStatusAction789</LogicalForm>
<ExternalForm>NPA|customStatusAction789</ExternalForm>
</Property>
</class>
に追加します。
4. 新しく作成した計算属性を <Windchill>\codebase\com\ptc\core\htmlcomp\createtableview\AvailableAttributes.xml:
<Class name="wt.part.WTPart">
...
<Attribute id="customStatusAction789"/>
</Class>
に追加して有効化します。