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 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); }
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); }
public DateRange(Range other) : this(other.getLowerBound(), other.getUpperBound()) { }
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); }