org.opengts.war.report
Class ColumnValue

java.lang.Object
  extended by org.opengts.war.report.ColumnValue

public class ColumnValue
extends java.lang.Object


Field Summary
static java.lang.String FONT_STYLE_ITALIC
           
static java.lang.String FONT_WEIGHT_BOLD
           
static java.lang.String LINK_TARGET_BLANK
           
static java.lang.String LINK_TARGET_DEFAULT
           
static java.lang.String LINK_TARGET_NONE
           
static java.lang.String LINK_TARGET_TOP
           
static java.lang.String TEXT_DECORATION_BLINK
           
static java.lang.String TEXT_DECORATION_OVERLINE
           
static java.lang.String TEXT_DECORATION_UNDERLINE
           
 
Constructor Summary
ColumnValue()
          Constructor
ColumnValue(ColumnValue other)
          Copy Constructor
ColumnValue(long value)
          Constructor
ColumnValue(java.lang.String value)
          Constructor
ColumnValue(URIArg url)
          Constructor
 
Method Summary
 void clear()
          Clears all state
 java.lang.String getBackgroundColor()
          Gets the text background color
 java.lang.String getCssClass()
          Gets the CSS class for this ColumnValue
 java.lang.String getFontStyle()
          Gets the text font style
 java.lang.String getFontWeight()
          Gets the text font weight
 java.lang.String getForegroundColor()
          Gets the text foreground color
 java.lang.String getImageURL()
          Gets the imageURL URL
 java.lang.String getLinkTarget()
          Gets the link target
 java.lang.String getLinkURL()
          Gets the link URL
 java.lang.String getSortKey()
          Gets the value that should be used for sorting.
 java.lang.String getStyleString()
          Gets the "style" for this custom value.
Note: the prefixing style= and quotes are not included.
 java.lang.String getTextDecoration()
          Gets the text decoration
 java.lang.String getValue()
          Gets the current value
 boolean hasBackgroundColor()
          Returns true if the background color attribute has been defined
 boolean hasCssClass()
          Returns true if this column has a specific define CSS class, false otherwise
 boolean hasFontStyle()
          Returns true if the text font style attribute has been defined
 boolean hasFontWeight()
          Returns true if the text font weight attribute has been defined
 boolean hasForegroundColor()
          Returns true if the foreground color attribute has been defined
 boolean hasImageURL()
          Returns true if the image URL attribute has been defined
 boolean hasLinkTarget()
          Returns true if the link target attribute has been defined
 boolean hasLinkURL()
          Returns true if the link URL attribute has been defined
 boolean hasSortKey()
          Returns true if a sort key has been set for this column value
 boolean hasStyle()
          Returns true if this ColumnValue contains style information
 boolean hasTextDecoration()
          Returns true if the text decoration attribute has been defined
 ColumnValue setBackgroundColor(java.lang.String color)
          Sets the text background color
 ColumnValue setCssClass(java.lang.String cssClass)
          Sets the CSS class for this ColumnValue
 ColumnValue setFontStyle(java.lang.String fs)
          Sets the text font style ("font-style:")
 ColumnValue setFontStyleItalic()
          Sets the text font style to "italic"
 ColumnValue setFontWeight(java.lang.String fw)
          Sets the text font weight ("font-weight:")
 ColumnValue setFontWeightBold()
          Sets the text font weight to "bold"
 ColumnValue setForegroundColor(ColorTools.RGB rgb)
          Sets the text foregound color
 ColumnValue setForegroundColor(java.lang.String color)
          Sets the text foregound color
 ColumnValue setImageURL(java.lang.String url)
          Sets the image URL
 ColumnValue setImageURL(java.lang.String url, PixelDimension size)
          Sets the image URL
 ColumnValue setImageURL(URIArg url)
          Sets the image URL
 ColumnValue setLinkURL(java.lang.String url)
          Sets the link URL
 ColumnValue setLinkURL(java.lang.String url, java.lang.String target)
          Sets the link URL
 ColumnValue setLinkURL(URIArg url)
          Sets the link URL
 ColumnValue setLinkURL(URIArg url, java.lang.String target)
          Sets the link URL
 ColumnValue setSortKey(int val)
          Sets the value that should be used for sorting.
 ColumnValue setSortKey(long val)
          Sets the value that should be used for sorting.
 ColumnValue setSortKey(java.lang.String val)
          Sets the value that should be used for sorting.
 ColumnValue setTextDecoration(java.lang.String decor)
          Sets the text decoration style ("text-decoration:")
 ColumnValue setTextDecorationBlink()
          Sets the text decoration style to "blink"
 ColumnValue setTextDecorationOverline()
          Sets the text decoration style to "overline"
 ColumnValue setTextDecorationUnderline()
          Sets the text decoration style to "underline"
 ColumnValue setValue(java.lang.String val)
          Sets the current value
 java.lang.String toString()
          Gets the current value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LINK_TARGET_NONE

