Right now, the default, and only, constructor of XChartPanel adds a lot of mouse listeners and keyboard shortcuts to the panel. Removing those is a bit tedious if you don't want the default behaviour.
Would it be possible to
a)
move the mouse listeners, mouse motion listeners, and keyboard shortcuts into separate, overridable methods, like initPopupMenu, initTooltips, initCursor, initKeyStrokes that get called from the constructor, so you can subclass XChartPanel, overriding these methods with NOPs or your own versions
or
b)
add a glue class NoDefaultInteractionXChartPanel between XChartPanel and JPanel that has what's neccesary to display, but not interact, with the panel? (paintComponent, getChart, getPreferredSize)?
Of course I could just create my own class and copy/paste the few methods into it, but an "official" version would be a bit less fragile in the future.
Right now, the default, and only, constructor of
XChartPanel
adds a lot of mouse listeners and keyboard shortcuts to the panel. Removing those is a bit tedious if you don't want the default behaviour.Would it be possible to
a) move the mouse listeners, mouse motion listeners, and keyboard shortcuts into separate, overridable methods, like
initPopupMenu
,initTooltips
,initCursor
,initKeyStrokes
that get called from the constructor, so you can subclassXChartPanel
, overriding these methods with NOPs or your own versionsor
b) add a glue class
NoDefaultInteractionXChartPanel
betweenXChartPanel
andJPanel
that has what's neccesary to display, but not interact, with the panel? (paintComponent
,getChart
,getPreferredSize
)?Of course I could just create my own class and copy/paste the few methods into it, but an "official" version would be a bit less fragile in the future.