CircularPlot.getConnections() isEmpty() when from.addToOutgoing(to, ...) is done after CircularPlotBuilder.create()
markus-olbrich opened this issue · 2 comments
Hi Gerrit,
i got the following problem ....
CircularPlot.getConnections() isEmpty() when from.addToOutgoing(to, ...) is done after CircularPlotBuilder.create()
There seams to be a dependency in order of method calls, see validateData().
Its very surprising that allthougt the appearance on screen ist totally fine, there is an empty conenctions list.
This all is upcoming only, because Connections are only internal in CircularPlot.
Another previous mistake was to create Connections outside the plot and using them.
Everything seems ok, the appearance on screen ist totally fine, but i never got the idea that these are totally unused.
I only wondered why i could not get any ConnectionEvent.
IMO it would be great to have Interfaces for PlotItem(NODE) and Connection(EDGE) in order to add own Properties
or even to use existing Graph Structures to implement PlotItem and Connection Interface for Charts.
But thanks for your work,
great FX framework!!
Hi there,
Well you are probably right, I've only created the whole charts thing for fun so there is definitely room for improvement. Unfortunately I'm really busy these days but if you like...feel free to create a MR with a solution :)
Cheers,
Gerrit
Hi Gerrit,
yes ok, unfortunately i am not that familiar with GitHub, but i will see.
I just have another thing. The following Code will fail, i think because the fill is part of hashCode().
It will not be found anymore when color is changed, even if overridden.
{code}
public class GttPlotItem extends PlotItem {
@Override
public Color getFill() {
if(true) return super.getFill();
GttDomainDataBean bean = circularCurveElementNode.getBeans().iterator().next();
// Ist das Element akt. selektiert dann muss es farblich hervorghoben werden
if(circularCurveElementNode.getCurve().getBeanModel().isSelected(bean)) {
return Color.CYAN;
} else {
return super.getFill();
}
}
{code}
So i have also to override hashCode() and equals(), but cannot expect what followups that can have, because the real aim for using this in hashCode is not commented.