Package org.jfree.chart.block
Class BlockParams
- java.lang.Object
-
- org.jfree.chart.block.BlockParams
-
- All Implemented Interfaces:
EntityBlockParams
public class BlockParams extends java.lang.Object implements EntityBlockParams
A standard parameter object that can be passed to the draw() method defined by theBlockclass.
-
-
Field Summary
Fields Modifier and Type Field Description private booleangenerateEntitiesA flag that controls whether or not the block should generate and return chart entities for the items it draws.private doubletranslateXThe x-translation (used to enable chart entities to use global coordinates rather than coordinates that are local to the container they are within).private doubletranslateYThe y-translation (used to enable chart entities to use global coordinates rather than coordinates that are local to the container they are within).
-
Constructor Summary
Constructors Constructor Description BlockParams()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetGenerateEntities()Returns the flag that controls whether or not chart entities are generated.doublegetTranslateX()Returns the translation required to convert local x-coordinates back to the coordinate space of the container.doublegetTranslateY()Returns the translation required to convert local y-coordinates back to the coordinate space of the container.voidsetGenerateEntities(boolean generate)Sets the flag that controls whether or not chart entities are generated.voidsetTranslateX(double x)Sets the translation required to convert local x-coordinates into the coordinate space of the container.voidsetTranslateY(double y)Sets the translation required to convert local y-coordinates into the coordinate space of the container.
-
-
-
Field Detail
-
generateEntities
private boolean generateEntities
A flag that controls whether or not the block should generate and return chart entities for the items it draws.
-
translateX
private double translateX
The x-translation (used to enable chart entities to use global coordinates rather than coordinates that are local to the container they are within).
-
translateY
private double translateY
The y-translation (used to enable chart entities to use global coordinates rather than coordinates that are local to the container they are within).
-
-
Method Detail
-
getGenerateEntities
public boolean getGenerateEntities()
Returns the flag that controls whether or not chart entities are generated.- Specified by:
getGenerateEntitiesin interfaceEntityBlockParams- Returns:
- A boolean.
-
setGenerateEntities
public void setGenerateEntities(boolean generate)
Sets the flag that controls whether or not chart entities are generated.- Parameters:
generate- the flag.
-
getTranslateX
public double getTranslateX()
Returns the translation required to convert local x-coordinates back to the coordinate space of the container.- Returns:
- The x-translation amount.
-
setTranslateX
public void setTranslateX(double x)
Sets the translation required to convert local x-coordinates into the coordinate space of the container.- Parameters:
x- the x-translation amount.
-
getTranslateY
public double getTranslateY()
Returns the translation required to convert local y-coordinates back to the coordinate space of the container.- Returns:
- The y-translation amount.
-
setTranslateY
public void setTranslateY(double y)
Sets the translation required to convert local y-coordinates into the coordinate space of the container.- Parameters:
y- the y-translation amount.
-
-