📄 spiderwebplot.java
字号:
* <code>null</code>.
*
* @see #getDataExtractOrder()
*/
public void setDataExtractOrder(TableOrder order) {
if (order == null) {
throw new IllegalArgumentException("Null 'order' argument");
}
this.dataExtractOrder = order;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the head percent.
*
* @return The head percent.
*
* @see #setHeadPercent(double)
*/
public double getHeadPercent() {
return this.headPercent;
}
/**
* Sets the head percent and sends a {@link PlotChangeEvent} to all
* registered listeners.
*
* @param percent the percent.
*
* @see #getHeadPercent()
*/
public void setHeadPercent(double percent) {
this.headPercent = percent;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the start angle for the first radar axis.
* <BR>
* This is measured in degrees starting from 3 o'clock (Java Arc2D default)
* and measuring anti-clockwise.
*
* @return The start angle.
*
* @see #setStartAngle(double)
*/
public double getStartAngle() {
return this.startAngle;
}
/**
* Sets the starting angle and sends a {@link PlotChangeEvent} to all
* registered listeners.
* <P>
* The initial default value is 90 degrees, which corresponds to 12 o'clock.
* A value of zero corresponds to 3 o'clock... this is the encoding used by
* Java's Arc2D class.
*
* @param angle the angle (in degrees).
*
* @see #getStartAngle()
*/
public void setStartAngle(double angle) {
this.startAngle = angle;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the maximum value any category axis can take.
*
* @return The maximum value.
*
* @see #setMaxValue(double)
*/
public double getMaxValue() {
return this.maxValue;
}
/**
* Sets the maximum value any category axis can take and sends
* a {@link PlotChangeEvent} to all registered listeners.
*
* @param value the maximum value.
*
* @see #getMaxValue()
*/
public void setMaxValue(double value) {
this.maxValue = value;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the direction in which the radar axes are drawn
* (clockwise or anti-clockwise).
*
* @return The direction (never <code>null</code>).
*
* @see #setDirection(Rotation)
*/
public Rotation getDirection() {
return this.direction;
}
/**
* Sets the direction in which the radar axes are drawn and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param direction the direction (<code>null</code> not permitted).
*
* @see #getDirection()
*/
public void setDirection(Rotation direction) {
if (direction == null) {
throw new IllegalArgumentException("Null 'direction' argument.");
}
this.direction = direction;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the interior gap, measured as a percentage of the available
* drawing space.
*
* @return The gap (as a percentage of the available drawing space).
*
* @see #setInteriorGap(double)
*/
public double getInteriorGap() {
return this.interiorGap;
}
/**
* Sets the interior gap and sends a {@link PlotChangeEvent} to all
* registered listeners. This controls the space between the edges of the
* plot and the plot area itself (the region where the axis labels appear).
*
* @param percent the gap (as a percentage of the available drawing space).
*
* @see #getInteriorGap()
*/
public void setInteriorGap(double percent) {
if ((percent < 0.0) || (percent > MAX_INTERIOR_GAP)) {
throw new IllegalArgumentException(
"Percentage outside valid range.");
}
if (this.interiorGap != percent) {
this.interiorGap = percent;
notifyListeners(new PlotChangeEvent(this));
}
}
/**
* Returns the axis label gap.
*
* @return The axis label gap.
*
* @see #setAxisLabelGap(double)
*/
public double getAxisLabelGap() {
return this.axisLabelGap;
}
/**
* Sets the axis label gap and sends a {@link PlotChangeEvent} to all
* registered listeners.
*
* @param gap the gap.
*
* @see #getAxisLabelGap()
*/
public void setAxisLabelGap(double gap) {
this.axisLabelGap = gap;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the paint used to draw the axis lines.
*
* @return The paint used to draw the axis lines (never <code>null</code>).
*
* @see #setAxisLinePaint(Paint)
* @see #getAxisLineStroke()
* @since 1.0.4
*/
public Paint getAxisLinePaint() {
return this.axisLinePaint;
}
/**
* Sets the paint used to draw the axis lines and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getAxisLinePaint()
* @since 1.0.4
*/
public void setAxisLinePaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.axisLinePaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the stroke used to draw the axis lines.
*
* @return The stroke used to draw the axis lines (never <code>null</code>).
*
* @see #setAxisLineStroke(Stroke)
* @see #getAxisLinePaint()
* @since 1.0.4
*/
public Stroke getAxisLineStroke() {
return this.axisLineStroke;
}
/**
* Sets the stroke used to draw the axis lines and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param stroke the stroke (<code>null</code> not permitted).
*
* @see #getAxisLineStroke()
* @since 1.0.4
*/
public void setAxisLineStroke(Stroke stroke) {
if (stroke == null) {
throw new IllegalArgumentException("Null 'stroke' argument.");
}
this.axisLineStroke = stroke;
notifyListeners(new PlotChangeEvent(this));
}
//// SERIES PAINT /////////////////////////
/**
* Returns the paint for ALL series in the plot.
*
* @return The paint (possibly <code>null</code>).
*
* @see #setSeriesPaint(Paint)
*/
public Paint getSeriesPaint() {
return this.seriesPaint;
}
/**
* Sets the paint for ALL series in the plot. If this is set to</code> null
* </code>, then a list of paints is used instead (to allow different colors
* to be used for each series of the radar group).
*
* @param paint the paint (<code>null</code> permitted).
*
* @see #getSeriesPaint()
*/
public void setSeriesPaint(Paint paint) {
this.seriesPaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the paint for the specified series.
*
* @param series the series index (zero-based).
*
* @return The paint (never <code>null</code>).
*
* @see #setSeriesPaint(int, Paint)
*/
public Paint getSeriesPaint(int series) {
// return the override, if there is one...
if (this.seriesPaint != null) {
return this.seriesPaint;
}
// otherwise look up the paint list
Paint result = this.seriesPaintList.getPaint(series);
if (result == null) {
DrawingSupplier supplier = getDrawingSupplier();
if (supplier != null) {
Paint p = supplier.getNextPaint();
this.seriesPaintList.setPaint(series, p);
result = p;
}
else {
result = this.baseSeriesPaint;
}
}
return result;
}
/**
* Sets the paint used to fill a series of the radar and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param series the series index (zero-based).
* @param paint the paint (<code>null</code> permitted).
*
* @see #getSeriesPaint(int)
*/
public void setSeriesPaint(int series, Paint paint) {
this.seriesPaintList.setPaint(series, paint);
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the base series paint. This is used when no other paint is
* available.
*
* @return The paint (never <code>null</code>).
*
* @see #setBaseSeriesPaint(Paint)
*/
public Paint getBaseSeriesPaint() {
return this.baseSeriesPaint;
}
/**
* Sets the base series paint.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getBaseSeriesPaint()
*/
public void setBaseSeriesPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.baseSeriesPaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
//// SERIES OUTLINE PAINT ////////////////////////////
/**
* Returns the outline paint for ALL series in the plot.
*
* @return The paint (possibly <code>null</code>).
*/
public Paint getSeriesOutlinePaint() {
return this.seriesOutlinePaint;
}
/**
* Sets the outline paint for ALL series in the plot. If this is set to
* </code> null</code>, then a list of paints is used instead (to allow
* different colors to be used for each series).
*
* @param paint the paint (<code>null</code> permitted).
*/
public void setSeriesOutlinePaint(Paint paint) {
this.seriesOutlinePaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the paint for the specified series.
*
* @param series the series index (zero-based).
*
* @return The paint (never <code>null</code>).
*/
public Paint getSeriesOutlinePaint(int series) {
// return the override, if there is one...
if (this.seriesOutlinePaint != null) {
return this.seriesOutlinePaint;
}
// otherwise look up the paint list
Paint result = this.seriesOutlinePaintList.getPaint(series);
if (result == null) {
result = this.baseSeriesOutlinePaint;
}
return result;
}
/**
* Sets the paint used to fill a series of the radar and sends a
* {@link PlotChangeEvent} to all registered listeners.
*
* @param series the series index (zero-based).
* @param paint the paint (<code>null</code> permitted).
*/
public void setSeriesOutlinePaint(int series, Paint paint) {
this.seriesOutlinePaintList.setPaint(series, paint);
notifyListeners(new PlotChangeEvent(this));
}
/**
* Returns the base series paint. This is used when no other paint is
* available.
*
* @return The paint (never <code>null</code>).
*/
public Paint getBaseSeriesOutlinePaint() {
return this.baseSeriesOutlinePaint;
}
/**
* Sets the base series paint.
*
* @param paint the paint (<code>null</code> not permitted).
*/
public void setBaseSeriesOutlinePaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.baseSeriesOutlinePaint = paint;
notifyListeners(new PlotChangeEvent(this));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -