Introduce local controls for non-time, non-time plots #83

Merged
merged 9 commits into from Sep 23, 2013

Projects

None yet

2 participants

@VWoeltjen
NASA member

Introduce local controls for non-time non-time. This includes:

  • Pan & Zoom
  • Corner reset buttons (except top-right for time)
  • Purple arrows

Also, adds support for Semi-Fixed mode for non-time non-time plots (previously this was treated as Fixed mode in the absence of Purple Arrows)

@harleigh harleigh commented on the diff Sep 23, 2013
...va/gov/nasa/arc/mct/fastplot/scatter/ScatterPlot.java
}
+ private void setupAxisBoundsManagers() {
+ for (AbstractAxis axis : getAxes()) {
+ AxisVisibleOrientation o = axis.getVisibleOrientation();
+ if (o != null) {
+ List<AbstractAxisBoundManager> bounds = new ArrayList<AbstractAxisBoundManager>(2);
@harleigh
harleigh Sep 23, 2013

I am not sure what the literal value, 2 represents

@VWoeltjen
VWoeltjen Sep 23, 2013

2 = initial size of array (it is known at that point in the code that there will be exactly two bound managers, one for responding to minimum, and one for responding to maximum)

@harleigh harleigh commented on the diff Sep 23, 2013
...ava/gov/nasa/arc/mct/fastplot/bridge/PlotterPlot.java
@@ -1414,5 +1418,30 @@ public void addDataSet(String lowerCase, Color plottingColor,
AbstractLegendEntry legend) {
// TODO Auto-generated method stub
+ }
+
+ @Override
+ public void attachLocalControl(AbstractPlotLocalControl control) {
+ // TODO: Move attachment code for local controls here
@harleigh
harleigh Sep 23, 2013

Was this TODO to be implemented?

@harleigh harleigh commented on the diff Sep 23, 2013
...ava/gov/nasa/arc/mct/fastplot/bridge/PlotterPlot.java
@@ -1414,5 +1418,30 @@ public void addDataSet(String lowerCase, Color plottingColor,
AbstractLegendEntry legend) {
// TODO Auto-generated method stub
+ }
+
+ @Override
+ public void attachLocalControl(AbstractPlotLocalControl control) {
+ // TODO: Move attachment code for local controls here
+ }
+
+ @Override
+ public Collection<AbstractAxis> getAxes() {
+ // TODO: PlotterPlot should use new API
@harleigh
harleigh Sep 23, 2013

Question on this TODO.

@VWoeltjen
NASA member

Regarding TODO items, I believe these are correctly labeled (these points have not yet been addressed but may be worth addressing in the future)

Some backstory:

  • Prior implementation of plot local controls (pan/zoom, purple arrows, etc) was fairly tightly-coupled to plots which have a visible time axis.
  • #36 remained incomplete due to the absence of these local controls in the non-time non-time version of plots
  • Pull request offers interfaces for a more generalized version of local controls that includes commonalities between time-based and non-time plots
  • Pull request implements these more general local controls for non-time plots

The "regular" plot (PlotterPlot, the time-based plot) does not yet utilize the new interfaces for dealing with these controls, instead retaining the tightly-coupled version of these controls. Rationale is to minimize code changes to time-based plots in the near-term. (Time-based plots are a heavily used feature of MCT, and existing controls for these are reasonably well-tested)

@harleigh harleigh merged commit 0e81050 into nasa:master Sep 23, 2013
@VWoeltjen VWoeltjen added a commit to VWoeltjen/mct that referenced this pull request Sep 23, 2013
@VWoeltjen VWoeltjen [Tests] Merge test update with latest from master
Resolves conflicts from merging #83;
code added to same locations, non-overlapping
in terms of functionality.
b627661
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment