表示設定エディター

表示設定エディター・Bean は、 IlvJDisplayPreferencesEditorPanel クラスによって表されます。この Bean を使用すると、選択した単位に地図ビューを設定することができます。
表示設定エディターの例を、「表示設定エディター」に示します。
displayprefeditor.png
表示設定エディター

アプリケーションへの Bean の包含

表示設定 Bean をアプリケーションに含めるには、まずパネルを作成する必要があります。
IlvJDisplayPreferencesEditorPanel prefsPanel = new 
IlvJDisplayPreferencesEditorPanel();
現在のビューの設定プロパティーを Bean に設定します。
prefsPanel.setDisplayPreferences(IlvDisplayPreferencesProperty.GetDisplayPreferences(view.getManager()));
次のようにして、ユーザーが設定を変更したときに、ビュー設定を変更する Bean にリスナーを追加できます。
prefsPanel.addDisplayPreferencesChangeListener(new PropertyChangeListener() {
  public void propertyChange(PropertyChangeEvent e) {
    IlvDisplayPreferences system = (IlvDisplayPreferences) e.getNewValue();
    view.getManager().setNamedProperty(new 
IlvDisplayPreferencesProperty(system));
  }
});

Swing 階層への Bean の追加

次のようにして、この Bean を Swing 階層に追加することができます。
panel.add(prefsPanel, BorderLayout.WEST);

API の使用による Bean 項目の定義

API を使用して、 setAltitudeUnit setDistanceUnit, setUsingGeodeticComputation または setCoordinateFormatter メソッドで Bean 内で選択された距離あるいは高度の単位、日付変更線ラッピング、または座標フォーマッターを定義することもできます。