Closed wirew0rm closed 9 months ago
Hey there! 👋 I hope you're doing well. I've summarized the previous results for you to write a Pull Request review markdown doc. Let's get started!
javafx-base
and javafx-controls
in pom.xml
.javafx-swing
in pom.xml
.io.fair_acc.dataset.events.BitState
in AbstractSingleValueIndicator.java
.io.fair_acc.dataset.event.EventSource
in AbstractSingleValueIndicator.java
.state
in AbstractSingleValueIndicator.java
.io.fair_acc.dataset.events.EventSource
in AbstractValueIndicator.java
.io.fair_acc.dataset.events.BitState
in AbstractValueIndicator.java
.io.fair_acc.dataset.events.ChartBits
in AbstractValueIndicator.java
.io.fair_acc.chartfx.plugins.measurements.TrendingMeasurements
in ParameterMeasurements.java
.io.fair_acc.dataset.events.EventProcessor
in EventProcessor.java
.Panner
class has been removed from the file Panner.java
.DEFAULT_MOUSE_FILTER
constant has been moved to another file or deleted.Panner
class no longer extends ChartPlugin
.Panner
class no longer has the axisMode
property.Panner
class no longer has the dragCursor
property.Panner
class no longer has the mouseFilter
property.Panner
class no longer has the panStartHandler
, panDragHandler
, and panEndHandler
event handlers.Panner
class no longer has the installCursor()
, panChart()
, panDragged()
, panEnded()
, panOngoing()
, panStarted()
, registerMouseHandlers()
, setAxisMode()
, setDragCursor()
, setMouseFilter()
, shiftBounds()
, and uninstallCursor()
methods.Chart.java
, line 29, import javafx.scene.Group;
is added.Chart.java
, line 92, protected final Group pluginsArea = FXUtils.createUnmanagedGroup();
is added.Chart.java
, line 824, private final Map<ChartPlugin, Group> pluginGroups = new HashMap<>();
is added.Chart.java
, line 834, protected void pluginAdded(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 834, protected void pluginRemoved(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 912, protected void updatePluginsArea() {
method is modified to use Group
instead of Pane
.FxEventProcessor.java
, line 15, import org.apache.commons.lang3.tuple.Pair;
is added.FxEventProcessor.java
, line 34, private static final AtomicReference<FxEventProcessor> INSTANCE = new AtomicReference<>();
is added.FxEventProcessor.java
, line 36-39, public static FxEventProcessor getInstance() {
method is added.FxEventProcessor.java
, line 45, public FxEventProcessor() {
constructor is added.AbstractSingleValueIndicator.java
, line 60, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState, ChartBits.ChartLayout)
.AbstractSingleValueIndicator.java
, line 70, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState)
.AbstractValueIndicator.java
, line 49, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPlugins)
.AbstractValueIndicator.java
, line 57, instead of calling layoutChildren()
, it could call...Chart.java
, line 29, import javafx.scene.Group;
is added.Chart.java
, line 92, protected final Group pluginsArea = FXUtils.createUnmanagedGroup();
is added.Chart.java
, line 824, private final Map<ChartPlugin, Group> pluginGroups = new HashMap<>();
is added.Chart.java
, line 834, protected void pluginAdded(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 834, protected void pluginRemoved(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 912, protected void updatePluginsArea() {
method is modified to use Group
instead of Pane
.FxEventProcessor.java
, line 15, import org.apache.commons.lang3.tuple.Pair;
is added.FxEventProcessor.java
, line 34, private static final AtomicReference<FxEventProcessor> INSTANCE = new AtomicReference<>();
is added.FxEventProcessor.java
, line 36-39, public static FxEventProcessor getInstance() {
method is added.FxEventProcessor.java
, line 45, public FxEventProcessor() {
constructor is added.AbstractSingleValueIndicator.java
, line 60, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState, ChartBits.ChartLayout)
.AbstractSingleValueIndicator.java
, line 70, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState)
.AbstractValueIndicator.java
, line 49, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPlugins)
.AbstractValueIndicator.java
, line 57, instead of calling layoutChildren()
, it could call...Chart.java
, line 29, import javafx.scene.Group;
is added.Chart.java
, line 92, protected final Group pluginsArea = FXUtils.createUnmanagedGroup();
is added.Chart.java
, line 824, private final Map<ChartPlugin, Group> pluginGroups = new HashMap<>();
is added.Chart.java
, line 834, protected void pluginAdded(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 834, protected void pluginRemoved(final ChartPlugin plugin) {
method is modified to use Group
instead of Pane
.Chart.java
, line 912, protected void updatePluginsArea() {
method is modified to use Group
instead of Pane
.FxEventProcessor.java
, line 15, import org.apache.commons.lang3.tuple.Pair;
is added.FxEventProcessor.java
, line 34, private static final AtomicReference<FxEventProcessor> INSTANCE = new AtomicReference<>();
is added.FxEventProcessor.java
, line 36-39, public static FxEventProcessor getInstance() {
method is added.FxEventProcessor.java
, line 45, public FxEventProcessor() {
constructor is added.AbstractSingleValueIndicator.java
, line 60, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState, ChartBits.ChartLayout)
.AbstractSingleValueIndicator.java
, line 70, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPluginState)
.AbstractValueIndicator.java
, line 49, instead of calling layoutChildren()
, it could call getBitState().setDirty(ChartBits.ChartPlugins)
.AbstractValueIndicator.java
, line 57, instead of calling layoutChildren()
, it could call...Rate the code from 0 to 10 based on the following criteria:
Please provide a brief explanation for each criterion.
That's it! You're all set to write your Pull Request review markdown doc. Good luck! 🚀
Patch coverage: 34.02%
and project coverage change: +0.11%
:tada:
Comparison is base (
16a1602
) 48.00% compared to head (cfadee2
) 48.11%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
SonarCloud Quality Gate failed.
1 Bug
0 Vulnerabilities
0 Security Hotspots
40 Code Smells
No Coverage information
26.9% Duplication
Catch issues before they fail your Quality Gate with our IDE extension
SonarLint
Reenable the DataSet processing capabilities with the new DirtyFlag based Event system.
MathDataSet and Measurements have their own dirty flag, which subscribes with an invalidationListener to the dirty flags of the datasets, indicators and measurements it depends upon. This flag, together with an update function is added to an EventProcessor, which reevaluates all modified entities.
There can be multiple EventProcessor implementations, this PR provides an AnimationTimer based one, which computes updates on the FxApplicationThread (but outside of the render loops dataset locks!) and a Thread based one which computes all updates on a single background daemon thread. This can be extended in the future to use e.g. a ThreadPool.
One thing to keep in mind is to be careful with locking datasets inside of the functions supplied to the MathDataSet. Since the renderer holds read locks to all shown datasets, getting a write lock on more than the MathDataSet itself will cause Deadlocks
The MathDataset can be observed in the TSpectrumSample and the HistogramRendererBasicSample. The ParameterMeasurements can e.g. be used in the ErrorDataSetRenderer sample from the dropdown toolbar menu.
The main part of the changes is in the last commit, the previous commits are mostly independent small changes.