public void actionPerformed(ActionEvent event) { int value = Integer.parseInt(numcontours.getText()); cv1.setContours(value); numcontours.setText(Integer.toString(value)); } });
/** * Sets the contour values to those in the specified array. * If this method is called, then clips (or percentiles) are not used * to determine contour values, and readable contours are disabled. * @param c the array of contour values. */ public void setContours(float[] c) { double[] cd = new double[c.length]; for (int i=0; i<c.length; ++i) cd[i] = (double)c[i]; setContours(new Sampling(cd)); }
cv1.setLineStyleNegative(ContoursView.Line.DASH); cv1.setLineColor(Color.BLACK); cv1.setContours(50);