@Test public void testAddDomainMarker() { CategoryPlot plot = new CategoryPlot(); CategoryMarker m = new CategoryMarker("C1"); plot.addDomainMarker(m); List listeners = Arrays.asList(m.getListeners( MarkerChangeListener.class)); assertTrue(listeners.contains(plot)); plot.clearDomainMarkers(); listeners = Arrays.asList(m.getListeners(MarkerChangeListener.class)); assertFalse(listeners.contains(plot)); }
public void addDomainMarker(CategoryMarker marker) { addDomainMarker(marker, Layer.FOREGROUND); }
CategoryPlot extends Plot implements ValueAxisPlot, Pannable,
        Zoomable, AnnotationChangeListener, RendererChangeListener,
        Cloneable, PublicCloneable, Serializable { public void addDomainMarker(CategoryMarker marker) { addDomainMarker(marker, Layer.FOREGROUND); } }
CategoryPlot extends Plot implements ValueAxisPlot, Pannable,
        Zoomable, AnnotationChangeListener, RendererChangeListener,
        Cloneable, PublicCloneable, Serializable { public void addDomainMarker(CategoryMarker marker) { addDomainMarker(marker, Layer.FOREGROUND); } CategoryPlot();  CategoryPlot(CategoryDataset dataset,
                        CategoryAxis domainAxis,
                        ValueAxis rangeAxis,
                        CategoryItemRenderer renderer); }
