MCPcopy Create free account
hub / github.com/BaseXdb/basex / calc

Method calc

basex-core/src/main/java/org/basex/gui/view/map/MapView.java:275–288  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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) {

Callers 1

refreshLayoutMethod · 0.95

Calls 9

initLenMethod · 0.95
drawMapMethod · 0.95
focusMethod · 0.95
makeMapMethod · 0.80
sizeMethod · 0.65
cursorMethod · 0.45
dataMethod · 0.45
presMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected