Display Preferences Editor

The Display Preferences Editor bean is represented by the IlvJDisplayPreferencesEditorPanel class. This bean enables users to set a map view to the units of their choice.
An example of the Display Preferences Editor is shown in Display Preferences Editor .
displayprefeditor.png
Display Preferences Editor

Including the bean in an application

To include the Display Preferences Editor bean in your application, you first need to create the panel:
IlvJDisplayPreferencesEditorPanel prefsPanel = new 
IlvJDisplayPreferencesEditorPanel();
Set the current preference properties of the view in the bean:
prefsPanel.setDisplayPreferences(IlvDisplayPreferencesProperty.GetDisplayPreferences(view.getManager()));
Then, you can add a listener on the bean that changes the view preferences when the user changes a preference:
prefsPanel.addDisplayPreferencesChangeListener(new PropertyChangeListener() {
  public void propertyChange(PropertyChangeEvent e) {
    IlvDisplayPreferences system = (IlvDisplayPreferences) e.getNewValue();
    view.getManager().setNamedProperty(new 
IlvDisplayPreferencesProperty(system));
  }
});

Adding the bean to a Swing hierarchy

You can then add this bean to your Swing hierarchy.
panel.add(prefsPanel, BorderLayout.WEST);

Using the API to define bean items

You can also use the API to define the distance or altitude units, date line wrapping or the coordinate formatter selected in the bean with the setAltitudeUnit setDistanceUnit, setUsingGeodeticComputation or setCoordinateFormatter methods.