public static final java.lang.String LINK_TARGET_NONE
See Also:
Constant Field Values

LINK_TARGET_BLANK

public static final java.lang.String LINK_TARGET_BLANK
See Also:
Constant Field Values

LINK_TARGET_TOP

public static final java.lang.String LINK_TARGET_TOP
See Also:
Constant Field Values

LINK_TARGET_DEFAULT

public static final java.lang.String LINK_TARGET_DEFAULT
See Also:
Constant Field Values

TEXT_DECORATION_UNDERLINE

public static final java.lang.String TEXT_DECORATION_UNDERLINE
See Also:
Constant Field Values

TEXT_DECORATION_OVERLINE

public static final java.lang.String TEXT_DECORATION_OVERLINE
See Also:
Constant Field Values

TEXT_DECORATION_BLINK

public static final java.lang.String TEXT_DECORATION_BLINK
See Also:
Constant Field Values

FONT_WEIGHT_BOLD

public static final java.lang.String FONT_WEIGHT_BOLD
See Also:
Constant Field Values

FONT_STYLE_ITALIC

public static final java.lang.String FONT_STYLE_ITALIC
See Also:
Constant Field Values
Constructor Detail

ColumnValue

public ColumnValue()
Constructor


ColumnValue

public ColumnValue(ColumnValue other)
Copy Constructor

Parameters:
other - The other report ColumnValue

ColumnValue

public ColumnValue(java.lang.String value)
Constructor

Parameters:
value - The report column String value

ColumnValue

public ColumnValue(URIArg url)
Constructor

Parameters:
url - The report column String value

ColumnValue

public ColumnValue(long value)
Constructor

Parameters:
value - The report column String value
Method Detail

hasCssClass

public boolean hasCssClass()
Returns true if this column has a specific define CSS class, false otherwise

Returns:
True if this column has a specific define CSS class

setCssClass

public ColumnValue setCssClass(java.lang.String cssClass)
Sets the CSS class for this ColumnValue

Parameters:
cssClass - The css class

getCssClass

public java.lang.String getCssClass()
Gets the CSS class for this ColumnValue

Returns:
The css class, or null/blank if no CSS class defined

clear

public void clear()
Clears all state


setValue

public ColumnValue setValue(java.lang.String val)
Sets the current value

Parameters:
val - The column String value
Returns:
This ColumnValue instance

getValue

public java.lang.String getValue()
Gets the current value

Returns:
This current column value as a String

toString

public java.lang.String toString()
Gets the current value

Overrides:
toString in class java.lang.Object
Returns:
This current column value as a String

setSortKey

public ColumnValue setSortKey(java.lang.String val)
Sets the value that should be used for sorting.

Parameters:
val - The column String value
Returns:
This ColumnValue instance

setSortKey

public ColumnValue setSortKey(long val)
Sets the value that should be used for sorting.

Parameters:
val - The column String value
Returns:
This ColumnValue instance

setSortKey

public ColumnValue setSortKey(int val)
Sets the value that should be used for sorting.

Parameters:
val - The column String value
Returns:
This ColumnValue instance

hasSortKey

public boolean hasSortKey()
Returns true if a sort key has been set for this column value

Returns:
True if a sort key has been set for this column value

getSortKey

public java.lang.String getSortKey()
Gets the value that should be used for sorting. Returns null if value returned by 'getValue()' should be used for sorting

Returns:
The sort key, or null if no special sort key is required

hasStyle

public boolean hasStyle()
Returns true if this ColumnValue contains style information

Returns:
True if this ColumnValue contains style information

getStyleString

public java.lang.String getStyleString()
Gets the "style" for this custom value.
Note: the prefixing style= and quotes are not included.

Returns:
The "style" for this custom value

setForegroundColor

public ColumnValue setForegroundColor(ColorTools.RGB rgb)
Sets the text foregound color

Parameters:
rgb - The ColorTools.RGB value of the text foreground color
Returns:
This ColumnValue instance

setForegroundColor

public ColumnValue setForegroundColor(java.lang.String color)
Sets the text foregound color

Parameters:
color - The String representation of the text foreground color
Returns:
This ColumnValue instance

hasForegroundColor

public boolean hasForegroundColor()
Returns true if the foreground color attribute has been defined

Returns:
True if the foreground color attribute has been defined

getForegroundColor

public java.lang.String getForegroundColor()
Gets the text foreground color

Returns:
The text foreground color

setBackgroundColor

