private void redrawThresholdMarker() { final String selectedFeature = allKeys.get( jComboBoxFeature.getSelectedIndex() ); final double[] values = valuesMap.get( selectedFeature ); if ( null == values ) return; if ( jRadioButtonAbove.isSelected() ) { intervalMarker.setStartValue( threshold ); intervalMarker.setEndValue( plot.getDomainAxis().getUpperBound() ); } else { intervalMarker.setStartValue( plot.getDomainAxis().getLowerBound() ); intervalMarker.setEndValue( threshold ); } float x, y; if ( threshold > 0.85 * plot.getDomainAxis().getUpperBound() ) { x = ( float ) ( threshold - 0.15 * plot.getDomainAxis().getRange().getLength() ); } else { x = ( float ) ( threshold + 0.05 * plot.getDomainAxis().getRange().getLength() ); } y = ( float ) ( 0.85 * plot.getRangeAxis().getUpperBound() ); annotation.setText( String.format( "%.2f", threshold ) ); annotation.setLocation( x, y ); fireThresholdChanged(); }
private void redrawThresholdMarker() { final String selectedFeature = allKeys.get( jComboBoxFeature.getSelectedIndex() ); final double[] values = valuesMap.get( selectedFeature ); if ( null == values ) return; if ( jRadioButtonAbove.isSelected() ) { intervalMarker.setStartValue( threshold ); intervalMarker.setEndValue( plot.getDomainAxis().getUpperBound() ); } else { intervalMarker.setStartValue( plot.getDomainAxis().getLowerBound() ); intervalMarker.setEndValue( threshold ); } float x, y; if ( threshold > 0.85 * plot.getDomainAxis().getUpperBound() ) { x = ( float ) ( threshold - 0.15 * plot.getDomainAxis().getRange().getLength() ); } else { x = ( float ) ( threshold + 0.05 * plot.getDomainAxis().getRange().getLength() ); } y = ( float ) ( 0.85 * plot.getRangeAxis().getUpperBound() ); annotation.setText( String.format( "%.2f", threshold ) ); annotation.setLocation( x, y ); fireThresholdChanged(); }
for (IntervalMarker marker : markers) { marker.setStartValue(marker.getStartValue() / div); marker.setEndValue(marker.getEndValue() / div);