ar.com.fdvs.dj.domain
Class Style

java.lang.Object
  extended by ar.com.fdvs.dj.domain.Style
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Style
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Class that should be used to define the different styles in a friendly
and strict way.

Usage example:
Style headerStyle = new Style();
headerStyle.setFont(Font.ARIAL_MEDIUM_BOLD);
headerStyle.setBorder(Border.PEN_2_POINT);
headerStyle.setHorizontalAlign(HorizontalAlign.CENTER);
headerStyle.setVerticalAlign(VerticalAlign.MIDDLE);

See Also:
Serialized Form

Constructor Summary
Style()
           
Style(java.lang.String name)
           
Style(java.lang.String name, java.lang.String parentName)
           
 
Method Summary
 java.lang.Object clone()
           
static Style createBlankStyle(java.lang.String name)
          Creates a blank style (no default values).
static Style createBlankStyle(java.lang.String name, java.lang.String parent)
           
 java.awt.Color getBackgroundColor()
           
 Border getBorder()
           
 Border getBorderBottom()
           
 java.awt.Color getBorderColor()
           
 Border getBorderLeft()
           
 Border getBorderRight()
           
 Border getBorderTop()
           
 Font getFont()
           
 HorizontalAlign getHorizontalAlign()
           
 java.lang.String getName()
           
 java.lang.Integer getPadding()
           
 java.lang.Integer getPaddingBottom()
          Deprecated. due to miss spelling
 java.lang.Integer getPaddingLeft()
           
 java.lang.Integer getPaddingRight()
           
 java.lang.Integer getPaddingTop()
          Deprecated. due to miss spelling
 java.lang.String getParentStyleName()
           
 java.lang.String getPattern()
           
 java.lang.Integer getRadius()
           
 Rotation getRotation()
           
 Stretching getStreching()
           
 java.awt.Color getTextColor()
           
 Transparency getTransparency()
           
 VerticalAlign getVerticalAlign()
           
 boolean isBlankWhenNull()
           
 boolean isOverridesExistingStyle()
           
 boolean isStretchWithOverflow()
           
 boolean isTransparent()
           
 void setBackgroundColor(java.awt.Color backgroundColor)
           
 void setBlankWhenNull(boolean blankWhenNull)
           
 void setBorder(Border border)
           
 void setBorderBottom(Border borderBottom)
           
 void setBorderColor(java.awt.Color borderColor)
           
 void setBorderLeft(Border borderLeft)
           
 void setBorderRight(Border borderRight)
           
 void setBorderTop(Border borderTop)
           
 void setFont(Font font)
           
 void setHorizontalAlign(HorizontalAlign horizontalAlign)
           
protected  void setJRBaseStyleProperties(net.sf.jasperreports.engine.base.JRBaseStyle transformedStyle)
           
 void setName(java.lang.String name)
           
 void setOverridesExistingStyle(boolean overridesExistingStyle)
           
 void setPadding(java.lang.Integer padding)
           
 void setPaddingBottom(java.lang.Integer paddingBottom)
           
 void setPaddingLeft(java.lang.Integer paddingLeft)
           
 void setPaddingRight(java.lang.Integer paddingRight)
           
 void setPaddingTop(java.lang.Integer paddingTop)
           
 void setParentStyleName(java.lang.String parentStyleName)
           
 void setPattern(java.lang.String pattern)
           
 void setRadius(java.lang.Integer radius)
           
 void setRotation(Rotation rotation)
           
 void setStreching(Stretching streching)
           
 void setStretchWithOverflow(boolean stretchWithOverflow)
           
 void setTextColor(java.awt.Color textColor)
           
 void setTransparency(Transparency transparency)
           
 void setTransparent(boolean transparent)
           
 void setVerticalAlign(VerticalAlign verticalAlign)
           
 net.sf.jasperreports.engine.design.JRDesignStyle transform()
           
 net.sf.jasperreports.engine.design.JRDesignConditionalStyle transformAsConditinalStyle()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Style

public Style()

Style

public Style(java.lang.String name)

Style

public Style(java.lang.String name,
             java.lang.String parentName)
Method Detail

isOverridesExistingStyle

