Exemplo n.º 1
0
 public MeterInterval(string label, Range range, Paint outlinePaint, Stroke outlineStroke, Paint backgroundPaint)
 {
   base.\u002Ector();
   MeterInterval meterInterval = this;
   if (label == null)
   {
     string str = "Null 'label' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (range == null)
   {
     string str = "Null 'range' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.label = label;
     this.range = range;
     this.outlinePaint = outlinePaint;
     this.outlineStroke = outlineStroke;
     this.backgroundPaint = backgroundPaint;
   }
 }
 public RectangleConstraint(double w, Range widthRange, LengthConstraintType widthConstraintType, double h, Range heightRange, LengthConstraintType heightConstraintType)
 {
   base.\u002Ector();
   RectangleConstraint rectangleConstraint = this;
   if (widthConstraintType == null)
   {
     string str = "Null 'widthType' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (heightConstraintType == null)
   {
     string str = "Null 'heightType' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.width = w;
     this.widthRange = widthRange;
     this.widthConstraintType = widthConstraintType;
     this.height = h;
     this.heightRange = heightRange;
     this.heightConstraintType = heightConstraintType;
   }
 }
 public DefaultMultiValueCategoryDataset()
 {
   DefaultMultiValueCategoryDataset valueCategoryDataset = this;
   this.data = new KeyedObjects2D();
   this.minimumRangeValue = (Number) null;
   this.maximumRangeValue = (Number) null;
   this.rangeBounds = new Range(0.0, 0.0);
 }
Exemplo n.º 4
0
 public ModuloAxis(string label, Range fixedRange)
   : base(label)
 {
   ModuloAxis moduloAxis = this;
   this.fixedRange = fixedRange;
   this.displayStart = 270.0;
   this.displayEnd = 90.0;
 }
Exemplo n.º 5
0
 protected internal override Size2D arrangeRN(Graphics2D g2, Range widthRange)
 {
   Size2D size2D = this.arrangeNN(g2);
   if (widthRange.contains(size2D.getWidth()))
     return size2D;
   double w = widthRange.constrain(size2D.getWidth());
   return this.arrangeFN(g2, w);
 }
Exemplo n.º 6
0
 protected internal override Size2D arrangeRR(Graphics2D g2, Range widthRange, Range heightRange)
 {
   ((Graphics) g2).setFont(this.getFont());
   FontMetrics fontMetrics = ((Graphics) g2).getFontMetrics(this.getFont());
   Rectangle2D textBounds = TextUtilities.getTextBounds(this.getText(), g2, fontMetrics);
   if (((RectangularShape) textBounds).getWidth() <= widthRange.getUpperBound() && ((RectangularShape) textBounds).getHeight() <= heightRange.getUpperBound())
     return new Size2D(((RectangularShape) textBounds).getWidth(), ((RectangularShape) textBounds).getHeight());
   else
     return new Size2D(0.0, 0.0);
 }
 public DefaultBoxAndWhiskerXYDataset(IComparable seriesKey)
 {
   DefaultBoxAndWhiskerXYDataset whiskerXyDataset = this;
   this.outlierCoefficient = 1.5;
   this.faroutCoefficient = 2.0;
   this.seriesKey = seriesKey;
   this.dates = (List) new ArrayList();
   this.items = (List) new ArrayList();
   this.minimumRangeValue = (Number) null;
   this.maximumRangeValue = (Number) null;
   this.rangeBounds = (Range) null;
 }
 public virtual Range getZValueRange(Range x, Range y)
 {
   double lowerBound1 = x.getLowerBound();
   double lowerBound2 = y.getLowerBound();
   double upperBound1 = x.getUpperBound();
   double upperBound2 = y.getUpperBound();
   double lower = 1E+20;
   double upper = -1E+20;
   for (int index = 0; index < this.zValues.Length; ++index)
   {
     if (this.xValues[index].doubleValue() >= lowerBound1 && this.xValues[index].doubleValue() <= upperBound1 && (this.yValues[index].doubleValue() >= lowerBound2 && this.yValues[index].doubleValue() <= upperBound2) && this.zValues[index] != null)
     {
       lower = Math.min(lower, this.zValues[index].doubleValue());
       upper = Math.max(upper, this.zValues[index].doubleValue());
     }
   }
   return new Range(lower, upper);
 }
 protected internal virtual void buildGrid(int numX, int numY, int power)
 {
   int length = numX * numY;
   double[] data1 = new double[length];
   double[] data2 = new double[length];
   double[] data3 = new double[length];
   double lower1 = 1E+20;
   for (int index = 0; index < this.xValues.Length; ++index)
     lower1 = Math.min(lower1, this.xValues[index].doubleValue());
   double upper1 = -1E+20;
   for (int index = 0; index < this.xValues.Length; ++index)
     upper1 = Math.max(upper1, this.xValues[index].doubleValue());
   double lower2 = 1E+20;
   for (int index = 0; index < this.yValues.Length; ++index)
     lower2 = Math.min(lower2, this.yValues[index].doubleValue());
   double upper2 = -1E+20;
   for (int index = 0; index < this.yValues.Length; ++index)
     upper2 = Math.max(upper2, this.yValues[index].doubleValue());
   Range range1 = new Range(lower1, upper1);
   Range range2 = new Range(lower2, upper2);
   range1.getLength();
   range2.getLength();
   double num1 = range1.getLength() / (double) (numX - 1);
   double num2 = range2.getLength() / (double) (numY - 1);
   double num3 = 0.0;
   for (int index1 = 0; index1 < numX; ++index1)
   {
     if (index1 == 0)
       num3 = lower1;
     else
       num3 += num1;
     double num4 = 0.0;
     for (int index2 = 0; index2 < numY; ++index2)
     {
       int index3 = numY * index1 + index2;
       data1[index3] = num3;
       if (index2 == 0)
         num4 = lower2;
       else
         num4 += num2;
       data2[index3] = num4;
     }
   }
   for (int index1 = 0; index1 < data1.Length; ++index1)
   {
     double num4 = 0.0;
     data3[index1] = 0.0;
     for (int index2 = 0; index2 < this.xValues.Length; ++index2)
     {
       double num5 = this.distance(this.xValues[index2].doubleValue(), this.yValues[index2].doubleValue(), data1[index1], data2[index1]);
       if (power != 1)
         num5 = Math.pow(num5, (double) power);
       double num6 = Math.sqrt(num5);
       double num7 = num6 <= 0.0 ? 1E+20 : 1.0 / num6;
       if (this.zValues[index2] != null)
       {
         double[] numArray1 = data3;
         int index3 = index1;
         double[] numArray2 = numArray1;
         numArray2[index3] = numArray2[index3] + this.zValues[index2].doubleValue() * num7;
       }
       num4 += num7;
     }
     data3[index1] = data3[index1] / num4;
   }
   this.initialize(DefaultContourDataset.formObjectArray(data1), DefaultContourDataset.formObjectArray(data2), DefaultContourDataset.formObjectArray(data3));
 }
 public virtual void add(Date date, BoxAndWhiskerItem item)
 {
   this.dates.add((object) date);
   this.items.add((object) item);
   if (this.minimumRangeValue == null)
     this.minimumRangeValue = item.getMinRegularValue();
   else if (item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue())
     this.minimumRangeValue = item.getMinRegularValue();
   if (this.maximumRangeValue == null)
     this.maximumRangeValue = item.getMaxRegularValue();
   else if (item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue())
     this.maximumRangeValue = item.getMaxRegularValue();
   this.rangeBounds = new Range(this.minimumRangeValue.doubleValue(), this.maximumRangeValue.doubleValue());
   this.fireDatasetChanged();
 }
Exemplo n.º 11
0
 public DateRange(Range other)
   : this(other.getLowerBound(), other.getUpperBound())
 {
 }
Exemplo n.º 12
0
 public FastScatterPlot(float[][] data, ValueAxis domainAxis, ValueAxis rangeAxis)
 {
   FastScatterPlot fastScatterPlot = this;
   if (domainAxis == null)
   {
     string str = "Null 'domainAxis' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (rangeAxis == null)
   {
     string str = "Null 'rangeAxis' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.data = data;
     this.xDataRange = this.calculateXDataRange(data);
     this.yDataRange = this.calculateYDataRange(data);
     this.domainAxis = domainAxis;
     this.domainAxis.setPlot((Plot) this);
     this.domainAxis.addChangeListener((AxisChangeListener) this);
     this.rangeAxis = rangeAxis;
     this.rangeAxis.setPlot((Plot) this);
     this.rangeAxis.addChangeListener((AxisChangeListener) this);
     this.paint = (Paint) Color.red;
     this.domainGridlinesVisible = true;
     this.domainGridlinePaint = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
     this.domainGridlineStroke = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
     this.rangeGridlinesVisible = true;
     this.rangeGridlinePaint = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
     this.rangeGridlineStroke = FastScatterPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   }
 }
 public virtual void invalidateRangeInfo()
 {
   this.maxValue = (Float) null;
   this.valueRange = (Range) null;
 }
Exemplo n.º 14
0
 public override void setRange(Range range)
 {
   base.setRange(range);
   this.setupSmallLogFlag();
 }
Exemplo n.º 15
0
 protected internal ValueAxis(string label, TickUnitSource standardTickUnits)
   : base(label)
 {
   ValueAxis valueAxis = this;
   this.positiveArrowVisible = false;
   this.negativeArrowVisible = false;
   this.range = ValueAxis.__\u003C\u003EDEFAULT_RANGE;
   this.autoRange = true;
   this.defaultAutoRange = ValueAxis.__\u003C\u003EDEFAULT_RANGE;
   this.inverted = false;
   this.autoRangeMinimumSize = 1E-08;
   this.lowerMargin = 0.05;
   this.upperMargin = 0.05;
   this.fixedAutoRange = 0.0;
   this.autoTickUnitSelection = true;
   this.standardTickUnits = standardTickUnits;
   Polygon polygon1 = new Polygon();
   polygon1.addPoint(0, 0);
   polygon1.addPoint(-2, 2);
   polygon1.addPoint(2, 2);
   this.upArrow = (Shape) polygon1;
   Polygon polygon2 = new Polygon();
   polygon2.addPoint(0, 0);
   polygon2.addPoint(-2, -2);
   polygon2.addPoint(2, -2);
   this.downArrow = (Shape) polygon2;
   Polygon polygon3 = new Polygon();
   polygon3.addPoint(0, 0);
   polygon3.addPoint(-2, -2);
   polygon3.addPoint(-2, 2);
   this.rightArrow = (Shape) polygon3;
   Polygon polygon4 = new Polygon();
   polygon4.addPoint(0, 0);
   polygon4.addPoint(2, -2);
   polygon4.addPoint(2, 2);
   this.leftArrow = (Shape) polygon4;
   this.verticalTickLabels = false;
   this.minorTickCount = 0;
 }
Exemplo n.º 16
0
 public MeterPlot(ValueDataset dataset)
 {
   MeterPlot meterPlot = this;
   this.shape = DialShape.__\u003C\u003ECIRCLE;
   this.meterAngle = 270;
   this.range = new Range(0.0, 100.0);
   this.tickSize = 10.0;
   this.tickPaint = (Paint) Color.white;
   this.units = "Units";
   this.needlePaint = MeterPlot.DEFAULT_NEEDLE_PAINT;
   this.tickLabelsVisible = true;
   this.tickLabelFont = MeterPlot.__\u003C\u003EDEFAULT_LABEL_FONT;
   this.tickLabelPaint = (Paint) Color.black;
   this.tickLabelFormat = NumberFormat.getInstance();
   this.valueFont = MeterPlot.DEFAULT_VALUE_FONT;
   this.valuePaint = MeterPlot.DEFAULT_VALUE_PAINT;
   this.dialBackgroundPaint = MeterPlot.DEFAULT_DIAL_BACKGROUND_PAINT;
   this.intervals = (List) new ArrayList();
   this.setDataset(dataset);
 }
Exemplo n.º 17
0
 public virtual RectangleConstraint toRangeHeight(Range range)
 {
   if (range == null)
   {
     string str = "Null 'range' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     return new RectangleConstraint(this.width, this.widthRange, this.widthConstraintType, range.getUpperBound(), range, LengthConstraintType.__\u003C\u003ERANGE);
 }
 public static Range visibleRange(ContourDataset data, Range x, Range y)
 {
   return ((DefaultContourDataset) data).getZValueRange(x, y);
 }
 public virtual Range getRangeBounds(bool includeInterval)
 {
   int num = includeInterval ? 1 : 0;
   if (this.valueRange == null)
     this.valueRange = new Range(0.0, this.getRangeUpperBound(num != 0));
   return this.valueRange;
 }
 public virtual RegularTimePeriod advanceTime()
 {
   RegularTimePeriod regularTimePeriod = this.pointsInTime[this.newestAt].next();
   this.newestAt = this.oldestAt;
   int num1 = 0;
   float num2 = 0.0f;
   if (this.maxValue != null)
     num2 = this.maxValue.floatValue();
   for (int index = 0; index < this.getSeriesCount(); ++index)
   {
     if ((double) this.valueHistory[index].getData(this.oldestAt) == (double) num2)
       num1 = 1;
     if (num1 != 0)
       break;
   }
   if (num1 != 0)
     this.invalidateRangeInfo();
   float num3 = 0.0f;
   for (int index = 0; index < this.getSeriesCount(); ++index)
     this.valueHistory[index].enterData(this.newestAt, num3);
   this.pointsInTime[this.newestAt] = regularTimePeriod;
   ++this.oldestAt;
   if (this.oldestAt >= this.historyCount)
     this.oldestAt = 0;
   long num4 = this.domainStart.longValue();
   Long.__\u003Cclinit\u003E();
   this.domainStart = new Long(num4 + this.deltaTime);
   long num5 = this.domainEnd.longValue();
   Long.__\u003Cclinit\u003E();
   this.domainEnd = new Long(num5 + this.deltaTime);
   this.domainRange = new Range((double) num4, (double) num5);
   this.fireSeriesChanged();
   return regularTimePeriod;
 }
Exemplo n.º 21
0
 public MeterInterval(string label, Range range)
   : this(label, range, (Paint) Color.yellow, (Stroke) new BasicStroke(2f), (Paint) null)
 {
 }
Exemplo n.º 22
0
 public SimpleDial()
   : base(0.0)
 {
   SimpleDial simpleDial = this;
   this.__\u003C\u003Emax = new DoubleProperty((PropertyHolder) this, "Upper Limit", 100.0);
   this.__\u003C\u003Emin = new DoubleProperty((PropertyHolder) this, "Lower Limit", 0.0);
   this.__\u003C\u003EtickInterval = new DoubleProperty((PropertyHolder) this, "Tick Interval", 10.0);
   ((Container) this).setLayout((LayoutManager) new BorderLayout());
   MeterPlot.__\u003Cclinit\u003E();
   this.m_meter = new MeterPlot((ValueDataset) this.getDataset());
   this.m_plotRange = new Range(this.__\u003C\u003Emin.getValue().doubleValue(), this.__\u003C\u003Emax.getValue().doubleValue());
   this.m_meter.setRange(this.m_plotRange);
   JFreeChart.__\u003Cclinit\u003E();
   this.chartPanel = (JPanel) new ChartPanel(new JFreeChart(this.getFieldName(), JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) this.m_meter, false));
   ((JComponent) this.chartPanel).setPreferredSize(new Dimension(250, 150));
   this.propertyChanged((Property) this.__\u003C\u003EtickInterval);
   ((Container) this).add((Component) this.chartPanel, (object) "Center");
 }
Exemplo n.º 23
0
 public override void setRange(Range range, bool turnOffAutoRange, bool notify)
 {
   int num1 = turnOffAutoRange ? 1 : 0;
   int num2 = notify ? 1 : 0;
   double num3 = range.getUpperBound() - range.getLowerBound();
   if (num3 > this.period)
     this.period = num3;
   base.setRange(range, num1 != 0, num2 != 0);
 }
Exemplo n.º 24
0
 public RectangleConstraint(double w, Range h)
   : this(w, (Range) null, LengthConstraintType.__\u003C\u003EFIXED, 0.0, h, LengthConstraintType.__\u003C\u003ERANGE)
 {
 }
Exemplo n.º 25
0
 static ValueAxis()
 {
   Axis.__\u003Cclinit\u003E();
   ValueAxis.__\u003C\u003EDEFAULT_RANGE = new Range(0.0, 1.0);
 }
 protected internal virtual void findDomainLimits()
 {
   long firstMillisecond = this.getOldestTime().getFirstMillisecond(this.workingCalendar);
   long num = !this.domainIsPointsInTime ? this.getNewestTime().getLastMillisecond(this.workingCalendar) : this.getNewestTime().getFirstMillisecond(this.workingCalendar);
   this.domainStart = new Long(firstMillisecond);
   this.domainEnd = new Long(num);
   this.domainRange = new Range((double) firstMillisecond, (double) num);
 }
Exemplo n.º 27
0
 protected internal override Size2D arrangeNN(Graphics2D g2)
 {
   Range range = new Range(0.0, 3.40282346638529E+38);
   return this.arrangeRR(g2, range, range);
 }
Exemplo n.º 28
0
 public RectangleConstraint(Range w, Range h)
   : this(0.0, w, LengthConstraintType.__\u003C\u003ERANGE, 0.0, h, LengthConstraintType.__\u003C\u003ERANGE)
 {
 }
Exemplo n.º 29
0
 public RectangleConstraint(Range w, double h)
   : this(0.0, w, LengthConstraintType.__\u003C\u003ERANGE, h, (Range) null, LengthConstraintType.__\u003C\u003EFIXED)
 {
 }
Exemplo n.º 30
0
 public override void propertyChanged(Property property)
 {
   if (property == this.__\u003C\u003Emin || property == this.__\u003C\u003Emax)
   {
     this.m_plotRange = new Range(this.__\u003C\u003Emin.getValue().doubleValue(), this.__\u003C\u003Emax.getValue().doubleValue());
     this.m_meter.setRange(this.m_plotRange);
   }
   else
   {
     if (property != this.__\u003C\u003EtickInterval)
       return;
     this.m_meter.setTickSize(this.__\u003C\u003EtickInterval.getValue().doubleValue());
   }
 }