当前位置: 首页>>代码示例>>Java>>正文


Java Title类代码示例

本文整理汇总了Java中org.jfree.chart.title.Title的典型用法代码示例。如果您正苦于以下问题:Java Title类的具体用法?Java Title怎么用?Java Title使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Title类属于org.jfree.chart.title包,在下文中一共展示了Title类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: XYTitleAnnotation

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Creates a new annotation to be displayed at the specified (x, y) 
 * location.
 *
 * @param x  the x-coordinate (in data space).
 * @param y  the y-coordinate (in data space).
 * @param title  the title (<code>null</code> not permitted).
 * @param anchor  the title anchor (<code>null</code> not permitted).
 */
public XYTitleAnnotation(double x, double y, Title title, 
        RectangleAnchor anchor) {
    if (title == null) {
        throw new IllegalArgumentException("Null 'title' argument.");      
    }
    if (anchor == null) {
        throw new IllegalArgumentException("Null 'anchor' argument.");
    }
    this.coordinateType = XYCoordinateType.RELATIVE;
    this.x = x;
    this.y = y;
    this.maxWidth = 0.0;
    this.maxHeight = 0.0;
    this.title = title;
    this.anchor = anchor;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:XYTitleAnnotation.java

示例2: testEquals

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Some checks for the equals() method.
 */
public void testEquals() {
    
    // use the TextTitle class because it is a concrete subclass
    Title t1 = new TextTitle();
    Title t2 = new TextTitle();
    assertEquals(t1, t2);
    
    t1.setPosition(RectangleEdge.LEFT);
    assertFalse(t1.equals(t2));
    t2.setPosition(RectangleEdge.LEFT);
    assertTrue(t1.equals(t2));
    
    t1.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    assertFalse(t1.equals(t2));
    t2.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    assertTrue(t1.equals(t2));
    
    t1.setVerticalAlignment(VerticalAlignment.BOTTOM);
    assertFalse(t1.equals(t2));
    t2.setVerticalAlignment(VerticalAlignment.BOTTOM);
    assertTrue(t1.equals(t2));
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:TitleTests.java

示例3: getLegend

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns the nth legend for a chart, or <code>null</code>.
 * 
 * @param index  the legend index (zero-based).
 * 
 * @return The legend (possibly <code>null</code>).
 * 
 * @see #addLegend(LegendTitle)
 */
public LegendTitle getLegend(int index) {
    int seen = 0;
    Iterator iterator = this.subtitles.iterator();
    while (iterator.hasNext()) {
        Title subtitle = (Title) iterator.next();
        if (subtitle instanceof LegendTitle) {
            if (seen == index) {
                return (LegendTitle) subtitle;
            }
            else {
                seen++;   
            }
        }
    }
    return null;        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:JFreeChart.java

示例4: getLegend

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns the nth legend for a chart, or <code>null</code>.
 *
 * @param index  the legend index (zero-based).
 *
 * @return The legend (possibly <code>null</code>).
 *
 * @see #addLegend(LegendTitle)
 */
public LegendTitle getLegend(int index) {
    int seen = 0;
    Iterator iterator = this.subtitles.iterator();
    while (iterator.hasNext()) {
        Title subtitle = (Title) iterator.next();
        if (subtitle instanceof LegendTitle) {
            if (seen == index) {
                return (LegendTitle) subtitle;
            }
            else {
                seen++;
            }
        }
    }
    return null;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:26,代码来源:JFreeChart.java

示例5: setSubtitles

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles (<code>null</code> not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List subtitles) {
    if (subtitles == null) {
        throw new NullPointerException("Null 'subtitles' argument.");
    }
    setNotify(false);
    clearSubtitles();
    Iterator iterator = subtitles.iterator();
    while (iterator.hasNext()) {
        Title t = (Title) iterator.next();
        if (t != null) {
            addSubtitle(t);
        }
    }
    setNotify(true);  // this fires a ChartChangeEvent
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:26,代码来源:JFreeChart.java

示例6: getLegend

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns the nth legend for a chart, or {@code null}.
 *
 * @param index  the legend index (zero-based).
 *
 * @return The legend (possibly {@code null}).
 *
 * @see #addLegend(LegendTitle)
 */
public LegendTitle getLegend(int index) {
    int seen = 0;
    Iterator iterator = this.subtitles.iterator();
    while (iterator.hasNext()) {
        Title subtitle = (Title) iterator.next();
        if (subtitle instanceof LegendTitle) {
            if (seen == index) {
                return (LegendTitle) subtitle;
            }
            else {
                seen++;
            }
        }
    }
    return null;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:26,代码来源:JFreeChart.java

示例7: setSubtitles

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Sets the title list for the chart (completely replaces any existing
 * titles) and sends a {@link ChartChangeEvent} to all registered
 * listeners.
 *
 * @param subtitles  the new list of subtitles ({@code null} not
 *                   permitted).
 *
 * @see #getSubtitles()
 */
public void setSubtitles(List subtitles) {
    if (subtitles == null) {
        throw new NullPointerException("Null 'subtitles' argument.");
    }
    setNotify(false);
    clearSubtitles();
    Iterator iterator = subtitles.iterator();
    while (iterator.hasNext()) {
        Title t = (Title) iterator.next();
        if (t != null) {
            addSubtitle(t);
        }
    }
    setNotify(true);  // this fires a ChartChangeEvent
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:26,代码来源:JFreeChart.java

示例8: XYTitleAnnotation

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Creates a new annotation to be displayed at the specified (x, y)
 * location.
 *
 * @param x  the x-coordinate (in data space).
 * @param y  the y-coordinate (in data space).
 * @param title  the title (<code>null</code> not permitted).
 * @param anchor  the title anchor (<code>null</code> not permitted).
 */
public XYTitleAnnotation(double x, double y, Title title,
        RectangleAnchor anchor) {
    if (title == null) {
        throw new IllegalArgumentException("Null 'title' argument.");
    }
    if (anchor == null) {
        throw new IllegalArgumentException("Null 'anchor' argument.");
    }
    this.coordinateType = XYCoordinateType.RELATIVE;
    this.x = x;
    this.y = y;
    this.maxWidth = 0.0;
    this.maxHeight = 0.0;
    this.title = title;
    this.anchor = anchor;
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:26,代码来源:XYTitleAnnotation.java

示例9: XYTitleAnnotation

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Creates a new annotation to be displayed at the specified (x, y)
 * location.
 *
 * @param x  the x-coordinate (in data space).
 * @param y  the y-coordinate (in data space).
 * @param title  the title (<code>null</code> not permitted).
 * @param anchor  the title anchor (<code>null</code> not permitted).
 */
public XYTitleAnnotation(double x, double y, Title title,
        RectangleAnchor anchor) {
    super();
    if (title == null) {
        throw new IllegalArgumentException("Null 'title' argument.");
    }
    if (anchor == null) {
        throw new IllegalArgumentException("Null 'anchor' argument.");
    }
    this.coordinateType = XYCoordinateType.RELATIVE;
    this.x = x;
    this.y = y;
    this.maxWidth = 0.0;
    this.maxHeight = 0.0;
    this.title = title;
    this.anchor = anchor;
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:27,代码来源:XYTitleAnnotation.java

示例10: getLegend

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns the nth legend for a chart, or <code>null</code>.
 * 
 * @param index  the legend index (zero-based).
 * 
 * @return The legend (possibly <code>null</code>).
 */
public LegendTitle getLegend(int index) {
    int seen = 0;
    Iterator iterator = this.subtitles.iterator();
    while (iterator.hasNext()) {
        Title subtitle = (Title) iterator.next();
        if (subtitle instanceof LegendTitle) {
            if (seen == index) {
                return (LegendTitle) subtitle;
            }
            else {
                seen++;   
            }
        }
    }
    return null;        
}
 
开发者ID:opensim-org,项目名称:opensim-gui,代码行数:24,代码来源:JFreeChart.java

示例11: getLegend

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns the nth legend for a chart, or <code>null</code>.
 * 
 * @param index the legend index (zero-based).
 * @return The legend (possibly <code>null</code>).
 * @see #addLegend(LegendTitle)
 */
public LegendTitle getLegend(int index) {
	int seen = 0;
	Iterator iterator = this.subtitles.iterator();
	while (iterator.hasNext()) {
		Title subtitle = (Title) iterator.next();
		if (subtitle instanceof LegendTitle) {
			if (seen == index) {
				return (LegendTitle) subtitle;
			} else {
				seen++;
			}
		}
	}
	return null;
}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:23,代码来源:JFreeChart.java

示例12: setSubtitles

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Sets the title list for the chart (completely replaces any existing titles) and sends a {@link ChartChangeEvent}
 * to all registered listeners.
 * 
 * @param subtitles the new list of subtitles (<code>null</code> not permitted).
 * @see #getSubtitles()
 */
public void setSubtitles(List subtitles) {
	if (subtitles == null) {
		throw new NullPointerException("Null 'subtitles' argument.");
	}
	setNotify(false);
	clearSubtitles();
	Iterator iterator = subtitles.iterator();
	while (iterator.hasNext()) {
		Title t = (Title) iterator.next();
		if (t != null) {
			addSubtitle(t);
		}
	}
	setNotify(true); // this fires a ChartChangeEvent
}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:23,代码来源:JFreeChart.java

示例13: testEquals

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Problem that the equals(...) method distinguishes all fields.
 */
public void testEquals() {
    
    // use the TextTitle class because it is a concrete subclass
    Title t1 = new TextTitle();
    Title t2 = new TextTitle();
    assertEquals(t1, t2);
    
    t1.setPosition(RectangleEdge.LEFT);
    assertFalse(t1.equals(t2));
    t2.setPosition(RectangleEdge.LEFT);
    assertTrue(t1.equals(t2));
    
    t1.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    assertFalse(t1.equals(t2));
    t2.setHorizontalAlignment(HorizontalAlignment.RIGHT);
    assertTrue(t1.equals(t2));
    
    t1.setVerticalAlignment(VerticalAlignment.BOTTOM);
    assertFalse(t1.equals(t2));
    t2.setVerticalAlignment(VerticalAlignment.BOTTOM);
    assertTrue(t1.equals(t2));
    
    t1.setSpacer(new Spacer(Spacer.ABSOLUTE, 5.0, 10.0, 15.0, 20.0));
    assertFalse(t1.equals(t2));
    t2.setSpacer(new Spacer(Spacer.ABSOLUTE, 5.0, 10.0, 15.0, 20.0));
    assertTrue(t1.equals(t2));
    
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:32,代码来源:TitleTests.java

示例14: getSubtitle

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Returns a chart subtitle.
 *
 * @param index  the index of the chart subtitle (zero based).
 *
 * @return a chart subtitle.
 */
public Title getSubtitle(int index) {

    // check arguments...
    if ((index < 0) || (index == getSubtitleCount())) {
        throw new IllegalArgumentException("JFreeChart.getSubtitle(...): index out of range.");
    }

    return (Title) this.subtitles.get(index);

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:18,代码来源:JFreeChart.java

示例15: addSubtitle

import org.jfree.chart.title.Title; //导入依赖的package包/类
/**
 * Adds a chart subtitle, and notifies registered listeners that the chart has been modified.
 *
 * @param subtitle  the subtitle.
 */
public void addSubtitle(Title subtitle) {

    if (subtitle != null) {
        this.subtitles.add(subtitle);
        subtitle.addChangeListener(this);
        fireChartChanged();
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:15,代码来源:JFreeChart.java


注:本文中的org.jfree.chart.title.Title类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。