
ar.com.fdvs.dj.domain.DJWaterMark Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of DynamicJasper Show documentation
Show all versions of DynamicJasper Show documentation
DynamicJasper (DJ) is an API that hides the complexity of Jasper
Reports, it helps developers to save time when designing
simple/medium complexity reports generating the layout of the
report elements automatically. It creates reports dynamically,
defining at runtime the columns, column width (auto width), groups,
variables, fonts, charts, crosstabs, sub reports (that can also be dynamic), page size
and everything else that you can define at design time.
DJ keeps full compatibility with Jasper Reports since
it's a tool that helps create reports programmatically in
a easy way (it only interferes with the creation of the report
design doing the layout of the elements).
You can use the classic .jrxml files as templates while the
content and layout of the report elements are handled by the DJ
API.
http://dynamicjasper.com
package ar.com.fdvs.dj.domain;
import ar.com.fdvs.dj.domain.constants.Font;
import java.awt.*;
/**
* Created by DJ Mamana on 04/12/2015.
*/
public class DJWaterMark extends DJBaseElement {
public static final int ANGLE_0 = 0;
public static final int ANGLE_BOTTOM_LEFT_TO_TOP_RIGTH = 315;
public static final int ANGLE_TOP_LEFT_TO_BOTTOM_RIGTH = 45;
String text;
Font font;
Color textColor = Color.PINK;
int angle = ANGLE_BOTTOM_LEFT_TO_TOP_RIGTH;
public DJWaterMark(String text) {
this(text, null, null, ANGLE_BOTTOM_LEFT_TO_TOP_RIGTH);
}
public DJWaterMark(String text, Font font, Color textColor, int angle) {
this.text = text;
if (font != null)
this.font = font;
else {
this.font = (Font) Font.ARIAL_BIG.clone();
this.font.setFontSize(80);
}
if (textColor!= null)
this.textColor = textColor;
if (angle >= 0 && angle <= 360)
this.angle = angle;
}
public String getText() {
return text;
}
public Font getFont() {
return font;
}
public Color getTextColor() {
return textColor;
}
public int getAngle() {
return angle;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy