Java Code Examples for org.jfree.chart.plot.CategoryMarker#addChangeListener()
The following examples show how to use
org.jfree.chart.plot.CategoryMarker#addChangeListener() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CategoryMarkerTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Some checks for the getKey() and setKey() methods. */ public void testGetSetKey() { CategoryMarker m = new CategoryMarker("X"); m.addChangeListener(this); this.lastEvent = null; assertEquals("X", m.getKey()); m.setKey("Y"); assertEquals("Y", m.getKey()); assertEquals(m, this.lastEvent.getMarker()); // check null argument... try { m.setKey(null); fail("Expected an IllegalArgumentException for null."); } catch (IllegalArgumentException e) { assertTrue(true); } }
Example 2
Source File: CategoryMarkerTests.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Some checks for the getKey() and setKey() methods. */ public void testGetSetKey() { CategoryMarker m = new CategoryMarker("X"); m.addChangeListener(this); this.lastEvent = null; assertEquals("X", m.getKey()); m.setKey("Y"); assertEquals("Y", m.getKey()); assertEquals(m, this.lastEvent.getMarker()); // check null argument... try { m.setKey(null); fail("Expected an IllegalArgumentException for null."); } catch (IllegalArgumentException e) { assertTrue(true); } }
Example 3
Source File: CategoryMarkerTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Some checks for the getDrawAsLine() and setDrawAsLine() methods. */ public void testGetSetDrawAsLine() { CategoryMarker m = new CategoryMarker("X"); m.addChangeListener(this); this.lastEvent = null; assertEquals(false, m.getDrawAsLine()); m.setDrawAsLine(true); assertEquals(true, m.getDrawAsLine()); assertEquals(m, this.lastEvent.getMarker()); }
Example 4
Source File: CategoryMarkerTests.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Some checks for the getDrawAsLine() and setDrawAsLine() methods. */ public void testGetSetDrawAsLine() { CategoryMarker m = new CategoryMarker("X"); m.addChangeListener(this); this.lastEvent = null; assertEquals(false, m.getDrawAsLine()); m.setDrawAsLine(true); assertEquals(true, m.getDrawAsLine()); assertEquals(m, this.lastEvent.getMarker()); }