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


Java LineBorder类代码示例

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


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

示例1: setLegend

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
private void setLegend(JFreeChart chart) {
    chart.removeLegend();
    final LegendTitle legend = new LegendTitle(new SpectrumLegendItemSource());
    legend.setPosition(RectangleEdge.BOTTOM);
    LineBorder border = new LineBorder(Color.BLACK, new BasicStroke(), new RectangleInsets(2, 2, 2, 2));
    legend.setFrame(border);
    chart.addLegend(legend);
}
 
开发者ID:senbox-org,项目名称:snap-desktop,代码行数:9,代码来源:SpectrumTopComponent.java

示例2: getBlockFrame

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
@Override
public BlockFrame getBlockFrame()
{
	RectangleInsets borderInsets = insets == null ? new RectangleInsets(1.0, 1.0, 1.0, 1.0) : insets;
	Stroke borderStroke = lineStroke == null ? new BasicStroke(1.0f) : lineStroke;
	Paint borderPaint = paint == null ? null : paint.getPaint();
	if (borderPaint == null) 
	{
		borderPaint = Color.BLACK;
	}
	
	return new LineBorder(borderPaint, borderStroke, borderInsets);
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:14,代码来源:LineBorderProvider.java

示例3: setLegend

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
private void setLegend(JFreeChart chart, Plot plot, Font font) {
	if(!showlegend) return;
		
		
	Color bg = backgroundcolor==null?databackgroundcolor:backgroundcolor;
	if(font==null)font=getFont();
	
	
	
	LegendTitle legend = legendMultiLine?
       		new LegendTitle(plot,new ColumnArrangement(), new ColumnArrangement()):
       		new LegendTitle(plot);
       legend.setBackgroundPaint(bg);
       legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
       legend.setFrame(new LineBorder());
       legend.setPosition(RectangleEdge.BOTTOM);
       legend.setHorizontalAlignment(HorizontalAlignment.LEFT);
       
       legend.setWidth(chartwidth-20);// geht nicht
       legend.setItemFont(font);
	legend.setItemPaint(foregroundcolor);

	//RectangleInsets labelPadding;
	legend.setItemLabelPadding(new RectangleInsets(2,2,2,2));
	legend.setBorder(0,0,0,0); 
	legend.setLegendItemGraphicLocation(RectangleAnchor.TOP_LEFT);
	legend.setLegendItemGraphicPadding(new RectangleInsets(8,10,0,0));
	chart.addLegend(legend);
	
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:31,代码来源:Chart.java

示例4: testCloning

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Immutable - cloning not necessary.
 */
public void testCloning() {
    LineBorder b1 = new LineBorder();
    assertFalse(b1 instanceof Cloneable);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:8,代码来源:LineBorderTests.java

示例5: JFreeChart

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Creates a new chart with the given title and plot.  The 
 * <code>createLegend</code> argument specifies whether or not a legend
 * should be added to the chart.  
 * <br><br>
 * Note that the  {@link ChartFactory} class contains a range 
 * of static methods that will return ready-made charts, and often this
 * is a more convenient way to create charts than using this constructor.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param titleFont  the font for displaying the chart title 
 *                   (<code>null</code> permitted).
 * @param plot  controller of the visual representation of the data 
 *              (<code>null</code> not permitted).
 * @param createLegend  a flag indicating whether or not a legend should   
 *                      be created for the chart.
 */
public JFreeChart(String title, Font titleFont, Plot plot, 
                  boolean createLegend) {

    if (plot == null) {
        throw new NullPointerException("Null 'plot' argument.");
    }

    // create storage for listeners...
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.notify = true;  // default is to notify listeners when the 
                         // chart changes

    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_ON);

    this.borderVisible = false;
    this.borderStroke = new BasicStroke(1.0f);
    this.borderPaint = Color.black;

    this.padding = RectangleInsets.ZERO_INSETS;
    
    this.plot = plot;
    plot.addChangeListener(this);

    this.subtitles = new ArrayList();

    // create a legend, if requested...
    if (createLegend) {
        LegendTitle legend = new LegendTitle(this.plot);
        legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
        legend.setFrame(new LineBorder());
        legend.setBackgroundPaint(Color.white);
        legend.setPosition(RectangleEdge.BOTTOM);
        this.subtitles.add(legend);
    }

    // add the chart title, if one has been specified...
    if (title != null) {
        if (titleFont == null) {
            titleFont = DEFAULT_TITLE_FONT;
        }
        this.title = new TextTitle(title, titleFont);
        this.title.addChangeListener(this);
    }

    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;

    this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
    this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
    this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;

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

示例6: JFreeChart

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Creates a new chart with the given title and plot.  The
 * <code>createLegend</code> argument specifies whether or not a legend
 * should be added to the chart.
 * <br><br>
 * Note that the  {@link ChartFactory} class contains a range
 * of static methods that will return ready-made charts, and often this
 * is a more convenient way to create charts than using this constructor.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param titleFont  the font for displaying the chart title
 *                   (<code>null</code> permitted).
 * @param plot  controller of the visual representation of the data
 *              (<code>null</code> not permitted).
 * @param createLegend  a flag indicating whether or not a legend should
 *                      be created for the chart.
 */
public JFreeChart(String title, Font titleFont, Plot plot,
                  boolean createLegend) {

    ParamChecks.nullNotPermitted(plot, "plot");

    // create storage for listeners...
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.notify = true;  // default is to notify listeners when the
                         // chart changes

    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
    // added the following hint because of 
    // http://stackoverflow.com/questions/7785082/
    this.renderingHints.put(RenderingHints.KEY_STROKE_CONTROL,
            RenderingHints.VALUE_STROKE_PURE);
    
    this.borderVisible = false;
    this.borderStroke = new BasicStroke(1.0f);
    this.borderPaint = Color.black;

    this.padding = RectangleInsets.ZERO_INSETS;

    this.plot = plot;
    plot.addChangeListener(this);

    this.subtitles = new ArrayList();

    // create a legend, if requested...
    if (createLegend) {
        LegendTitle legend = new LegendTitle(this.plot);
        legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
        legend.setFrame(new LineBorder());
        legend.setBackgroundPaint(Color.white);
        legend.setPosition(RectangleEdge.BOTTOM);
        this.subtitles.add(legend);
        legend.addChangeListener(this);
    }

    // add the chart title, if one has been specified...
    if (title != null) {
        if (titleFont == null) {
            titleFont = DEFAULT_TITLE_FONT;
        }
        this.title = new TextTitle(title, titleFont);
        this.title.addChangeListener(this);
    }

    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;

    this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
    this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
    this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:75,代码来源:JFreeChart.java

示例7: JFreeChart

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Creates a new chart with the given title and plot.  The
 * <code>createLegend</code> argument specifies whether or not a legend
 * should be added to the chart.
 * <br><br>
 * Note that the  {@link ChartFactory} class contains a range
 * of static methods that will return ready-made charts, and often this
 * is a more convenient way to create charts than using this constructor.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param titleFont  the font for displaying the chart title
 *                   (<code>null</code> permitted).
 * @param plot  controller of the visual representation of the data
 *              (<code>null</code> not permitted).
 * @param createLegend  a flag indicating whether or not a legend should
 *                      be created for the chart.
 */
public JFreeChart(String title, Font titleFont, Plot plot,
                  boolean createLegend) {

    if (plot == null) {
        throw new NullPointerException("Null 'plot' argument.");
    }

    // create storage for listeners...
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.notify = true;  // default is to notify listeners when the
                         // chart changes

    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);

    this.borderVisible = false;
    this.borderStroke = new BasicStroke(1.0f);
    this.borderPaint = Color.black;

    this.padding = RectangleInsets.ZERO_INSETS;

    this.plot = plot;
    plot.addChangeListener(this);

    this.subtitles = new ArrayList();

    // create a legend, if requested...
    if (createLegend) {
        LegendTitle legend = new LegendTitle(this.plot);
        legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
        legend.setFrame(new LineBorder());
        legend.setBackgroundPaint(Color.white);
        legend.setPosition(RectangleEdge.BOTTOM);
        this.subtitles.add(legend);
        legend.addChangeListener(this);
    }

    // add the chart title, if one has been specified...
    if (title != null) {
        if (titleFont == null) {
            titleFont = DEFAULT_TITLE_FONT;
        }
        this.title = new TextTitle(title, titleFont);
        this.title.addChangeListener(this);
    }

    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;

    this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
    this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
    this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:73,代码来源:JFreeChart.java

示例8: JFreeChart

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Creates a new chart with the given title and plot. The <code>createLegend</code> argument specifies whether or
 * not a legend should be added to the chart. <br>
 * <br>
 * Note that the {@link ChartFactory} class contains a range of static methods that will return ready-made charts,
 * and often this is a more convenient way to create charts than using this constructor.
 * 
 * @param title the chart title (<code>null</code> permitted).
 * @param titleFont the font for displaying the chart title (<code>null</code> permitted).
 * @param plot controller of the visual representation of the data (<code>null</code> not permitted).
 * @param createLegend a flag indicating whether or not a legend should be created for the chart.
 */
public JFreeChart(String title, Font titleFont, Plot plot, boolean createLegend) {

	ParamChecks.nullNotPermitted(plot, "plot");

	// create storage for listeners...
	this.progressListeners = new EventListenerList();
	this.changeListeners = new EventListenerList();
	this.notify = true; // default is to notify listeners when the
						// chart changes

	this.renderingHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

	this.borderVisible = false;
	this.borderStroke = new BasicStroke(1.0f);
	this.borderPaint = Color.black;

	this.padding = RectangleInsets.ZERO_INSETS;

	this.plot = plot;
	plot.addChangeListener(this);

	this.subtitles = new ArrayList();

	// create a legend, if requested...
	if (createLegend) {
		LegendTitle legend = new LegendTitle(this.plot);
		legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
		legend.setFrame(new LineBorder());
		legend.setBackgroundPaint(Color.white);
		legend.setPosition(RectangleEdge.BOTTOM);
		this.subtitles.add(legend);
		legend.addChangeListener(this);
	}

	// add the chart title, if one has been specified...
	if (title != null) {
		if (titleFont == null) {
			titleFont = DEFAULT_TITLE_FONT;
		}
		this.title = new TextTitle(title, titleFont);
		this.title.addChangeListener(this);
	}

	this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;

	this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
	this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
	this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;

}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:63,代码来源:JFreeChart.java

示例9: JFreeChart

import org.jfree.chart.block.LineBorder; //导入依赖的package包/类
/**
 * Creates a new chart with the given title and plot.  The
 * <code>createLegend</code> argument specifies whether or not a legend
 * should be added to the chart.
 * <br><br>
 * Note that the  {@link ChartFactory} class contains a range
 * of static methods that will return ready-made charts, and often this
 * is a more convenient way to create charts than using this constructor.
 *
 * @param title  the chart title (<code>null</code> permitted).
 * @param titleFont  the font for displaying the chart title
 *                   (<code>null</code> permitted).
 * @param plot  controller of the visual representation of the data
 *              (<code>null</code> not permitted).
 * @param createLegend  a flag indicating whether or not a legend should
 *                      be created for the chart.
 */
public JFreeChart(String title, Font titleFont, Plot plot,
                  boolean createLegend) {

    ParamChecks.nullNotPermitted(plot, "plot");

    // create storage for listeners...
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.notify = true;  // default is to notify listeners when the
                         // chart changes

    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);

    this.borderVisible = false;
    this.borderStroke = new BasicStroke(1.0f);
    this.borderPaint = Color.black;

    this.padding = RectangleInsets.ZERO_INSETS;

    this.plot = plot;
    plot.addChangeListener(this);

    this.subtitles = new ArrayList();

    // create a legend, if requested...
    if (createLegend) {
        LegendTitle legend = new LegendTitle(this.plot);
        legend.setMargin(new RectangleInsets(1.0, 1.0, 1.0, 1.0));
        legend.setFrame(new LineBorder());
        legend.setBackgroundPaint(Color.white);
        legend.setPosition(RectangleEdge.BOTTOM);
        this.subtitles.add(legend);
        legend.addChangeListener(this);
    }

    // add the chart title, if one has been specified...
    if (title != null) {
        if (titleFont == null) {
            titleFont = DEFAULT_TITLE_FONT;
        }
        this.title = new TextTitle(title, titleFont);
        this.title.addChangeListener(this);
    }

    this.backgroundPaint = DEFAULT_BACKGROUND_PAINT;

    this.backgroundImage = DEFAULT_BACKGROUND_IMAGE;
    this.backgroundImageAlignment = DEFAULT_BACKGROUND_IMAGE_ALIGNMENT;
    this.backgroundImageAlpha = DEFAULT_BACKGROUND_IMAGE_ALPHA;

}
 
开发者ID:pablopatarca,项目名称:proyecto-teoria-control-utn-frro,代码行数:71,代码来源:JFreeChart.java


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