コード例 #1
0
  @Override
  protected void updateComponents() {
    if (!isInitialized || !isVisible()) {
      return;
    }

    super.updateComponents();
    chart.setTitle(
        getRaster() != null ? CHART_TITLE + " for " + getRaster().getName() : CHART_TITLE);
    updateXAxis();
    if (xAxisRangeControl.isAutoMinMax()) {
      xAxisRangeControl
          .getBindingContext()
          .getPropertySet()
          .getDescriptor("min")
          .setDefaultValue(HISTO_MIN_DEFAULT);
      xAxisRangeControl
          .getBindingContext()
          .getPropertySet()
          .getDescriptor("max")
          .setDefaultValue(HISTO_MAX_DEFAULT);
    }
    dataset = null;
    handleStxChange();
    updateRefreshButton();
  }
コード例 #2
0
 private void finishScalingUpdate(
     AxisRangeControl axisRangeControl, ValueAxis newAxis, ValueAxis oldAxis) {
   if (axisRangeControl.isAutoMinMax()) {
     newAxis.setAutoRange(false);
     acceptableDeviationDataset.removeAllSeries();
     regressionDataset.removeAllSeries();
     getPlot().removeAnnotation(r2Annotation);
     newAxis.setAutoRange(true);
     axisRangeControl.adjustComponents(newAxis, 3);
     newAxis.setAutoRange(false);
     computeRegressionAndAcceptableDeviationData();
   } else {
     newAxis.setAutoRange(false);
     newAxis.setRange(oldAxis.getRange());
   }
 }
コード例 #3
0
 private void handleAxisRangeControlChanges(
     PropertyChangeEvent evt,
     AxisRangeControl axisRangeControl,
     ValueAxis valueAxis,
     Range computedAutoRange) {
   final String propertyName = evt.getPropertyName();
   switch (propertyName) {
     case AxisRangeControl.PROPERTY_NAME_AUTO_MIN_MAX:
       if (axisRangeControl.isAutoMinMax()) {
         final double min = computedAutoRange.getLowerBound();
         final double max = computedAutoRange.getUpperBound();
         axisRangeControl.adjustComponents(min, max, 3);
       }
       break;
     case AxisRangeControl.PROPERTY_NAME_MIN:
       valueAxis.setLowerBound(axisRangeControl.getMin());
       break;
     case AxisRangeControl.PROPERTY_NAME_MAX:
       valueAxis.setUpperBound(axisRangeControl.getMax());
       break;
   }
 }
コード例 #4
0
 private boolean getAutoMinMaxEnabled() {
   return xAxisRangeControl.isAutoMinMax();
 }