This class represents where the chart with all its elements will be rendered
Method level:
5 constructors
create the Panel
create the Panel using a buffer to speed up repainting
create the Panel and specify which buttons should appear on the window (save, print, zoom, tooltips, properties editor)
same as 3. and specifying maximum dimensions
same as 4. + copy option on the window
6 method variants
zoomInFactor (2×): zoom in a chart
zoomOutFactor (2×): zoom out a chart
createPopupMenu (2×): creates a popup menu, for saving for example (they correspond to the options that can be chosen when creating the Panel using constructors 3. to 5.
Class level: 1 subclass for the polar plot, which has adapted zoom and auto range implementations.
For the graphical behavior method, there are indeed very hard to understand and we observe that:
none of the 3 paintComponent methods in 3 classes are tested
none of the 11 actionPerformed methods in 11 classes are testes
mousePressed and mouseDragged event listener methods are only used in ChartPanel but cannot be easily test for the same reason (the need to reproduce or mock the full graphical stack)
Class description
Class full name
org.jfree.chart.ChartPanel
Implemented variability :heavy_check_mark:
This class represents where the chart with all its elements will be rendered
Method level:
5 constructors
6 method variants
zoomInFactor
(2×): zoom in a chartzoomOutFactor
(2×): zoom out a chartcreatePopupMenu
(2×): creates a popup menu, for saving for example (they correspond to the options that can be chosen when creating the Panel using constructors 3. to 5.Class level: 1 subclass for the polar plot, which has adapted zoom and auto range implementations.
Actual coverage (JaCoCo)
Visualization
TODO
Split the most cognitively complex methods
Add tests for the following methods that are currently not or partially covered
Other methods are not tested, but are fully dedicated to graphical behavior, so they might be hard to test