@Test public void testListenersWithXYPlot() { XYPlot plot = new XYPlot(); ValueMarker marker1 = new ValueMarker(1.0); ValueMarker marker2 = new ValueMarker(2.0); plot.addDomainMarker(marker1); plot.addRangeMarker(marker2); EventListener[] listeners1 = marker1.getListeners( MarkerChangeListener.class); assertTrue(Arrays.asList(listeners1).contains(plot)); EventListener[] listeners2 = marker1.getListeners( MarkerChangeListener.class); assertTrue(Arrays.asList(listeners2).contains(plot)); plot.clearDomainMarkers(); plot.clearRangeMarkers(); listeners1 = marker1.getListeners(MarkerChangeListener.class); assertFalse(Arrays.asList(listeners1).contains(plot)); listeners2 = marker1.getListeners(MarkerChangeListener.class); assertFalse(Arrays.asList(listeners2).contains(plot)); }
public EventListener[] getListeners(Class listenerType) { return this.listenerList.getListeners(listenerType); }
Marker implements Cloneable, Serializable { public EventListener[] getListeners(Class listenerType) { return this.listenerList.getListeners(listenerType); } }
Marker implements Cloneable, Serializable { public EventListener[] getListeners(Class listenerType) { return this.listenerList.getListeners(listenerType); } protected  Marker(); protected  Marker(Paint paint); protected  Marker(Paint paint, Stroke stroke,
                     Paint outlinePaint, Stroke outlineStroke,
                     float alpha); }
Marker implements Cloneable, Serializable { public EventListener[] getListeners(Class listenerType) { return this.listenerList.getListeners(listenerType); } protected  Marker(); protected  Marker(Paint paint); protected  Marker(Paint paint, Stroke stroke,
                     Paint outlinePaint, Stroke outlineStroke,
                     float alpha); Paint getPaint(); void setPaint(Paint paint); Stroke getStroke(); void setStroke(Stroke stroke); Paint getOutlinePaint(); void setOutlinePaint(Paint paint); Stroke getOutlineStroke(); void setOutlineStroke(Stroke stroke); float getAlpha(); void setAlpha(float alpha); String getLabel(); void setLabel(String label); Font getLabelFont(); void setLabelFont(Font font); Paint getLabelPaint(); void setLabelPaint(Paint paint); RectangleAnchor getLabelAnchor(); void setLabelAnchor(RectangleAnchor anchor); RectangleInsets getLabelOffset(); void setLabelOffset(RectangleInsets offset); LengthAdjustmentType getLabelOffsetType(); void setLabelOffsetType(LengthAdjustmentType adj); TextAnchor getLabelTextAnchor(); void setLabelTextAnchor(TextAnchor anchor); void addChangeListener(MarkerChangeListener listener); void removeChangeListener(MarkerChangeListener listener); void notifyListeners(MarkerChangeEvent event); EventListener[] getListeners(Class listenerType); @Override boolean equals(Object obj); @Override Object clone(); }
Marker implements Cloneable, Serializable { public EventListener[] getListeners(Class listenerType) { return this.listenerList.getListeners(listenerType); } protected  Marker(); protected  Marker(Paint paint); protected  Marker(Paint paint, Stroke stroke,
                     Paint outlinePaint, Stroke outlineStroke,
                     float alpha); Paint getPaint(); void setPaint(Paint paint); Stroke getStroke(); void setStroke(Stroke stroke); Paint getOutlinePaint(); void setOutlinePaint(Paint paint); Stroke getOutlineStroke(); void setOutlineStroke(Stroke stroke); float getAlpha(); void setAlpha(float alpha); String getLabel(); void setLabel(String label); Font getLabelFont(); void setLabelFont(Font font); Paint getLabelPaint(); void setLabelPaint(Paint paint); RectangleAnchor getLabelAnchor(); void setLabelAnchor(RectangleAnchor anchor); RectangleInsets getLabelOffset(); void setLabelOffset(RectangleInsets offset); LengthAdjustmentType getLabelOffsetType(); void setLabelOffsetType(LengthAdjustmentType adj); TextAnchor getLabelTextAnchor(); void setLabelTextAnchor(TextAnchor anchor); void addChangeListener(MarkerChangeListener listener); void removeChangeListener(MarkerChangeListener listener); void notifyListeners(MarkerChangeEvent event); EventListener[] getListeners(Class listenerType); @Override boolean equals(Object obj); @Override Object clone();  }