org.jfree.chart.block.FlowArrangement Java Examples

The following examples show how to use org.jfree.chart.block.FlowArrangement. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlockContainerTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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));
}
 
Example #2
Source File: BlockContainerTests.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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));
}
 
Example #3
Source File: JFreeChartPlotEngine.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * 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;
}
 
Example #4
Source File: FlowArrangementTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Immutable - cloning is not necessary.
 */
public void testCloning() {
    FlowArrangement f1 = new FlowArrangement();
    assertFalse(f1 instanceof Cloneable);
}
 
Example #5
Source File: ColumnArrangementTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Immutable - cloning is not necessary.
 */
public void testCloning() {
    FlowArrangement f1 = new FlowArrangement();
    assertFalse(f1 instanceof Cloneable);
}
 
Example #6
Source File: FlowArrangementTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Immutable - cloning is not necessary.
 */
public void testCloning() {
    FlowArrangement f1 = new FlowArrangement();
    assertFalse(f1 instanceof Cloneable);
}
 
Example #7
Source File: ColumnArrangementTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Immutable - cloning is not necessary.
 */
public void testCloning() {
    FlowArrangement f1 = new FlowArrangement();
    assertFalse(f1 instanceof Cloneable);
}
 
Example #8
Source File: LegendTitle.java    From openstock with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #9
Source File: LegendTitle.java    From ccu-historian with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #10
Source File: LegendTitle.java    From SIMVA-SoS with Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #11
Source File: LegendTitle.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #12
Source File: LegendTitle.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #13
Source File: LegendTitle.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 * 
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #14
Source File: LegendTitle.java    From opensim-gui with Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 * 
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #15
Source File: LegendTitle.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}
 
Example #16
Source File: LegendTitle.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Constructs a new (empty) legend for the specified source.
 *
 * @param source  the source.
 */
public LegendTitle(LegendItemSource source) {
    this(source, new FlowArrangement(), new ColumnArrangement());
}