The Coordinate Panel Factory bean is represented by the IlvCoordinatePanelFactory class. This bean is
used in the Symbol Definition Window and in the terrain analysis
features, but can be used whenever the application needs the user
to point to a single coordinate or a rectangular area.
An example of the Coordinate Panel Factory for the input of a
rectangular set of coordinates is shown in Multithread Monitor .
Including the bean in an application
To include the Coordinate Panel Factory
bean in your application, you need a coordinate formatter (to
determine how coordinates are displayed). You can, for example,
retrieve the preferred coordinate formatter for the manager:
IlvDisplayPreferences prefs=IlvDisplayPreferencesProperty.GetDisplayPreferences(manager); IlvCoordinateFormatter formatter=prefs.getCoordinateFormatter();
Then you can create a bean to enter single
point coordinates:
pointInputPanel = IlvCoordinatePanelFactory.createCoordPointInputPanel(view, formatter);
Or you can create a panel to enter a
rectangular zone:
rectInputPanel = IlvCoordinatePanelFactory.createCoordRectangleInputPanel (view,formatter);
You may then have to set the initial
values:
pointInputPanel.setLatLon(Math.toRadians(22.5),Math.toRadians(12));
And add a listener that is invoked when
the user enters or selects coordinates:
PropertyChangeListener listener= ...; pointInputPanel.addPropertyChangeListener(listener);