Java源码示例:org.jfree.chart.block.FlowArrangement
示例1
/**
* 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));
}
示例2
/**
* 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));
}
示例3
/**
* 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;
}
示例4
/**
* Immutable - cloning is not necessary.
*/
public void testCloning() {
FlowArrangement f1 = new FlowArrangement();
assertFalse(f1 instanceof Cloneable);
}
示例5
/**
* Immutable - cloning is not necessary.
*/
public void testCloning() {
FlowArrangement f1 = new FlowArrangement();
assertFalse(f1 instanceof Cloneable);
}
示例6
/**
* Immutable - cloning is not necessary.
*/
public void testCloning() {
FlowArrangement f1 = new FlowArrangement();
assertFalse(f1 instanceof Cloneable);
}
示例7
/**
* Immutable - cloning is not necessary.
*/
public void testCloning() {
FlowArrangement f1 = new FlowArrangement();
assertFalse(f1 instanceof Cloneable);
}
示例8
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例9
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例10
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例11
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例12
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例13
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例14
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例15
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}
示例16
/**
* Constructs a new (empty) legend for the specified source.
*
* @param source the source.
*/
public LegendTitle(LegendItemSource source) {
this(source, new FlowArrangement(), new ColumnArrangement());
}