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


Java ColumnArrangement类代码示例

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


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

示例1: testEquals

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Confirm that the equals() method can distinguish all the required fields.
 */
public void testEquals() {
    BlockContainer c1 = new BlockContainer(new FlowArrangement());
    BlockContainer c2 = new BlockContainer(new FlowArrangement());
    assertTrue(c1.equals(c2));
    assertTrue(c2.equals(c2));
    
    c1.setArrangement(new ColumnArrangement());
    assertFalse(c1.equals(c2));
    c2.setArrangement(new ColumnArrangement());
    assertTrue(c1.equals(c2));
    
    c1.add(new EmptyBlock(1.2, 3.4));
    assertFalse(c1.equals(c2));
    c2.add(new EmptyBlock(1.2, 3.4));
    assertTrue(c1.equals(c2));
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:20,代码来源:BlockContainerTests.java

示例2: testEquals

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Confirm that the equals() method can distinguish all the required fields.
 */
public void testEquals() {
    BlockContainer c1 = new BlockContainer(new FlowArrangement());
    BlockContainer c2 = new BlockContainer(new FlowArrangement());
    assertTrue(c1.equals(c2));
    assertTrue(c2.equals(c2));

    c1.setArrangement(new ColumnArrangement());
    assertFalse(c1.equals(c2));
    c2.setArrangement(new ColumnArrangement());
    assertTrue(c1.equals(c2));

    c1.add(new EmptyBlock(1.2, 3.4));
    assertFalse(c1.equals(c2));
    c2.add(new EmptyBlock(1.2, 3.4));
    assertTrue(c1.equals(c2));
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:20,代码来源:BlockContainerTests.java

示例3: createLegendTitles

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Creates {@link LegendTitle}s for all dimensions from the PlotConfiguration of this Plotter2D.
 * Expects that all {@link ValueSource} s in the provided PlotConfiguration use the same
 * {@link DimensionConfig} s.
 */
private List<LegendTitle> createLegendTitles() {
	List<LegendTitle> legendTitles = new LinkedList<LegendTitle>();
	LegendConfiguration legendConfiguration = plotInstance.getCurrentPlotConfigurationClone().getLegendConfiguration();

	LegendTitle legendTitle = new SmartLegendTitle(this, new FlowArrangement(HorizontalAlignment.CENTER, VerticalAlignment.CENTER, 30, 2), new ColumnArrangement(
			HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 2));
	legendTitle.setItemPaint(legendConfiguration.getLegendFontColor());
	
	RectangleEdge position = legendConfiguration.getLegendPosition().getPosition();
	if (position == null) {
		return legendTitles;
	}
	legendTitle.setPosition(position);

	if (legendConfiguration.isShowLegendFrame()) {
		legendTitle.setFrame(new BlockBorder(legendConfiguration.getLegendFrameColor()));
	}
	ColoredBlockContainer wrapper = new ColoredBlockContainer(legendConfiguration.getLegendBackgroundColor());
	wrapper.add(legendTitle.getItemContainer());
	wrapper.setPadding(3, 3, 3, 3);
	legendTitle.setWrapper(wrapper);

	legendTitles.add(legendTitle);
	return legendTitles;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:31,代码来源:JFreeChartPlotEngine.java

示例4: createLegendTitles

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Creates {@link LegendTitle}s for all dimensions from the PlotConfiguration of this Plotter2D.
 * Expects that all {@link ValueSource} s in the provided PlotConfiguration use the same
 * {@link DimensionConfig} s.
 */
private List<LegendTitle> createLegendTitles() {
	List<LegendTitle> legendTitles = new LinkedList<LegendTitle>();
	LegendConfiguration legendConfiguration = plotInstance.getCurrentPlotConfigurationClone().getLegendConfiguration();

	LegendTitle legendTitle = new SmartLegendTitle(this, new FlowArrangement(HorizontalAlignment.CENTER,
			VerticalAlignment.CENTER, 30, 2), new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER,
			0, 2));
	legendTitle.setItemPaint(legendConfiguration.getLegendFontColor());

	RectangleEdge position = legendConfiguration.getLegendPosition().getPosition();
	if (position == null) {
		return legendTitles;
	}
	legendTitle.setPosition(position);

	if (legendConfiguration.isShowLegendFrame()) {
		legendTitle.setFrame(new BlockBorder(legendConfiguration.getLegendFrameColor()));
	}
	ColoredBlockContainer wrapper = new ColoredBlockContainer(legendConfiguration.getLegendBackgroundColor());
	wrapper.add(legendTitle.getItemContainer());
	wrapper.setPadding(3, 3, 3, 3);
	legendTitle.setWrapper(wrapper);

	legendTitles.add(legendTitle);
	return legendTitles;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:32,代码来源:JFreeChartPlotEngine.java

示例5: createLegendTitles

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Creates {@link LegendTitle}s for all dimensions from the PlotConfiguration of this Plotter2D.
 * Expects that all {@link ValueSource} s in the provided PlotConfiguration use the same
 * {@link DimensionConfig} s.
 */
private List<LegendTitle> createLegendTitles() {
	List<LegendTitle> legendTitles = new LinkedList<LegendTitle>();
	LegendConfiguration legendConfiguration = plotInstance.getCurrentPlotConfigurationClone().getLegendConfiguration();

	LegendTitle legendTitle = new SmartLegendTitle(this,
			new FlowArrangement(HorizontalAlignment.CENTER, VerticalAlignment.CENTER, 30, 2),
			new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 2));
	legendTitle.setItemPaint(legendConfiguration.getLegendFontColor());

	RectangleEdge position = legendConfiguration.getLegendPosition().getPosition();
	if (position == null) {
		return legendTitles;
	}
	legendTitle.setPosition(position);

	if (legendConfiguration.isShowLegendFrame()) {
		legendTitle.setFrame(new BlockBorder(legendConfiguration.getLegendFrameColor()));
	}
	ColoredBlockContainer wrapper = new ColoredBlockContainer(legendConfiguration.getLegendBackgroundColor());
	wrapper.add(legendTitle.getItemContainer());
	wrapper.setPadding(3, 3, 3, 3);
	legendTitle.setWrapper(wrapper);

	legendTitles.add(legendTitle);
	return legendTitles;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:32,代码来源:JFreeChartPlotEngine.java

示例6: setLegend

import org.jfree.chart.block.ColumnArrangement; //导入依赖的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

示例7: doGet

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException,
		ServletException {
	String action = WebUtils.getString(request, "action", "graph");
	String type = WebUtils.getString(request, "t");
	JFreeChart chart = null;
	updateSessionManager(request);

	try {
		if ("refresh".equals(action)) {
			new RepositoryInfo().runAs(null);
			ServletContext sc = getServletContext();
			sc.getRequestDispatcher("/admin/stats.jsp").forward(request, response);
		} else {
			response.setContentType("image/png");
			OutputStream out = response.getOutputStream();

			if (DOCUMENTS.equals(type) || DOCUMENTS_SIZE.equals(type) || FOLDERS.equals(type)) {
				chart = repoStats(type);
			} else if (DISK.equals(type)) {
				chart = diskStats();
			} else if (JVM_MEMORY.equals(type)) {
				chart = jvmMemStats();
			} else if (OS_MEMORY.equals(type)) {
				chart = osMemStats();
			}

			if (chart != null) {
				// Customize title font
				chart.getTitle().setFont(new Font("Tahoma", Font.BOLD, 16));

				// Match body {	background-color:#F6F6EE; }
				chart.setBackgroundPaint(new Color(246, 246, 238));

				// Customize no data
				PiePlot plot = (PiePlot) chart.getPlot();
				plot.setNoDataMessage("No data to display");

				// Customize labels
				plot.setLabelGenerator(null);

				// Customize legend
				LegendTitle legend = new LegendTitle(plot, new ColumnArrangement(), new ColumnArrangement());
				legend.setPosition(RectangleEdge.BOTTOM);
				legend.setFrame(BlockBorder.NONE);
				legend.setItemFont(new Font("Tahoma", Font.PLAIN, 12));
				chart.removeLegend();
				chart.addLegend(legend);

				if (DISK.equals(type) || JVM_MEMORY.equals(type) || OS_MEMORY.equals(type)) {
					ChartUtilities.writeChartAsPNG(out, chart, 225, 225);
				} else {
					ChartUtilities.writeChartAsPNG(out, chart, 250, 250);
				}
			}

			out.flush();
			out.close();
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:63,代码来源:StatsGraphServlet.java

示例8: createLegendChart

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
protected JFreeChart createLegendChart(JFreeChart origchart) {
	
	JFreeChart legendChart = new JFreeChart("", null, new HiddenPlot(),false);
	
	legendChart.setBackgroundPaint(Color.white);
    CategoryPlot plot = origchart.getCategoryPlot();

    LegendTitle legendTitle = new LegendTitle(plot, 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0), 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0)); 
    legendChart.addLegend(legendTitle); 
    
    return legendChart;
    
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:SuperBoxAndWhiskerChart_Vertical.java

示例9: createLegendChart

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
protected JFreeChart createLegendChart(JFreeChart origchart) {
	
	JFreeChart legendChart = new JFreeChart("", null, new HiddenPlot(),false);
	
	legendChart.setBackgroundPaint(Color.white);
    XYPlot plot = (XYPlot)origchart.getPlot();

    LegendTitle legendTitle = new LegendTitle(plot, 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0), 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0)); 
    legendChart.addLegend(legendTitle); 
    
    return legendChart;
    
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:SuperYIntervalChartA.java

示例10: createLegendChart

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
protected JFreeChart createLegendChart(JFreeChart origchart) {
	
	JFreeChart legendChart = new JFreeChart("", null, new HiddenPlot(),false);
	
	legendChart.setBackgroundPaint(Color.white);
	XYPlot plot = (XYPlot)origchart.getPlot();

    LegendTitle legendTitle = new LegendTitle(plot, 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0), 
            new ColumnArrangement(HorizontalAlignment.LEFT, VerticalAlignment.CENTER, 0, 0)); 
    legendChart.addLegend(legendTitle); 
    
    return legendChart;
    
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:16,代码来源:SuperAreaChart_XY.java

示例11: LegendTitle

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Constructs a new (empty) legend for the specified source.
 * 
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:LegendTitle.java

示例12: LegendTitle

import org.jfree.chart.block.ColumnArrangement; //导入依赖的package包/类
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:9,代码来源:LegendTitle.java


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