@Ignore("This was previously commented out") @Test public void testSetRangeType() { NumberAxis axis = new NumberAxis("X"); axis.setRangeType(RangeType.POSITIVE); assertEquals(RangeType.POSITIVE, axis.getRangeType()); axis.setRangeType(RangeType.FULL); axis.setRange(-5.0, 5.0); axis.setRangeType(RangeType.POSITIVE); assertEquals(new Range(0.0, 5.0), axis.getRange()); axis.setRangeType(RangeType.FULL); axis.setRange(-10.0, -5.0); axis.setRangeType(RangeType.POSITIVE); assertEquals(new Range(0.0, axis.getAutoRangeMinimumSize()), axis.getRange()); axis.setRangeType(RangeType.FULL); axis.setRange(-5.0, 5.0); axis.setRangeType(RangeType.NEGATIVE); assertEquals(new Range(-5.0, 0.0), axis.getRange()); axis.setRangeType(RangeType.FULL); axis.setRange(5.0, 10.0); axis.setRangeType(RangeType.NEGATIVE); assertEquals(new Range(-axis.getAutoRangeMinimumSize(), 0.0), axis.getRange()); try { axis.setRangeType(null); fail("IllegalArgumentException should have been thrown on null parameter"); } catch (IllegalArgumentException e) { assertEquals("Null 'rangeType' argument.", e.getMessage()); } }
public void setRangeType(RangeType rangeType) { if (rangeType == null) { throw new IllegalArgumentException("Null 'rangeType' argument."); } this.rangeType = rangeType; notifyListeners(new AxisChangeEvent(this)); }
NumberAxis extends ValueAxis implements Cloneable, Serializable { public void setRangeType(RangeType rangeType) { if (rangeType == null) { throw new IllegalArgumentException("Null 'rangeType' argument."); } this.rangeType = rangeType; notifyListeners(new AxisChangeEvent(this)); } }
NumberAxis extends ValueAxis implements Cloneable, Serializable { public void setRangeType(RangeType rangeType) { if (rangeType == null) { throw new IllegalArgumentException("Null 'rangeType' argument."); } this.rangeType = rangeType; notifyListeners(new AxisChangeEvent(this)); } NumberAxis();  NumberAxis(String label); }
NumberAxis extends ValueAxis implements Cloneable, Serializable { public void setRangeType(RangeType rangeType) { if (rangeType == null) { throw new IllegalArgumentException("Null 'rangeType' argument."); } this.rangeType = rangeType; notifyListeners(new AxisChangeEvent(this)); } NumberAxis();  NumberAxis(String label); RangeType getRangeType(); void setRangeType(RangeType rangeType); boolean getAutoRangeIncludesZero(); void setAutoRangeIncludesZero(boolean flag); boolean getAutoRangeStickyZero(); void setAutoRangeStickyZero(boolean flag); NumberTickUnit getTickUnit(); void setTickUnit(NumberTickUnit unit); void setTickUnit(NumberTickUnit unit, boolean notify,
                            boolean turnOffAutoSelect); NumberFormat getNumberFormatOverride(); void setNumberFormatOverride(NumberFormat formatter); MarkerAxisBand getMarkerBand(); void setMarkerBand(MarkerAxisBand band); @Override void configure(); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); static TickUnitSource createStandardTickUnits(); static TickUnitSource createIntegerTickUnits(); static TickUnitSource createStandardTickUnits(Locale locale); static TickUnitSource createIntegerTickUnits(Locale locale); @Override List<ValueTick> refreshTicks(Graphics2D g2,
                             AxisState state,
                             Rectangle2D dataArea,
                             RectangleEdge edge); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); }
NumberAxis extends ValueAxis implements Cloneable, Serializable { public void setRangeType(RangeType rangeType) { if (rangeType == null) { throw new IllegalArgumentException("Null 'rangeType' argument."); } this.rangeType = rangeType; notifyListeners(new AxisChangeEvent(this)); } NumberAxis();  NumberAxis(String label); RangeType getRangeType(); void setRangeType(RangeType rangeType); boolean getAutoRangeIncludesZero(); void setAutoRangeIncludesZero(boolean flag); boolean getAutoRangeStickyZero(); void setAutoRangeStickyZero(boolean flag); NumberTickUnit getTickUnit(); void setTickUnit(NumberTickUnit unit); void setTickUnit(NumberTickUnit unit, boolean notify,
                            boolean turnOffAutoSelect); NumberFormat getNumberFormatOverride(); void setNumberFormatOverride(NumberFormat formatter); MarkerAxisBand getMarkerBand(); void setMarkerBand(MarkerAxisBand band); @Override void configure(); @Override double valueToJava2D(double value, Rectangle2D area,
                                RectangleEdge edge); @Override double java2DToValue(double java2DValue, Rectangle2D area,
                                RectangleEdge edge); @Override AxisState draw(Graphics2D g2, double cursor, Rectangle2D plotArea,
            Rectangle2D dataArea, RectangleEdge edge,
            PlotRenderingInfo plotState); static TickUnitSource createStandardTickUnits(); static TickUnitSource createIntegerTickUnits(); static TickUnitSource createStandardTickUnits(Locale locale); static TickUnitSource createIntegerTickUnits(Locale locale); @Override List<ValueTick> refreshTicks(Graphics2D g2,
                             AxisState state,
                             Rectangle2D dataArea,
                             RectangleEdge edge); @Override Object clone(); @Override boolean equals(Object obj); @Override int hashCode(); static final boolean DEFAULT_AUTO_RANGE_INCLUDES_ZERO; static final boolean DEFAULT_AUTO_RANGE_STICKY_ZERO; static final NumberTickUnit DEFAULT_TICK_UNIT; static final boolean DEFAULT_VERTICAL_TICK_LABELS; }