kodejava-2d-api/src/main/java/org/kodejava/example/geom/Plot.java
void refreshData() {
        if (!initialized) {
            return;
        }
        title = paramFields[titleIndex].getText();
        xTitle = paramFields[xTitleIndex].getText();
        yTitle = paramFields[yTitleIndex].getText();
        xLower = Float.parseFloat(paramFields[xLowerIndex].getText());
        xUpper = Float.parseFloat(paramFields[xUpperIndex].getText());
        xInterval = Float.parseFloat(paramFields[xIntervalIndex].getText());
        yLower = Float.parseFloat(paramFields[yLowerIndex].getText());
        yUpper = Float.parseFloat(paramFields[yUpperIndex].getText());
        yInterval = Float.parseFloat(paramFields[yIntervalIndex].getText());
        for (int i = 0; i < points.length; i++) {
            Float x = Float.parseFloat(dataFields[2 * i].getText());
            Float y = Float.parseFloat(dataFields[2 * i + 1].getText());
            points[i] = new Point2D.Float(x, y);
        }
    }
// Read data from panel in case user made any changes
Read data from panel in case user made any changes
Read data from panel in case user made any changes
void refreshData() {
        if (!initialized) {
            return;
        }
        title = paramFields[titleIndex].getText();
        xTitle = paramFields[xTitleIndex].getText();
        yTitle = paramFields[yTitleIndex].getText();
        xLower = Float.parseFloat(paramFields[xLowerIndex].getText());
        xUpper = Float.parseFloat(paramFields[xUpperIndex].getText());
        xInterval = Float.parseFloat(paramFields[xIntervalIndex].getText());
        yLower = Float.parseFloat(paramFields[yLowerIndex].getText());
        yUpper = Float.parseFloat(paramFields[yUpperIndex].getText());
        yInterval = Float.parseFloat(paramFields[yIntervalIndex].getText());
        for (int i = 0; i < points.length; i++) {
            Float x = Float.parseFloat(dataFields[2 * i].getText());
            Float y = Float.parseFloat(dataFields[2 * i + 1].getText());
            points[i] = new Point2D.Float(x, y);
        }
    }
void refreshData ( ) { if ( ! initialized ) { return ; } title = paramFields [ titleIndex ] . getText ( ) ; xTitle = paramFields [ xTitleIndex ] . getText ( ) ; yTitle = paramFields [ yTitleIndex ] . getText ( ) ; xLower = Float . parseFloat ( paramFields [ xLowerIndex ] . getText ( ) ) ; xUpper = Float . parseFloat ( paramFields [ xUpperIndex ] . getText ( ) ) ; xInterval = Float . parseFloat ( paramFields [ xIntervalIndex ] . getText ( ) ) ; yLower = Float . parseFloat ( paramFields [ yLowerIndex ] . getText ( ) ) ; yUpper = Float . parseFloat ( paramFields [ yUpperIndex ] . getText ( ) ) ; yInterval = Float . parseFloat ( paramFields [ yIntervalIndex ] . getText ( ) ) ; for ( int i = 0 ; i < points . length ; i ++ ) { Float x = Float . parseFloat ( dataFields [ 2 * i ] . getText ( ) ) ; Float y = Float . parseFloat ( dataFields [ 2 * i + 1 ] . getText ( ) ) ; points [ i ] = new Point2D . Float ( x , y ) ; } }
Read data from panel in case user made any changes
Read data from panel in case user made any changes