eclipse / swtchart

Eclipse Public License 2.0
44 stars 41 forks source link

Added new Mouse Down Event Listener for CircularCharts #217

Closed himanshu-balasamanta closed 4 years ago

himanshu-balasamanta commented 4 years ago

code is cleaner, and user has the choice to set the setting if or not he wants the redrawn charts to use the entire space available.

circularSeriesSettings.setFillEntireSpace(boolean fillEntireSpace); is false by default, setting it to true leads to filling up the entire space available.

eselmeister commented 4 years ago

@Himanshu-Balasamanta Please address the following issues:

BaseChart.java The following code could be called once. An additional check that the object is instanceof CircularMouseDownEvent should be added. ((CircularMouseDownEvent)registeredEvents.get(EVENT_MOUSE_DOWN).get(1).get(SWT.NONE).get(0))...

CircularMouseDownEvent.java Please add the Header.

PieChart.java -> The code is fine, but we use to put the subroutine in curly brackets. if(handledEventProcessor != null) { chartSettings.removeHandledEventProcessor(handledEventProcessor); }

I will also add a method in the settings to remove a registered handler by class name. That makes it easier to remove/exchange event processors.

himanshu-balasamanta commented 4 years ago

Hi, As there already is a ChartSettings.removeHandledEventProcessor(IHandledEventProcessor handledEventProcessor); and a ChartSettings.addHandledEventProcessor(IHandledEventProcessor handledEventProcessor); it may be better to add a method ChartSettings.getHandledEventProcessorByClass() to it instead.

eselmeister commented 4 years ago

@Himanshu-Balasamanta Yep, adding a method ChartSettings.getHandledEventProcessorByClass() is a good idea.

eselmeister commented 4 years ago

I will add the method ChartSettings.getHandledEventProcessorByClass().