Create the basic building blocks of the MapĀ Builder:
create a frame containing the map beans, set it to exit when the Close button is pressed, set up the
beans, and arrange the main window layout:
public class LoadMapDemo extends JFrame {
IlvManagerView view=new IlvManagerView();
IlvJScrollManagerView viewScroll=new IlvJScrollManagerView(view);
IlvJManagerViewControlBar viewToolbar = new IlvJManagerViewControlBar();
IlvJMouseCoordinateViewer locator=new IlvJMouseCoordinateViewer();
IlvMapLegend legend=new IlvMapLegend();
public LoadMapDemo() {
super();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
viewToolbar.setView(view);
locator.setView(view);
legend.setView(view);
view.setSize(new Dimension(900, 450));
view.setKeepingAspectRatio(true);
viewScroll.setPreferredSize(view.getSize());
view.getManager().setNamedProperty(new
IlvCoordinateSystemProperty(IlvGeographicCoordinateSystem.WGS84));
getContentPane().add(viewToolbar,BorderLayout.NORTH);
getContentPane().add(viewScroll,BorderLayout.CENTER);
getContentPane().add(locator,BorderLayout.SOUTH);
getContentPane().add(legend,BorderLayout.LINE_START);
loadFile("data/county.ivl"); //$NON-NLS-1$
}