@Test public void testCapListener() { DialPlot p = new DialPlot(); DialCap c1 = new DialCap(); p.setCap(c1); p.addChangeListener(this); this.lastEvent = null; c1.setFillPaint(Color.RED); assertNotNull(this.lastEvent); DialCap c2 = new DialCap(); p.setCap(c2); this.lastEvent = null; c1.setFillPaint(Color.BLUE); assertNull(this.lastEvent); c2.setFillPaint(Color.green); assertNotNull(this.lastEvent); }
public void setCap(DialLayer cap) { if (this.cap != null) { this.cap.removeChangeListener(this); } this.cap = cap; if (cap != null) { cap.addChangeListener(this); } fireChangeEvent(); }
DialPlot extends Plot implements DialLayerChangeListener { public void setCap(DialLayer cap) { if (this.cap != null) { this.cap.removeChangeListener(this); } this.cap = cap; if (cap != null) { cap.addChangeListener(this); } fireChangeEvent(); } }
DialPlot extends Plot implements DialLayerChangeListener { public void setCap(DialLayer cap) { if (this.cap != null) { this.cap.removeChangeListener(this); } this.cap = cap; if (cap != null) { cap.addChangeListener(this); } fireChangeEvent(); } DialPlot();  DialPlot(ValueDataset dataset); }
DialPlot extends Plot implements DialLayerChangeListener { public void setCap(DialLayer cap) { if (this.cap != null) { this.cap.removeChangeListener(this); } this.cap = cap; if (cap != null) { cap.addChangeListener(this); } fireChangeEvent(); } DialPlot();  DialPlot(ValueDataset dataset); DialLayer getBackground(); void setBackground(DialLayer background); DialLayer getCap(); void setCap(DialLayer cap); DialFrame getDialFrame(); void setDialFrame(DialFrame frame); double getViewX(); double getViewY(); double getViewWidth(); double getViewHeight(); void setView(double x, double y, double w, double h); void addLayer(DialLayer layer); int getLayerIndex(DialLayer layer); void removeLayer(int index); void removeLayer(DialLayer layer); void addPointer(DialPointer pointer); int getPointerIndex(DialPointer pointer); void removePointer(int index); void removePointer(DialPointer pointer); DialPointer getPointerForDataset(int datasetIndex); ValueDataset getDataset(); ValueDataset getDataset(int index); void setDataset(ValueDataset dataset); void setDataset(int index, ValueDataset dataset); int getDatasetCount(); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); double getValue(int datasetIndex); void addScale(int index, DialScale scale); DialScale getScale(int index); void mapDatasetToScale(int index, int scaleIndex); DialScale getScaleForDataset(int datasetIndex); static Rectangle2D rectangleByRadius(Rectangle2D rect,
            double radiusW, double radiusH); @Override void dialLayerChanged(DialLayerChangeEvent event); @Override boolean equals(Object obj); @Override int hashCode(); @Override String getPlotType(); }
DialPlot extends Plot implements DialLayerChangeListener { public void setCap(DialLayer cap) { if (this.cap != null) { this.cap.removeChangeListener(this); } this.cap = cap; if (cap != null) { cap.addChangeListener(this); } fireChangeEvent(); } DialPlot();  DialPlot(ValueDataset dataset); DialLayer getBackground(); void setBackground(DialLayer background); DialLayer getCap(); void setCap(DialLayer cap); DialFrame getDialFrame(); void setDialFrame(DialFrame frame); double getViewX(); double getViewY(); double getViewWidth(); double getViewHeight(); void setView(double x, double y, double w, double h); void addLayer(DialLayer layer); int getLayerIndex(DialLayer layer); void removeLayer(int index); void removeLayer(DialLayer layer); void addPointer(DialPointer pointer); int getPointerIndex(DialPointer pointer); void removePointer(int index); void removePointer(DialPointer pointer); DialPointer getPointerForDataset(int datasetIndex); ValueDataset getDataset(); ValueDataset getDataset(int index); void setDataset(ValueDataset dataset); void setDataset(int index, ValueDataset dataset); int getDatasetCount(); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); double getValue(int datasetIndex); void addScale(int index, DialScale scale); DialScale getScale(int index); void mapDatasetToScale(int index, int scaleIndex); DialScale getScaleForDataset(int datasetIndex); static Rectangle2D rectangleByRadius(Rectangle2D rect,
            double radiusW, double radiusH); @Override void dialLayerChanged(DialLayerChangeEvent event); @Override boolean equals(Object obj); @Override int hashCode(); @Override String getPlotType();  }