plot changes

This commit is contained in:
Sergey Solovyev
2013-01-21 00:48:45 +04:00
parent 1a861b6403
commit 62eb80c89d
8 changed files with 92 additions and 51 deletions

View File

@@ -58,6 +58,7 @@ public interface CalculatorPlotter {
boolean isPlotPossibleFor(@NotNull Generic expression);
void setPlot3d(boolean plot3d);
void setPlotData(boolean plot3d, @NotNull PlotBoundaries plotBoundaries);
void removeAllUnpinned();

View File

@@ -372,6 +372,15 @@ public class CalculatorPlotterImpl implements CalculatorPlotter {
}
}
@Override
public void setPlotData(boolean plot3d, @NotNull PlotBoundaries plotBoundaries) {
if (this.plot3d != plot3d || this.plotBoundaries.equals(plotBoundaries)) {
this.plot3d = plot3d;
this.plotBoundaries = plotBoundaries;
firePlotDataChangedEvent();
}
}
private void firePlotDataChangedEvent() {
plotData = new PlotData(getVisibleFunctions(), plot3d, plotBoundaries);
calculator.fireCalculatorEvent(CalculatorEventType.plot_data_changed, plotData);