/** * A test for the equals() method. */ public void testEquals() { // test the tokens for equality... assertEquals(AreaRendererEndType.LEVEL, AreaRendererEndType.LEVEL); assertEquals(AreaRendererEndType.TAPER, AreaRendererEndType.TAPER); assertEquals(AreaRendererEndType.TRUNCATE, AreaRendererEndType.TRUNCATE); }
/** * Sets a token that controls how the renderer draws the end points, and sends * a {@link RendererChangeEvent} to all registered listeners. * * @param type the end type (<code>null</code> not permitted). */ public void setEndType(AreaRendererEndType type) { if (type == null) { throw new IllegalArgumentException("Null 'type' argument."); } this.endType = type; notifyListeners(new RendererChangeEvent(this)); }
/** * A test for the equals() method. */ public void testEquals() { assertEquals(AreaRendererEndType.LEVEL, AreaRendererEndType.LEVEL); assertEquals(AreaRendererEndType.TAPER, AreaRendererEndType.TAPER); assertEquals( AreaRendererEndType.TRUNCATE, AreaRendererEndType.TRUNCATE ); }
/** * Check that the equals() method distinguishes all fields. */ public void testEquals() { AreaRenderer r1 = new AreaRenderer(); AreaRenderer r2 = new AreaRenderer(); assertEquals(r1, r2); r1.setEndType(AreaRendererEndType.LEVEL); assertFalse(r1.equals(r2)); r2.setEndType(AreaRendererEndType.LEVEL); assertTrue(r1.equals(r2)); }
/** * Check that the equals() method distinguishes all fields. */ @Test public void testEquals() { AreaRenderer r1 = new AreaRenderer(); AreaRenderer r2 = new AreaRenderer(); assertEquals(r1, r2); r1.setEndType(AreaRendererEndType.LEVEL); assertFalse(r1.equals(r2)); r2.setEndType(AreaRendererEndType.LEVEL); assertTrue(r1.equals(r2)); }
/** * Creates a new renderer. */ public AreaRenderer() { super(); this.endType = AreaRendererEndType.TAPER; }
/** * Creates a new renderer. */ public AreaRenderer() { super(); this.endType = AreaRendererEndType.TAPER; setBaseLegendShape(new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0)); }
/** * Creates a new renderer. */ public AreaRenderer() { super(); this.endType = AreaRendererEndType.TAPER; setDefaultLegendShape(new Rectangle2D.Double(-4.0, -4.0, 8.0, 8.0)); }
/** * Sets a token that controls how the renderer draws the end points, and * sends a {@link RendererChangeEvent} to all registered listeners. * * @param type the end type (<code>null</code> not permitted). * * @see #getEndType() */ public void setEndType(AreaRendererEndType type) { if (type == null) { throw new IllegalArgumentException("Null 'type' argument."); } this.endType = type; notifyListeners(new RendererChangeEvent(this)); }
/** * Sets a token that controls how the renderer draws the end points, and * sends a {@link RendererChangeEvent} to all registered listeners. * * @param type the end type (<code>null</code> not permitted). * * @see #getEndType() */ public void setEndType(AreaRendererEndType type) { if (type == null) { throw new IllegalArgumentException("Null 'type' argument."); } this.endType = type; fireChangeEvent(); }