📄 xyplot.java
字号:
return result; } /** * Returns the weight for this plot when it is used as a subplot within a * combined plot. * * @return the weight. */ public int getWeight() { return this.weight; } /** * Sets the weight for the plot. * * @param weight the weight. */ public void setWeight(int weight) { this.weight = weight; } /** * Returns <code>true</code> if the domain gridlines are visible, and <code>false<code> * otherwise. * * @return <code>true</code> or <code>false</code>. */ public boolean isDomainGridlinesVisible() { return this.domainGridlinesVisible; } /** * Sets the flag that controls whether or not the domain grid-lines are visible. * <p> * If the flag value is changed, a {@link PlotChangeEvent} is sent to all registered listeners. * * @param visible the new value of the flag. */ public void setDomainGridlinesVisible(boolean visible) { if (this.domainGridlinesVisible != visible) { this.domainGridlinesVisible = visible; notifyListeners(new PlotChangeEvent(this)); } } /** * Returns the stroke for the grid-lines (if any) plotted against the domain axis. * * @return the stroke. */ public Stroke getDomainGridlineStroke() { return this.domainGridlineStroke; } /** * Sets the stroke for the grid lines plotted against the domain axis. * <p> * If you set this to <code>null</code>, no grid lines will be drawn. * * @param stroke the stroke (<code>null</code> permitted). */ public void setDomainGridlineStroke(Stroke stroke) { this.domainGridlineStroke = stroke; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the paint for the grid lines (if any) plotted against the domain axis. * * @return the paint. */ public Paint getDomainGridlinePaint() { return this.domainGridlinePaint; } /** * Sets the paint for the grid lines plotted against the domain axis. * <p> * If you set this to <code>null</code>, no grid lines will be drawn. * * @param paint the paint (<code>null</code> permitted). */ public void setDomainGridlinePaint(Paint paint) { this.domainGridlinePaint = paint; notifyListeners(new PlotChangeEvent(this)); } /** * Returns <code>true</code> if the range axis grid is visible, and <code>false<code> * otherwise. * * @return <code>true</code> or <code>false</code>. */ public boolean isRangeGridlinesVisible() { return this.rangeGridlinesVisible; } /** * Sets the flag that controls whether or not the range axis grid lines are visible. * <p> * If the flag value is changed, a {@link PlotChangeEvent} is sent to all registered listeners. * * @param visible the new value of the flag. */ public void setRangeGridlinesVisible(boolean visible) { if (this.rangeGridlinesVisible != visible) { this.rangeGridlinesVisible = visible; notifyListeners(new PlotChangeEvent(this)); } } /** * Returns the stroke for the grid lines (if any) plotted against the range axis. * * @return the stroke. */ public Stroke getRangeGridlineStroke() { return this.rangeGridlineStroke; } /** * Sets the stroke for the grid lines plotted against the range axis. * <p> * If you set this to <code>null</code>, no grid lines will be drawn. * * @param stroke the stroke (<code>null</code> permitted). */ public void setRangeGridlineStroke(Stroke stroke) { this.rangeGridlineStroke = stroke; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the paint for the grid lines (if any) plotted against the range axis. * * @return the paint. */ public Paint getRangeGridlinePaint() { return this.rangeGridlinePaint; } /** * Sets the paint for the grid lines plotted against the range axis. * <p> * If you set this to <code>null</code>, no grid lines will be drawn. * * @param paint the paint (<code>null</code> permitted). */ public void setRangeGridlinePaint(Paint paint) { this.rangeGridlinePaint = paint; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the paint used for the domain tick bands. If this is <code>null</code>, * no tick bands will be drawn. * * @return The paint (possibly <code>null</code>). */ public Paint getDomainTickBandPaint() { return this.domainTickBandPaint; } /** * Sets the paint for the domain tick bands. * * @param paint the paint (<code>null</code> permitted). */ public void setDomainTickBandPaint(Paint paint) { this.domainTickBandPaint = paint; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the paint used for the range tick bands. If this is <code>null</code>, * no tick bands will be drawn. * * @return The paint (possibly <code>null</code>). */ public Paint getRangeTickBandPaint() { return this.rangeTickBandPaint; } /** * Sets the paint for the range tick bands. * * @param paint the paint (<code>null</code> permitted). */ public void setRangeTickBandPaint(Paint paint) { this.rangeTickBandPaint = paint; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the origin for the quadrants that can be displayed on the plot. This defaults * to (0, 0). * * @return The origin point (never <code>null</code>). */ public Point2D getQuadrantOrigin() { return this.quadrantOrigin; } /** * Sets the quadrant origin and sends a {@link PlotChangeEvent} to all registered * listeners. * * @param origin the origin (<code>null</code> not permitted). */ public void setQuadrantOrigin(Point2D origin) { if (origin == null) { throw new IllegalArgumentException("Null 'origin' argument."); } this.quadrantOrigin = origin; notifyListeners(new PlotChangeEvent(this)); } /** * Returns the paint used for the specified quadrant. * * @param index the quadrant index (0-3). * * @return The paint (possibly <code>null</code>). */ public Paint getQuadrantPaint(int index) { if (index < 0 || index > 3) { throw new IllegalArgumentException("The index should be in the range 0 to 3."); } return this.quadrantPaint[index]; } /** * Sets the paint used for the specified quadrant and sends a {@link PlotChangeEvent} to * all registered listeners. * * @param index the quadrant index (0-3). * @param paint the paint (<code>null</code> permitted). */ public void setQuadrantPaint(int index, Paint paint) { if (index < 0 || index > 3) { throw new IllegalArgumentException("The index should be in the range 0 to 3."); } this.quadrantPaint[index] = paint; notifyListeners(new PlotChangeEvent(this)); } /** * Adds a marker for the domain axis and sends a {@link PlotChangeEvent} to all * registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the range axis, however this is entirely up to the renderer. * * @param marker the marker (<code>null</code> not permitted). */ public void addDomainMarker(Marker marker) { // defer argument checking... addDomainMarker(marker, Layer.FOREGROUND); } /** * Adds a marker for the domain axis in the specified layer and sends a * {@link PlotChangeEvent} to all registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the range axis, however this is entirely up to the renderer. * * @param marker the marker (<code>null</code> not permitted). * @param layer the layer (foreground or background). */ public void addDomainMarker(Marker marker, Layer layer) { addDomainMarker(0, marker, layer); } /** * Clears all the (foreground and background) domain markers and sends a * {@link PlotChangeEvent} to all registered listeners. */ public void clearDomainMarkers() { if (this.foregroundDomainMarkers != null) { this.foregroundDomainMarkers.clear(); } if (this.backgroundDomainMarkers != null) { this.backgroundDomainMarkers.clear(); } notifyListeners(new PlotChangeEvent(this)); } /** * Adds a marker for a renderer and sends a {@link PlotChangeEvent} to * all registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the domain axis (that the renderer is mapped to), however this is entirely up to the * renderer. * * @param index the renderer index. * @param marker the marker. * @param layer the layer (foreground or background). */ public void addDomainMarker(int index, Marker marker, Layer layer) { Collection markers; if (layer == Layer.FOREGROUND) { markers = (Collection) this.foregroundDomainMarkers.get(new Integer(index)); if (markers == null) { markers = new java.util.ArrayList(); this.foregroundDomainMarkers.put(new Integer(index), markers); } markers.add(marker); } else if (layer == Layer.BACKGROUND) { markers = (Collection) this.backgroundDomainMarkers.get(new Integer(index)); if (markers == null) { markers = new java.util.ArrayList(); this.backgroundDomainMarkers.put(new Integer(index), markers); } markers.add(marker); } notifyListeners(new PlotChangeEvent(this)); } /** * Adds a marker for the range axis and sends a {@link PlotChangeEvent} to all * registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the range axis, however this is entirely up to the renderer. * * @param marker the marker (<code>null</code> not permitted). */ public void addRangeMarker(Marker marker) { addRangeMarker(marker, Layer.FOREGROUND); } /** * Adds a marker for the range axis in the specified layer and sends a * {@link PlotChangeEvent} to all registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the range axis, however this is entirely up to the renderer. * * @param marker the marker (<code>null</code> not permitted). * @param layer the layer (foreground or background). */ public void addRangeMarker(Marker marker, Layer layer) { addRangeMarker(0, marker, layer); } /** * Clears all the range markers and sends a {@link PlotChangeEvent} to all * registered listeners. */ public void clearRangeMarkers() { if (this.foregroundRangeMarkers != null) { this.foregroundRangeMarkers.clear(); } if (this.backgroundRangeMarkers != null) { this.backgroundRangeMarkers.clear(); } notifyListeners(new PlotChangeEvent(this)); } /** * Adds a marker for a renderer and sends a {@link PlotChangeEvent} to * all registered listeners. * <P> * Typically a marker will be drawn by the renderer as a line perpendicular * to the range axis, however this is entirely up to the renderer. * * @param index the renderer index. * @param marker the marker. * @param layer the layer (foreground or background).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -