Initializes the calculation of the main map. @param rect initial space to layout rectangles in @param nodes nodes to draw in the map @param map image to draw rectangles on
(final MapRect rect, final DBNodes nodes, final BufferedImage map)
| 273 | * @param map image to draw rectangles on |
| 274 | */ |
| 275 | private void calc(final MapRect rect, final DBNodes nodes, final BufferedImage map) { |
| 276 | // calculate new main rectangles |
| 277 | gui.cursor(CURSORWAIT); |
| 278 | |
| 279 | initLen(); |
| 280 | layout = new MapLayout(nodes.data(), textLen, gui.gopts); |
| 281 | layout.makeMap(rect, new MapList(nodes.pres().clone()), 0, (int) nodes.size() - 1); |
| 282 | // rectangles are copied to avoid synchronization issues |
| 283 | mainRects = layout.rectangles.copy(); |
| 284 | |
| 285 | drawMap(map, mainRects); |
| 286 | focus(); |
| 287 | gui.cursor(CURSORARROW, true); |
| 288 | } |
| 289 | |
| 290 | @Override |
| 291 | public void paintComponent(final Graphics g) { |