The Map Overview bean is represented by the IlvJOverview class. The Map Overview bean
displays a representation of a target manager view and enables
users to navigate to an area of the view that is of particular
interest.
An example of the Map Overview panel is shown in Overview panel .
The source code for the Map Builder demonstration, which contains
all of the code described in this section, can be found at <installdir> /jviews-maps810/samples/mapbuilder/index.html
![overviewwin.png](../usrprgmaps/_media/overviewwin_default.png)
Overview panel
Including the bean in an application
To include the Map Overview bean in your
application, write the following lines of code:
IlvJOverview overview = new IlvJOverview(); overview.setView(view);
Adding the bean to a Swing component
Then add it into a swing component:
panel.add(overview, BorderLayout.CENTER);
You should also make sure that the size of
your overview remains the same regardless of any Swing layout
constraints applied. To do so, use lines like:
overview.setSize(200, 100); overview.setPreferredSize(overview.getSize()); overview.setMinimumSize(overview.getSize());
Customizing interactions and capabilities
You can customize the way users interact
with the overview, and with the capabilities of the control
rectangle as follows:
- To change the way the interactor is drawn:
overview.setDrawingStyle(IlvManagerMagViewInteractor.Wire); overview.setLineWidth(3); overview.setResizeHandleSize(6);
- To allow users to resize the overview:
overview.setResizingAllowed(true);
- To make sure the visible area of the view always remains inside the overview window:
overview.setAutoTranslating(true);
- To maintain a constant zoom ratio between the overview and the view:
overview.setAutoZooming(true);
- You can improve the performance of your application by limiting the overview refresh rate:
overview.getOverviewView().setRepaintSkipThreshold(500);