本文整理汇总了Java中org.jfree.chart.event.TitleChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java TitleChangeEvent类的具体用法?Java TitleChangeEvent怎么用?Java TitleChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TitleChangeEvent类属于org.jfree.chart.event包,在下文中一共展示了TitleChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setImage
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the image for the title and notifies registered listeners that the
* title has been modified.
*
* @param image the new image (<code>null</code> not permitted).
*/
public void setImage(Image image) {
if (image == null) {
throw new NullPointerException("ImageTitle.setImage (..): Image must not be null.");
}
this.image = image;
notifyListeners(new TitleChangeEvent(this));
}
示例2: setPosition
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the position for the title and sends a {@link TitleChangeEvent} to all registered
* listeners.
*
* @param position the position (<code>null</code> not permitted).
*/
public void setPosition(RectangleEdge position) {
if (position == null) {
throw new IllegalArgumentException("Null 'position' argument.");
}
if (this.position != position) {
this.position = position;
notifyListeners(new TitleChangeEvent(this));
}
}
示例3: setHorizontalAlignment
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the horizontal alignment for the title and sends a {@link TitleChangeEvent} to
* all registered listeners.
*
* @param alignment the horizontal alignment (<code>null</code> not permitted).
*/
public void setHorizontalAlignment(HorizontalAlignment alignment) {
if (alignment == null) {
throw new IllegalArgumentException("Null 'alignment' argument.");
}
if (this.horizontalAlignment != alignment) {
this.horizontalAlignment = alignment;
notifyListeners(new TitleChangeEvent(this));
}
}
示例4: setVerticalAlignment
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the vertical alignment for the title, and notifies any registered
* listeners of the change.
*
* @param alignment the new vertical alignment (TOP, MIDDLE or BOTTOM,
* <code>null</code> not permitted).
*/
public void setVerticalAlignment(VerticalAlignment alignment) {
if (alignment == null) {
throw new IllegalArgumentException("Argument 'alignment' cannot be null.");
}
if (this.verticalAlignment != alignment) {
this.verticalAlignment = alignment;
notifyListeners(new TitleChangeEvent(this));
}
}
示例5: setSpacer
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the spacer for the title and sends a {@link TitleChangeEvent} to all registered
* listeners.
*
* @param spacer the new spacer (<code>null</code> not permitted).
*/
public void setSpacer(Spacer spacer) {
if (spacer == null) {
throw new NullPointerException("AbstractTitle.setSpacer(): null not permitted.");
}
if (!this.spacer.equals(spacer)) {
this.spacer = spacer;
notifyListeners(new TitleChangeEvent(this));
}
}
示例6: notifyListeners
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Notifies all registered listeners that the chart title has changed in some way.
*
* @param event an object that contains information about the change to the title.
*/
protected void notifyListeners(TitleChangeEvent event) {
if (this.notify) {
Object[] listeners = this.listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == TitleChangeListener.class) {
((TitleChangeListener) listeners[i + 1]).titleChanged(event);
}
}
}
}
示例7: setText
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the title to the specified text and sends a {@link TitleChangeEvent} to all
* registered listeners.
*
* @param text the text (<code>null</code> not permitted).
*/
public void setText(String text) {
if (text == null) {
throw new NullPointerException("TextTitle.setText(..): Text is null");
}
if (!this.text.equals(text)) {
this.text = text;
notifyListeners(new TitleChangeEvent(this));
}
}
示例8: setFont
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the font used to display the title string. Registered listeners are notified that
* the title has been modified.
*
* @param font the new font (<code>null</code> not permitted).
*/
public void setFont(Font font) {
// check argument...
if (font == null) {
throw new IllegalArgumentException("TextTitle.setFont(...): null font not permitted.");
}
// make the change...
if (!this.font.equals(font)) {
this.font = font;
notifyListeners(new TitleChangeEvent(this));
}
}
示例9: setPaint
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the paint used to display the title string. Registered listeners are notified that
* the title has been modified.
*
* @param paint the new paint (<code>null</code> not permitted).
*/
public void setPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException(
"TextTitle.setPaint(...): null paint not permitted."
);
}
if (!this.paint.equals(paint)) {
this.paint = paint;
notifyListeners(new TitleChangeEvent(this));
}
}
示例10: setImage
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the image for the title and notifies registered listeners that the
* title has been modified.
*
* @param image the new image (<code>null</code> not permitted).
*/
public void setImage(Image image) {
if (image == null) {
throw new NullPointerException("Null 'image' argument.");
}
this.image = image;
notifyListeners(new TitleChangeEvent(this));
}
示例11: setSources
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the legend item sources and sends a {@link TitleChangeEvent} to
* all registered listeners.
*
* @param sources the sources (<code>null</code> not permitted).
*/
public void setSources(LegendItemSource[] sources) {
if (sources == null) {
throw new IllegalArgumentException("Null 'sources' argument.");
}
this.sources = sources;
notifyListeners(new TitleChangeEvent(this));
}
示例12: setLegendItemGraphicEdge
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the location of the shape within each legend item.
*
* @param edge the edge (<code>null</code> not permitted).
*/
public void setLegendItemGraphicEdge(RectangleEdge edge) {
if (edge == null) {
throw new IllegalArgumentException("Null 'edge' argument.");
}
this.legendItemGraphicEdge = edge;
notifyListeners(new TitleChangeEvent(this));
}
示例13: setLegendItemGraphicPadding
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the padding that will be applied to each item graphic in the
* legend and sends a {@link TitleChangeEvent} to all registered listeners.
*
* @param padding the padding (<code>null</code> not permitted).
*/
public void setLegendItemGraphicPadding(RectangleInsets padding) {
if (padding == null) {
throw new IllegalArgumentException("Null 'padding' argument.");
}
this.legendItemGraphicPadding = padding;
notifyListeners(new TitleChangeEvent(this));
}
示例14: setItemFont
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the item font and sends a {@link TitleChangeEvent} to
* all registered listeners.
*
* @param font the font (<code>null</code> not permitted).
*/
public void setItemFont(Font font) {
if (font == null) {
throw new IllegalArgumentException("Null 'font' argument.");
}
this.itemFont = font;
notifyListeners(new TitleChangeEvent(this));
}
示例15: setItemPaint
import org.jfree.chart.event.TitleChangeEvent; //导入依赖的package包/类
/**
* Sets the item paint.
*
* @param paint the paint (<code>null</code> not permitted).
*/
public void setItemPaint(Paint paint) {
if (paint == null) {
throw new IllegalArgumentException("Null 'paint' argument.");
}
this.itemPaint = paint;
notifyListeners(new TitleChangeEvent(this));
}