CategoryPlot extends Plot implements ValueAxisPlot, Pannable,
        Zoomable, AnnotationChangeListener, RendererChangeListener,
        Cloneable, PublicCloneable, Serializable { public void addDomainMarker(CategoryMarker marker) { addDomainMarker(marker, Layer.FOREGROUND); } CategoryPlot();  CategoryPlot(CategoryDataset dataset,
                        CategoryAxis domainAxis,
                        ValueAxis rangeAxis,
                        CategoryItemRenderer renderer); @Override String getPlotType(); @Override PlotOrientation getOrientation(); void setOrientation(PlotOrientation orientation); RectangleInsets getAxisOffset(); void setAxisOffset(RectangleInsets offset); CategoryAxis getDomainAxis(); CategoryAxis getDomainAxis(int index); void setDomainAxis(CategoryAxis axis); void setDomainAxis(int index, CategoryAxis axis); void setDomainAxis(int index, CategoryAxis axis, boolean notify); void setDomainAxes(CategoryAxis[] axes); int getDomainAxisIndex(CategoryAxis axis); AxisLocation getDomainAxisLocation(); AxisLocation getDomainAxisLocation(int index); void setDomainAxisLocation(AxisLocation location); void setDomainAxisLocation(AxisLocation location, boolean notify); void setDomainAxisLocation(int index, AxisLocation location); void setDomainAxisLocation(int index, AxisLocation location,
            boolean notify); RectangleEdge getDomainAxisEdge(); RectangleEdge getDomainAxisEdge(int index); int getDomainAxisCount(); void clearDomainAxes(); void configureDomainAxes(); ValueAxis getRangeAxis(); ValueAxis getRangeAxis(int index); void setRangeAxis(ValueAxis axis); void setRangeAxis(int index, ValueAxis axis); void setRangeAxis(int index, ValueAxis axis, boolean notify); void setRangeAxes(ValueAxis[] axes); int getRangeAxisIndex(ValueAxis axis); AxisLocation getRangeAxisLocation(); AxisLocation getRangeAxisLocation(int index); void setRangeAxisLocation(AxisLocation location); void setRangeAxisLocation(AxisLocation location, boolean notify); void setRangeAxisLocation(int index, AxisLocation location); void setRangeAxisLocation(int index, AxisLocation location,
                                     boolean notify); RectangleEdge getRangeAxisEdge(); RectangleEdge getRangeAxisEdge(int index); int getRangeAxisCount(); void clearRangeAxes(); void configureRangeAxes(); CategoryDataset getDataset(); CategoryDataset getDataset(int index); void setDataset(CategoryDataset dataset); void setDataset(int index, CategoryDataset dataset); int getDatasetCount(); int indexOf(CategoryDataset dataset); void mapDatasetToDomainAxis(int index, int axisIndex); void mapDatasetToDomainAxes(int index, List<Integer> axisIndices); CategoryAxis getDomainAxisForDataset(int index); void mapDatasetToRangeAxis(int index, int axisIndex); void mapDatasetToRangeAxes(int index, List<Integer> axisIndices); ValueAxis getRangeAxisForDataset(int index); int getRendererCount(); CategoryItemRenderer getRenderer(); CategoryItemRenderer getRenderer(int index); void setRenderer(CategoryItemRenderer renderer); void setRenderer(CategoryItemRenderer renderer, boolean notify); void setRenderer(int index, CategoryItemRenderer renderer); void setRenderer(int index, CategoryItemRenderer renderer,
                            boolean notify); void setRenderers(CategoryItemRenderer[] renderers); CategoryItemRenderer getRendererForDataset(CategoryDataset dataset); int getIndexOf(CategoryItemRenderer renderer); DatasetRenderingOrder getDatasetRenderingOrder(); void setDatasetRenderingOrder(DatasetRenderingOrder order); SortOrder getColumnRenderingOrder(); void setColumnRenderingOrder(SortOrder order); SortOrder getRowRenderingOrder(); void setRowRenderingOrder(SortOrder order); boolean isDomainGridlinesVisible(); void setDomainGridlinesVisible(boolean visible); CategoryAnchor getDomainGridlinePosition(); void setDomainGridlinePosition(CategoryAnchor position); Stroke getDomainGridlineStroke(); void setDomainGridlineStroke(Stroke stroke); Paint getDomainGridlinePaint(); void setDomainGridlinePaint(Paint paint); boolean isRangeZeroBaselineVisible(); void setRangeZeroBaselineVisible(boolean visible); Stroke getRangeZeroBaselineStroke(); void setRangeZeroBaselineStroke(Stroke stroke); Paint getRangeZeroBaselinePaint(); void setRangeZeroBaselinePaint(Paint paint); boolean isRangeGridlinesVisible(); void setRangeGridlinesVisible(boolean visible); Stroke getRangeGridlineStroke(); void setRangeGridlineStroke(Stroke stroke); Paint getRangeGridlinePaint(); void setRangeGridlinePaint(Paint paint); boolean isRangeMinorGridlinesVisible(); void setRangeMinorGridlinesVisible(boolean visible); Stroke getRangeMinorGridlineStroke(); void setRangeMinorGridlineStroke(Stroke stroke); Paint getRangeMinorGridlinePaint(); void setRangeMinorGridlinePaint(Paint paint); List<LegendItem> getFixedLegendItems(); void setFixedLegendItems(List<LegendItem> items); @Override List<LegendItem> getLegendItems(); @Override void handleClick(int x, int y, PlotRenderingInfo info); @Override void zoom(double percent); @Override void annotationChanged(AnnotationChangeEvent event); @Override void datasetChanged(DatasetChangeEvent event); @Override void rendererChanged(RendererChangeEvent event); void addDomainMarker(CategoryMarker marker); void addDomainMarker(CategoryMarker marker, Layer layer); void addDomainMarker(int index, CategoryMarker marker, Layer layer); void addDomainMarker(int index, CategoryMarker marker, Layer layer,
            boolean notify); void clearDomainMarkers(); Collection<Marker> getDomainMarkers(Layer layer); Collection<Marker> getDomainMarkers(int index, Layer layer); void clearDomainMarkers(int index); boolean removeDomainMarker(Marker marker); boolean removeDomainMarker(Marker marker, Layer layer); boolean removeDomainMarker(int index, Marker marker, Layer layer); boolean removeDomainMarker(int index, Marker marker, Layer layer,
            boolean notify); void addRangeMarker(Marker marker); void addRangeMarker(Marker marker, Layer layer); void addRangeMarker(int index, Marker marker, Layer layer); void addRangeMarker(int index, Marker marker, Layer layer,
            boolean notify); void clearRangeMarkers(); Collection<Marker> getRangeMarkers(Layer layer); Collection<Marker> getRangeMarkers(int index, Layer layer); void clearRangeMarkers(int index); boolean removeRangeMarker(Marker marker); boolean removeRangeMarker(Marker marker, Layer layer); boolean removeRangeMarker(int index, Marker marker, Layer layer); boolean removeRangeMarker(int index, Marker marker, Layer layer,
            boolean notify); boolean isDomainCrosshairVisible(); void setDomainCrosshairVisible(boolean flag); Comparable getDomainCrosshairRowKey(); void setDomainCrosshairRowKey(Comparable key); void setDomainCrosshairRowKey(Comparable key, boolean notify); Comparable getDomainCrosshairColumnKey(); void setDomainCrosshairColumnKey(Comparable key); void setDomainCrosshairColumnKey(Comparable key, boolean notify); int getCrosshairDatasetIndex(); void setCrosshairDatasetIndex(int index); void setCrosshairDatasetIndex(int index, boolean notify); Paint getDomainCrosshairPaint(); void setDomainCrosshairPaint(Paint paint); Stroke getDomainCrosshairStroke(); void setDomainCrosshairStroke(Stroke stroke); boolean isRangeCrosshairVisible(); void setRangeCrosshairVisible(boolean flag); boolean isRangeCrosshairLockedOnData(); void setRangeCrosshairLockedOnData(boolean flag); double getRangeCrosshairValue(); void setRangeCrosshairValue(double value); void setRangeCrosshairValue(double value, boolean notify); Stroke getRangeCrosshairStroke(); void setRangeCrosshairStroke(Stroke stroke); Paint getRangeCrosshairPaint(); void setRangeCrosshairPaint(Paint paint); List<CategoryAnnotation> getAnnotations(); void addAnnotation(CategoryAnnotation annotation); void addAnnotation(CategoryAnnotation annotation, boolean notify); boolean removeAnnotation(CategoryAnnotation annotation); boolean removeAnnotation(CategoryAnnotation annotation,
            boolean notify); void clearAnnotations(); ShadowGenerator getShadowGenerator(); void setShadowGenerator(ShadowGenerator generator); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo state); @Override void drawBackground(Graphics2D g2, Rectangle2D area); boolean render(Graphics2D g2, Rectangle2D dataArea, int index,
            PlotRenderingInfo info, CategoryCrosshairState crosshairState); @Override Range getDataRange(ValueAxis axis); int getWeight(); void setWeight(int weight); AxisSpace getFixedDomainAxisSpace(); void setFixedDomainAxisSpace(AxisSpace space); void setFixedDomainAxisSpace(AxisSpace space, boolean notify); AxisSpace getFixedRangeAxisSpace(); void setFixedRangeAxisSpace(AxisSpace space); void setFixedRangeAxisSpace(AxisSpace space, boolean notify); List<Comparable> getCategories(); List<Comparable> getCategoriesForAxis(CategoryAxis axis); boolean getDrawSharedDomainAxis(); void setDrawSharedDomainAxis(boolean draw); @Override boolean isDomainPannable(); @Override boolean isRangePannable(); void setRangePannable(boolean pannable); @Override void panDomainAxes(double percent, PlotRenderingInfo info,
            Point2D source); @Override void panRangeAxes(double percent, PlotRenderingInfo info,
            Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomDomainAxes(double factor, PlotRenderingInfo info,
                               Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); double getAnchorValue(); void setAnchorValue(double value); void setAnchorValue(double value, boolean notify); @Override boolean equals(Object obj); @Override Object clone(); }
