本文整理汇总了Java中org.jfree.chart.event.AxisChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java AxisChangeEvent类的具体用法?Java AxisChangeEvent怎么用?Java AxisChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AxisChangeEvent类属于org.jfree.chart.event包,在下文中一共展示了AxisChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setLabel
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the label for the axis and sends an {@link AxisChangeEvent} to all registered
* listeners.
*
* @param label the new label (<code>null</code> permitted).
*/
public void setLabel(String label) {
String existing = this.label;
if (existing != null) {
if (!existing.equals(label)) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
else {
if (label != null) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
}
示例2: setTickUnit
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the tick unit for the axis and, if requested, sends an {@link AxisChangeEvent} to all
* registered listeners. In addition, an option is provided to turn off the "auto-select"
* feature for tick units (you can restore it using the
* {@link ValueAxis#setAutoTickUnitSelection(boolean)} method).
*
* @param unit the new tick unit (<code>null</code> not permitted).
* @param notify notify listeners?
* @param turnOffAutoSelect turn off the auto-tick selection?
*/
public void setTickUnit(NumberTickUnit unit, boolean notify, boolean turnOffAutoSelect) {
if (unit == null) {
throw new IllegalArgumentException("Null 'unit' argument.");
}
this.tickUnit = unit;
if (turnOffAutoSelect) {
setAutoTickUnitSelection(false, false);
}
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
示例3: setDisplayRange
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the display range. The values will be mapped to the fixed range if
* necessary.
*
* @param start the start value.
* @param end the end value.
*/
public void setDisplayRange(double start, double end) {
this.displayStart = mapValueToFixedRange(start);
this.displayEnd = mapValueToFixedRange(end);
if (this.displayStart < this.displayEnd) {
setRange(this.displayStart, this.displayEnd);
}
else {
setRange(
this.displayStart,
this.fixedRange.getUpperBound()
+ (this.displayEnd - this.fixedRange.getLowerBound())
);
}
notifyListeners(new AxisChangeEvent(this));
}
示例4: setTickUnit
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the tick unit for the axis and, if requested, sends an
* {@link AxisChangeEvent} to all registered listeners. In addition, an
* option is provided to turn off the "auto-select" feature for tick units
* (you can restore it using the
* {@link ValueAxis#setAutoTickUnitSelection(boolean)} method).
*
* @param unit the new tick unit (<code>null</code> not permitted).
* @param notify notify listeners?
* @param turnOffAutoSelect turn off the auto-tick selection?
*/
public void setTickUnit(NumberTickUnit unit, boolean notify,
boolean turnOffAutoSelect) {
if (unit == null) {
throw new IllegalArgumentException("Null 'unit' argument.");
}
this.tickUnit = unit;
if (turnOffAutoSelect) {
setAutoTickUnitSelection(false, false);
}
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
示例5: setLabel
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the label for the axis and sends an {@link AxisChangeEvent} to all
* registered listeners.
*
* @param label the new label (<code>null</code> permitted).
*
* @see #getLabel()
* @see #setLabelFont(Font)
* @see #setLabelPaint(Paint)
*/
public void setLabel(String label) {
String existing = this.label;
if (existing != null) {
if (!existing.equals(label)) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
else {
if (label != null) {
this.label = label;
notifyListeners(new AxisChangeEvent(this));
}
}
}
示例6: setAutoRange
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the auto range attribute. If the <code>notify</code> flag is set,
* an {@link AxisChangeEvent} is sent to registered listeners.
*
* @param auto the flag.
* @param notify notify listeners?
*
* @see #isAutoRange()
*/
protected void setAutoRange(boolean auto, boolean notify) {
if (this.autoRange != auto) {
this.autoRange = auto;
if (this.autoRange) {
autoAdjustRange();
}
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
}
示例7: setAutoRangeStickyZero
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets a flag that affects the auto-range when zero falls outside the data
* range but inside the margins defined for the axis.
*
* @param flag the new flag.
*
* @see #getAutoRangeStickyZero()
*/
public void setAutoRangeStickyZero(boolean flag) {
if (this.autoRangeStickyZero != flag) {
this.autoRangeStickyZero = flag;
if (isAutoRange()) {
autoAdjustRange();
}
notifyListeners(new AxisChangeEvent(this));
}
}
示例8: setTickUnit
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the tick unit attribute without any other side effects.
*
* @param unit the new tick unit.
* @param notify notify registered listeners?
* @param turnOffAutoSelection turn off auto selection?
*/
public void setTickUnit(DateTickUnit unit, boolean notify, boolean turnOffAutoSelection) {
this.tickUnit = unit;
if (turnOffAutoSelection) {
setAutoTickUnitSelection(false, false);
}
if (notify) {
notifyListeners(new AxisChangeEvent(this));
}
}
示例9: setTickMarkPosition
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the tick mark position (start, middle or end of the time period) and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param position the position (<code>null</code> not permitted).
*/
public void setTickMarkPosition(DateTickMarkPosition position) {
if (position == null) {
throw new IllegalArgumentException("Null 'position' argument.");
}
this.tickMarkPosition = position;
notifyListeners(new AxisChangeEvent(this));
}
示例10: setVisible
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets a flag that controls whether or not the axis is visible and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param flag the flag.
*/
public void setVisible(boolean flag) {
if (flag != this.visible) {
this.visible = flag;
notifyListeners(new AxisChangeEvent(this));
}
}
示例11: setLabelPaint
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the paint used to draw the axis label and sends an {@link AxisChangeEvent}
* to all registered listeners.
*
* @param paint the paint (<code>null</code> not permitted).
*/
public void setLabelPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Axis.setLabelPaint(...): null not permitted.");
}
this.labelPaint = paint;
notifyListeners(new AxisChangeEvent(this));
}
示例12: setAutoRangeTimePeriodClass
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the class used to create the first and last time periods for the
* axis range when the auto-range flag is set to <code>true</code> and
* sends an {@link AxisChangeEvent} to all registered listeners.
*
* @param c the class (<code>null</code> not permitted).
*/
public void setAutoRangeTimePeriodClass(Class c) {
if (c == null) {
throw new IllegalArgumentException("Null 'c' argument.");
}
this.autoRangeTimePeriodClass = c;
notifyListeners(new AxisChangeEvent(this));
}
示例13: setTickLabelFont
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the font for the tick label for the specified category and sends
* an {@link AxisChangeEvent} to all registered listeners.
*
* @param category the category (<code>null</code> not permitted).
* @param font the font (<code>null</code> permitted).
*
* @see #getTickLabelFont(Comparable)
*/
public void setTickLabelFont(Comparable category, Font font) {
if (category == null) {
throw new IllegalArgumentException("Null 'category' argument.");
}
if (font == null) {
this.tickLabelFontMap.remove(category);
}
else {
this.tickLabelFontMap.put(category, font);
}
notifyListeners(new AxisChangeEvent(this));
}
示例14: setAxisLineStroke
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the stroke used to draw the axis line and sends an {@link AxisChangeEvent}
* to all registered listeners.
*
* @param stroke the stroke (<code>null</code> not permitted).
*/
public void setAxisLineStroke(Stroke stroke) {
if (stroke == null) {
throw new IllegalArgumentException("Null 'stroke' argument.");
}
this.axisLineStroke = stroke;
notifyListeners(new AxisChangeEvent(this));
}
示例15: setTickLabelsVisible
import org.jfree.chart.event.AxisChangeEvent; //导入依赖的package包/类
/**
* Sets the flag that determines whether or not the tick labels are visible and sends
* an {@link AxisChangeEvent} to all registered listeners.
*
* @param flag the flag.
*/
public void setTickLabelsVisible(boolean flag) {
if (flag != this.tickLabelsVisible) {
this.tickLabelsVisible = flag;
notifyListeners(new AxisChangeEvent(this));
}
}