📄 standarddialscale.java
字号:
* Sets the tick radius and sends a {@link DialLayerChangeEvent} to all
* registered listeners.
*
* @param radius the radius.
*
* @see #getTickRadius()
*/
public void setTickRadius(double radius) {
if (radius <= 0.0) {
throw new IllegalArgumentException(
"The 'radius' must be positive.");
}
this.tickRadius = radius;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the increment (in data units) between major tick labels.
*
* @return The increment between major tick labels.
*
* @see #setMajorTickIncrement(double)
*/
public double getMajorTickIncrement() {
return this.majorTickIncrement;
}
/**
* Sets the increment (in data units) between major tick labels and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param increment the increment.
*
* @see #getMajorTickIncrement()
*/
public void setMajorTickIncrement(double increment) {
if (increment <= 0.0) {
throw new IllegalArgumentException(
"The 'increment' must be positive.");
}
this.majorTickIncrement = increment;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the length factor for the major tick marks. The value is
* subtracted from the tick radius to determine the inner starting point
* for the tick marks.
*
* @return The length factor.
*
* @see #setMajorTickLength(double)
*/
public double getMajorTickLength() {
return this.majorTickLength;
}
/**
* Sets the length factor for the major tick marks and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param length the length.
*
* @see #getMajorTickLength()
*/
public void setMajorTickLength(double length) {
if (length < 0.0) {
throw new IllegalArgumentException("Negative 'length' argument.");
}
this.majorTickLength = length;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the major tick paint.
*
* @return The major tick paint (never <code>null</code>).
*
* @see #setMajorTickPaint(Paint)
*/
public Paint getMajorTickPaint() {
return this.majorTickPaint;
}
/**
* Sets the major tick paint and sends a {@link DialLayerChangeEvent} to
* all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getMajorTickPaint()
*/
public void setMajorTickPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.majorTickPaint = paint;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the stroke used to draw the major tick marks.
*
* @return The stroke (never <code>null</code>).
*
* @see #setMajorTickStroke(Stroke)
*/
public Stroke getMajorTickStroke() {
return this.majorTickStroke;
}
/**
* Sets the stroke used to draw the major tick marks and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param stroke the stroke (<code>null</code> not permitted).
*
* @see #getMajorTickStroke()
*/
public void setMajorTickStroke(Stroke stroke) {
if (stroke == null) {
throw new IllegalArgumentException("Null 'stroke' argument.");
}
this.majorTickStroke = stroke;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the number of minor tick marks between major tick marks.
*
* @return The number of minor tick marks between major tick marks.
*
* @see #setMinorTickCount(int)
*/
public int getMinorTickCount() {
return this.minorTickCount;
}
/**
* Sets the number of minor tick marks between major tick marks and sends
* a {@link DialLayerChangeEvent} to all registered listeners.
*
* @param count the count.
*
* @see #getMinorTickCount()
*/
public void setMinorTickCount(int count) {
if (count < 0) {
throw new IllegalArgumentException(
"The 'count' cannot be negative.");
}
this.minorTickCount = count;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the length factor for the minor tick marks. The value is
* subtracted from the tick radius to determine the inner starting point
* for the tick marks.
*
* @return The length factor.
*
* @see #setMinorTickLength(double)
*/
public double getMinorTickLength() {
return this.minorTickLength;
}
/**
* Sets the length factor for the minor tick marks and sends
* a {@link DialLayerChangeEvent} to all registered listeners.
*
* @param length the length.
*
* @see #getMinorTickLength()
*/
public void setMinorTickLength(double length) {
if (length < 0.0) {
throw new IllegalArgumentException("Negative 'length' argument.");
}
this.minorTickLength = length;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the paint used to draw the minor tick marks.
*
* @return The paint (never <code>null</code>).
*
* @see #setMinorTickPaint(Paint)
*/
public Paint getMinorTickPaint() {
return this.minorTickPaint;
}
/**
* Sets the paint used to draw the minor tick marks and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getMinorTickPaint()
*/
public void setMinorTickPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.minorTickPaint = paint;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the stroke used to draw the minor tick marks.
*
* @return The paint (never <code>null</code>).
*
* @see #setMinorTickStroke(Stroke)
*
* @since 1.0.8
*/
public Stroke getMinorTickStroke() {
return this.minorTickStroke;
}
/**
* Sets the stroke used to draw the minor tick marks and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param stroke the stroke (<code>null</code> not permitted).
*
* @see #getMinorTickStroke()
*
* @since 1.0.8
*/
public void setMinorTickStroke(Stroke stroke) {
if (stroke == null) {
throw new IllegalArgumentException("Null 'stroke' argument.");
}
this.minorTickStroke = stroke;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the tick label offset.
*
* @return The tick label offset.
*
* @see #setTickLabelOffset(double)
*/
public double getTickLabelOffset() {
return this.tickLabelOffset;
}
/**
* Sets the tick label offset and sends a {@link DialLayerChangeEvent} to
* all registered listeners.
*
* @param offset the offset.
*
* @see #getTickLabelOffset()
*/
public void setTickLabelOffset(double offset) {
this.tickLabelOffset = offset;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the font used to draw the tick labels.
*
* @return The font (never <code>null</code>).
*
* @see #setTickLabelFont(Font)
*/
public Font getTickLabelFont() {
return this.tickLabelFont;
}
/**
* Sets the font used to display the tick labels and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param font the font (<code>null</code> not permitted).
*
* @see #getTickLabelFont()
*/
public void setTickLabelFont(Font font) {
if (font == null) {
throw new IllegalArgumentException("Null 'font' argument.");
}
this.tickLabelFont = font;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns the paint used to draw the tick labels.
*
* @return The paint (<code>null</code> not permitted).
*
* @see #setTickLabelPaint(Paint)
*/
public Paint getTickLabelPaint() {
return this.tickLabelPaint;
}
/**
* Sets the paint used to draw the tick labels and sends a
* {@link DialLayerChangeEvent} to all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*/
public void setTickLabelPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.tickLabelPaint = paint;
notifyListeners(new DialLayerChangeEvent(this));
}
/**
* Returns <code>true</code> if the tick labels should be displayed,
* and <code>false</code> otherwise.
*
* @return A boolean.
*
* @see #setTickLabelsVisible(boolean)
*/
public boolean getTickLabelsVisible() {
return this.tickLabelsVisible;
}
/**
* Sets the flag that controls whether or not the tick labels are
* displayed, and sends a {@link DialLayerChangeEvent} to all registered
* listeners.
*
* @param visible the new flag value.
*
* @see #getTickLabelsVisible()
*/
public void setTickLabelsVisible(boolean visible) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -