private boolean updateMinMaxValues ( ) { double min_y_value_new = min_y_value ; double max_y_value_new = max_y_value ; double max_x_value_new = max_x_value ; if ( measure0 != null && measure1 != null ) { min_y_value_new = Math . min ( measure0 . getMinValue ( measureSelected ) , measure1 . getMinValue ( measureSelected ) ) ; max_y_value_new = Math . max ( measure0 . getMaxValue ( measureSelected ) , measure1 . getMaxValue ( measureSelected ) ) ; max_x_value_new = Math . max ( measure0 . getNumberOfValues ( measureSelected ) , max_x_value ) ; } else { if ( measure0 != null ) { min_y_value_new = measure0 . getMinValue ( measureSelected ) ; max_y_value_new = measure0 . getMaxValue ( measureSelected ) ; max_x_value_new = Math . max ( measure0 . getNumberOfValues ( measureSelected ) , max_x_value ) ; } } //resizing needed? if ( max_x_value_new != max_x_value || max_y_value_new != max_y_value || min_y_value_new != min_y_value ) { min_y_value = min_y_value_new ; max_y_value = max_y_value_new ; max_x_value = max_x_value_new ; return true ; } return false ; }
returns true when values have changed