CategoryPlot extends Plot implements ValueAxisPlot, Pannable,
        Zoomable, AnnotationChangeListener, RendererChangeListener,
        Cloneable, PublicCloneable, Serializable { public void addDomainMarker(CategoryMarker marker) { addDomainMarker(marker, Layer.FOREGROUND); } CategoryPlot();  CategoryPlot(CategoryDataset dataset,
                        CategoryAxis domainAxis,
                        ValueAxis rangeAxis,
                        CategoryItemRenderer renderer); @Override String getPlotType(); @Override PlotOrientation getOrientation(); void setOrientation(PlotOrientation orientation); RectangleInsets getAxisOffset(); void setAxisOffset(RectangleInsets offset); CategoryAxis getDomainAxis(); CategoryAxis getDomainAxis(int index); void setDomainAxis(CategoryAxis axis); void setDomainAxis(int index, CategoryAxis axis); void setDomainAxis(int index, CategoryAxis axis, boolean notify); void setDomainAxes(CategoryAxis[] axes); int getDomainAxisIndex(CategoryAxis axis); AxisLocation getDomainAxisLocation(); AxisLocation getDomainAxisLocation(int index); void setDomainAxisLocation(AxisLocation location); void setDomainAxisLocation(AxisLocation location, boolean notify); void setDomainAxisLocation(int index, AxisLocation location); void setDomainAxisLocation(int index, AxisLocation location,
            boolean notify); RectangleEdge getDomainAxisEdge(); RectangleEdge getDomainAxisEdge(int index); int getDomainAxisCount(); void clearDomainAxes(); void configureDomainAxes(); ValueAxis getRangeAxis(); ValueAxis getRangeAxis(int index); void setRangeAxis(ValueAxis axis); void setRangeAxis(int index, ValueAxis axis); void setRangeAxis(int index, ValueAxis axis, boolean notify); void setRangeAxes(ValueAxis[] axes); int getRangeAxisIndex(ValueAxis axis); AxisLocation getRangeAxisLocation(); AxisLocation getRangeAxisLocation(int index); void setRangeAxisLocation(AxisLocation location); void setRangeAxisLocation(AxisLocation location, boolean notify); void setRangeAxisLocation(int index, AxisLocation location); void setRangeAxisLocation(int index, AxisLocation location,
                                     boolean notify); RectangleEdge getRangeAxisEdge(); RectangleEdge getRangeAxisEdge(int index); int getRangeAxisCount(); void clearRangeAxes(); void configureRangeAxes(); CategoryDataset getDataset(); CategoryDataset getDataset(int index); void setDataset(CategoryDataset dataset); void setDataset(int index, CategoryDataset dataset); int getDatasetCount(); int indexOf(CategoryDataset dataset); void mapDatasetToDomainAxis(int index, int axisIndex); void mapDatasetToDomainAxes(int index, List<Integer> axisIndices); CategoryAxis getDomainAxisForDataset(int index); void mapDatasetToRangeAxis(int index, int axisIndex); void mapDatasetToRangeAxes(int index, List<Integer> axisIndices); ValueAxis getRangeAxisForDataset(int index); int getRendererCount(); CategoryItemRenderer getRenderer(); CategoryItemRenderer getRenderer(int index); void setRenderer(CategoryItemRenderer renderer); void setRenderer(CategoryItemRenderer renderer, boolean notify); void setRenderer(int index, CategoryItemRenderer renderer); void setRenderer(int index, CategoryItemRenderer renderer,
                            boolean notify); void setRenderers(CategoryItemRenderer[] renderers); CategoryItemRenderer getRendererForDataset(CategoryDataset dataset); int getIndexOf(CategoryItemRenderer renderer); DatasetRenderingOrder getDatasetRenderingOrder(); void setDatasetRenderingOrder(DatasetRenderingOrder order); SortOrder getColumnRenderingOrder(); void setColumnRenderingOrder(SortOrder order); SortOrder getRowRenderingOrder(); void setRowRenderingOrder(SortOrder order); boolean isDomainGridlinesVisible(); void setDomainGridlinesVisible(boolean visible); CategoryAnchor getDomainGridlinePosition(); void setDomainGridlinePosition(CategoryAnchor position); Stroke getDomainGridlineStroke(); void setDomainGridlineStroke(Stroke stroke); Paint getDomainGridlinePaint(); void setDomainGridlinePaint(Paint paint); boolean isRangeZeroBaselineVisible(); void setRangeZeroBaselineVisible(boolean visible); Stroke getRangeZeroBaselineStroke(); void setRangeZeroBaselineStroke(Stroke stroke); Paint getRangeZeroBaselinePaint(); void setRangeZeroBaselinePaint(Paint paint); boolean isRangeGridlinesVisible(); void setRangeGridlinesVisible(boolean visible); Stroke getRangeGridlineStroke(); void setRangeGridlineStroke(Stroke stroke); Paint getRangeGridlinePaint(); void setRangeGridlinePaint(Paint paint); boolean isRangeMinorGridlinesVisible(); void setRangeMinorGridlinesVisible(boolean visible); Stroke getRangeMinorGridlineStroke(); void setRangeMinorGridlineStroke(Stroke stroke); Paint getRangeMinorGridlinePaint(); void setRangeMinorGridlinePaint(Paint paint); List<LegendItem> getFixedLegendItems(); void setFixedLegendItems(List<LegendItem> items); @Override List<LegendItem> getLegendItems(); @Override void handleClick(int x, int y, PlotRenderingInfo info); @Override void zoom(double percent); @Override void annotationChanged(AnnotationChangeEvent event); @Override void datasetChanged(DatasetChangeEvent event); @Override void rendererChanged(RendererChangeEvent event); void addDomainMarker(CategoryMarker marker); void addDomainMarker(CategoryMarker marker, Layer layer); void addDomainMarker(int index, CategoryMarker marker, Layer layer); void addDomainMarker(int index, CategoryMarker marker, Layer layer,
            boolean notify); void clearDomainMarkers(); Collection<Marker> getDomainMarkers(Layer layer); Collection<Marker> getDomainMarkers(int index, Layer layer); void clearDomainMarkers(int index); boolean removeDomainMarker(Marker marker); boolean removeDomainMarker(Marker marker, Layer layer); boolean removeDomainMarker(int index, Marker marker, Layer layer); boolean removeDomainMarker(int index, Marker marker, Layer layer,
            boolean notify); void addRangeMarker(Marker marker); void addRangeMarker(Marker marker, Layer layer); void addRangeMarker(int index, Marker marker, Layer layer); void addRangeMarker(int index, Marker marker, Layer layer,
            boolean notify); void clearRangeMarkers(); Collection<Marker> getRangeMarkers(Layer layer); Collection<Marker> getRangeMarkers(int index, Layer layer); void clearRangeMarkers(int index); boolean removeRangeMarker(Marker marker); boolean removeRangeMarker(Marker marker, Layer layer); boolean removeRangeMarker(int index, Marker marker, Layer layer); boolean removeRangeMarker(int index, Marker marker, Layer layer,
            boolean notify); boolean isDomainCrosshairVisible(); void setDomainCrosshairVisible(boolean flag); Comparable getDomainCrosshairRowKey(); void setDomainCrosshairRowKey(Comparable key); void setDomainCrosshairRowKey(Comparable key, boolean notify); Comparable getDomainCrosshairColumnKey(); void setDomainCrosshairColumnKey(Comparable key); void setDomainCrosshairColumnKey(Comparable key, boolean notify); int getCrosshairDatasetIndex(); void setCrosshairDatasetIndex(int index); void setCrosshairDatasetIndex(int index, boolean notify); Paint getDomainCrosshairPaint(); void setDomainCrosshairPaint(Paint paint); Stroke getDomainCrosshairStroke(); void setDomainCrosshairStroke(Stroke stroke); boolean isRangeCrosshairVisible(); void setRangeCrosshairVisible(boolean flag); boolean isRangeCrosshairLockedOnData(); void setRangeCrosshairLockedOnData(boolean flag); double getRangeCrosshairValue(); void setRangeCrosshairValue(double value); void setRangeCrosshairValue(double value, boolean notify); Stroke getRangeCrosshairStroke(); void setRangeCrosshairStroke(Stroke stroke); Paint getRangeCrosshairPaint(); void setRangeCrosshairPaint(Paint paint); List<CategoryAnnotation> getAnnotations(); void addAnnotation(CategoryAnnotation annotation); void addAnnotation(CategoryAnnotation annotation, boolean notify); boolean removeAnnotation(CategoryAnnotation annotation); boolean removeAnnotation(CategoryAnnotation annotation,
            boolean notify); void clearAnnotations(); ShadowGenerator getShadowGenerator(); void setShadowGenerator(ShadowGenerator generator); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo state); @Override void drawBackground(Graphics2D g2, Rectangle2D area); boolean render(Graphics2D g2, Rectangle2D dataArea, int index,
            PlotRenderingInfo info, CategoryCrosshairState crosshairState); @Override Range getDataRange(ValueAxis axis); int getWeight(); void setWeight(int weight); AxisSpace getFixedDomainAxisSpace(); void setFixedDomainAxisSpace(AxisSpace space); void setFixedDomainAxisSpace(AxisSpace space, boolean notify); AxisSpace getFixedRangeAxisSpace(); void setFixedRangeAxisSpace(AxisSpace space); void setFixedRangeAxisSpace(AxisSpace space, boolean notify); List<Comparable> getCategories(); List<Comparable> getCategoriesForAxis(CategoryAxis axis); boolean getDrawSharedDomainAxis(); void setDrawSharedDomainAxis(boolean draw); @Override boolean isDomainPannable(); @Override boolean isRangePannable(); void setRangePannable(boolean pannable); @Override void panDomainAxes(double percent, PlotRenderingInfo info,
            Point2D source); @Override void panRangeAxes(double percent, PlotRenderingInfo info,
            Point2D source); @Override boolean isDomainZoomable(); @Override boolean isRangeZoomable(); @Override void zoomDomainAxes(double factor, PlotRenderingInfo state,
                               Point2D source); @Override void zoomDomainAxes(double lowerPercent, double upperPercent,
                               PlotRenderingInfo state, Point2D source); @Override void zoomDomainAxes(double factor, PlotRenderingInfo info,
                               Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double factor, PlotRenderingInfo state,
                              Point2D source); @Override void zoomRangeAxes(double factor, PlotRenderingInfo info,
                              Point2D source, boolean useAnchor); @Override void zoomRangeAxes(double lowerPercent, double upperPercent,
                              PlotRenderingInfo state, Point2D source); double getAnchorValue(); void setAnchorValue(double value); void setAnchorValue(double value, boolean notify); @Override boolean equals(Object obj); @Override Object clone(); static final boolean DEFAULT_DOMAIN_GRIDLINES_VISIBLE; static final boolean DEFAULT_RANGE_GRIDLINES_VISIBLE; static final Stroke DEFAULT_GRIDLINE_STROKE; static final Paint DEFAULT_GRIDLINE_PAINT; static final Font DEFAULT_VALUE_LABEL_FONT; static final boolean DEFAULT_CROSSHAIR_VISIBLE; static final Stroke DEFAULT_CROSSHAIR_STROKE; static final Paint DEFAULT_CROSSHAIR_PAINT; }