public ColumnValue setBackgroundColor(java.lang.String color)
Sets the text background color

Parameters:
color - The String representation of the text background color
Returns:
This ColumnValue instance

hasBackgroundColor

public boolean hasBackgroundColor()
Returns true if the background color attribute has been defined

Returns:
True if the background color attribute has been defined

getBackgroundColor

public java.lang.String getBackgroundColor()
Gets the text background color

Returns:
The text background color

setTextDecoration

public ColumnValue setTextDecoration(java.lang.String decor)
Sets the text decoration style ("text-decoration:")

Parameters:
decor - text decoraton style (ie. "underline", "overline", "line-through", "blink")
Returns:
This ColumnValue instance

setTextDecorationUnderline

public ColumnValue setTextDecorationUnderline()
Sets the text decoration style to "underline"

Returns:
This ColumnValue instance

setTextDecorationOverline

public ColumnValue setTextDecorationOverline()
Sets the text decoration style to "overline"

Returns:
This ColumnValue instance

setTextDecorationBlink

public ColumnValue setTextDecorationBlink()
Sets the text decoration style to "blink"

Returns:
This ColumnValue instance

hasTextDecoration

public boolean hasTextDecoration()
Returns true if the text decoration attribute has been defined

Returns:
True if the text decoration attribute has been defined

getTextDecoration

public java.lang.String getTextDecoration()
Gets the text decoration

Returns:
The text decoration

setFontWeight

public ColumnValue setFontWeight(java.lang.String fw)
Sets the text font weight ("font-weight:")

Parameters:
fw - The text font weight (ie. "bold", "normal", "100".."900")
Returns:
This ColumnValue instance

setFontWeightBold

public ColumnValue setFontWeightBold()
Sets the text font weight to "bold"

Returns:
This ColumnValue instance

hasFontWeight

public boolean hasFontWeight()
Returns true if the text font weight attribute has been defined

Returns:
True if the text font weight attribute has been defined

getFontWeight

public java.lang.String getFontWeight()
Gets the text font weight

Returns:
The text font weight

setFontStyle

public ColumnValue setFontStyle(java.lang.String fs)
Sets the text font style ("font-style:")

Parameters:
fs - The text font style (ie. "normal", "italic", "oblique")
Returns:
This ColumnValue instance

setFontStyleItalic

public ColumnValue setFontStyleItalic()
Sets the text font style to "italic"

Returns:
This ColumnValue instance

hasFontStyle

public boolean hasFontStyle()
Returns true if the text font style attribute has been defined

Returns:
True if the text font style attribute has been defined

getFontStyle

public java.lang.String getFontStyle()
Gets the text font style

Returns:
The text font style

setImageURL

public ColumnValue setImageURL(java.lang.String url)
Sets the image URL

Parameters:
url - The image URL
Returns:
This ColumnValue instance

setImageURL

public ColumnValue setImageURL(URIArg url)
Sets the image URL

Parameters:
url - The image URL
Returns:
This ColumnValue instance

setImageURL

public ColumnValue setImageURL(java.lang.String url,
                               PixelDimension size)
Sets the image URL

Parameters:
url - The image URL
size - The image width/height
Returns:
This ColumnValue instance

hasImageURL

public boolean hasImageURL()
Returns true if the image URL attribute has been defined

Returns:
True if the image URL attribute has been defined

getImageURL

public java.lang.String getImageURL()
Gets the imageURL URL

Returns:
The imageURL URL

setLinkURL

public ColumnValue setLinkURL(java.lang.String url)
Sets the link URL

Parameters:
url - The link URL
Returns:
This ColumnValue instance

setLinkURL

public ColumnValue setLinkURL(URIArg url)
Sets the link URL

Parameters:
url - The link URL
Returns:
This ColumnValue instance

setLinkURL

public ColumnValue setLinkURL(java.lang.String url,
                              java.lang.String target)
Sets the link URL

Parameters:
url - The link URL
target - The link target ("_blank", "_top")
Returns:
This ColumnValue instance

setLinkURL

public ColumnValue setLinkURL(URIArg url,
                              java.lang.String target)
Sets the link URL

Parameters:
url - The link URL
target - The link target ("_blank", "_top", "-self")
Returns:
This ColumnValue instance

hasLinkURL

public boolean hasLinkURL()
Returns true if the link URL attribute has been defined

Returns:
True if the link URL attribute has been defined

getLinkURL

public java.lang.String getLinkURL()
Gets the link URL

Returns:
The link URL

hasLinkTarget

public boolean hasLinkTarget()
Returns true if the link target attribute has been defined

Returns:
True if the link target attribute has been defined

getLinkTarget

public java.lang.String getLinkTarget()
Gets the link target

Returns:
The link target