public boolean isOverridesExistingStyle()

setOverridesExistingStyle

public void setOverridesExistingStyle(boolean overridesExistingStyle)

isBlankWhenNull

public boolean isBlankWhenNull()

setBlankWhenNull

public void setBlankWhenNull(boolean blankWhenNull)

getBackgroundColor

public java.awt.Color getBackgroundColor()

setBackgroundColor

public void setBackgroundColor(java.awt.Color backgroundColor)

getBorder

public Border getBorder()

setBorder

public void setBorder(Border border)

getFont

public Font getFont()

setFont

public void setFont(Font font)

getHorizontalAlign

public HorizontalAlign getHorizontalAlign()

setHorizontalAlign

public void setHorizontalAlign(HorizontalAlign horizontalAlign)

getPadding

public java.lang.Integer getPadding()

setPadding

public void setPadding(java.lang.Integer padding)

getStreching

public Stretching getStreching()

setStreching

public void setStreching(Stretching streching)

isStretchWithOverflow

public boolean isStretchWithOverflow()

setStretchWithOverflow

public void setStretchWithOverflow(boolean stretchWithOverflow)

getTextColor

public java.awt.Color getTextColor()

setTextColor

public void setTextColor(java.awt.Color textColor)

getTransparency

public Transparency getTransparency()

setTransparency

public void setTransparency(Transparency transparency)

setTransparent

public void setTransparent(boolean transparent)

isTransparent

public boolean isTransparent()

getVerticalAlign

public VerticalAlign getVerticalAlign()

setVerticalAlign

public void setVerticalAlign(VerticalAlign verticalAlign)

transformAsConditinalStyle

public net.sf.jasperreports.engine.design.JRDesignConditionalStyle transformAsConditinalStyle()

transform

public net.sf.jasperreports.engine.design.JRDesignStyle transform()

setJRBaseStyleProperties

protected void setJRBaseStyleProperties(net.sf.jasperreports.engine.base.JRBaseStyle transformedStyle)

getBorderBottom

public Border getBorderBottom()

setBorderBottom

public void setBorderBottom(Border borderBottom)

getBorderLeft

public Border getBorderLeft()

setBorderLeft

public void setBorderLeft(Border borderLeft)

getBorderRight

public Border getBorderRight()

setBorderRight

public void setBorderRight(Border borderRight)

getBorderTop

public Border getBorderTop()

setBorderTop

public void setBorderTop(Border borderTop)

getBorderColor

public java.awt.Color getBorderColor()

setBorderColor

public void setBorderColor(java.awt.Color borderColor)

getRotation

public Rotation getRotation()

setRotation

public void setRotation(Rotation rotation)

getRadius

public java.lang.Integer getRadius()

setRadius

public void setRadius(java.lang.Integer radius)

getPaddingBottom

public java.lang.Integer getPaddingBottom()
Deprecated. due to miss spelling

Returns:

setPaddingBottom

public void setPaddingBottom(java.lang.Integer paddingBottom)

getPaddingTop

public java.lang.Integer getPaddingTop()
Deprecated. due to miss spelling

Parameters:
paddingBotton -

setPaddingTop

public void setPaddingTop(java.lang.Integer paddingTop)

getPaddingLeft

public java.lang.Integer getPaddingLeft()

setPaddingLeft

public void setPaddingLeft(java.lang.Integer paddingLeft)

getPaddingRight

public java.lang.Integer getPaddingRight()

setPaddingRight

public void setPaddingRight(java.lang.Integer paddingRight)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getParentStyleName

public java.lang.String getParentStyleName()

setParentStyleName

public void setParentStyleName(java.lang.String parentStyleName)

createBlankStyle

public static Style createBlankStyle(java.lang.String name)
Creates a blank style (no default values). Usefull when we need a style with a parent style, not defined properties (null ones) will be inherited from parent style

Parameters:
name -
Returns:

createBlankStyle

public static Style createBlankStyle(java.lang.String name,
                                     java.lang.String parent)

getPattern

public java.lang.String getPattern()

setPattern

public void setPattern(java.lang.String pattern)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException


Copyright © 2006-2011 FDV Solutions. All Rights Reserved.