Java Doc for ElementStyleSheet.java in  » Report » pentaho-report » org » jfree » report » style » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » pentaho report » org.jfree.report.style 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.report.style.AbstractStyleSheet
      org.jfree.report.style.ElementStyleSheet

All known Subclasses:   org.jfree.report.style.ElementDefaultStyleSheet,
ElementStyleSheet
abstract public class ElementStyleSheet extends AbstractStyleSheet implements Serializable,StyleChangeListener,Cloneable(Code)
An element style-sheet contains zero, one or many attributes that affect the appearance of report elements. For each attribute, there is a predefined key that can be used to access that attribute in the style sheet.

Every report element has an associated style-sheet.

A style-sheet maintains a list of parent style-sheets. If an attribute is not defined in a style-sheet, the code refers to the parent style-sheets to see if the attribute is defined there.

All StyleSheet entries are checked against the StyleKeyDefinition for validity.

As usual, this implementation is not synchronized, we need the performance during the reporting.
author:
   Thomas Morgner



Field Summary
final public static  StyleKeyALIGNMENT
     A key for the horizontal alignment of an element.
final public static  StyleKeyBOLD
     A key for an element's 'bold' flag.
final public static  StyleKeyBOUNDS
     A key for the 'bounds' of an element.
final public static  StyleKeyDYNAMIC_HEIGHT
     A key for the dynamic height flag for an element.
final public static  StyleKeyELEMENT_LAYOUT_CACHEABLE
     The Layout Cacheable stylekey.
final public static  StyleKeyEMBEDDED_FONT
     A key for an element's 'embedd' flag.
final public static  StyleKeyEXCEL_DATA_FORMAT_STRING
     The StyleKey for the user defined cell data format.
final public static  StyleKeyEXCEL_WRAP_TEXT
     The StyleKey for the user defined cell data format.
final public static  StyleKeyEXTPAINT
     A key for the 'ext-paint' used to fill or draw an element.
final public static  StyleKeyFONT
     A key for the 'font family' used to draw element text.
final public static  StyleKeyFONTENCODING
     A key for an element's 'embedd' flag.
final public static  StyleKeyFONTSIZE
     A key for the 'font size' used to draw element text.
final public static  StyleKeyHREF_INHERITED
     An internal flag style indicating whether the current HRef is inherited from a child.
final public static  StyleKeyHREF_TARGET
    
final public static  StyleKeyHREF_WINDOW
     Specifies the anchor tag's target window for opening the link.
final public static  StyleKeyITALIC
     A key for an element's 'italic' flag.
final public static  StyleKeyKEEP_ASPECT_RATIO
     A key for an element's 'keep aspect ratio' flag.
final public static  StyleKeyLINEHEIGHT
     A key for the 'font size' used to draw element text.
final public static  StyleKeyMAXIMUMSIZE
     A key for the 'maximum size' of an element.
final public static  StyleKeyMINIMUMSIZE
     A key for the 'minimum size' of an element.
final public static  StyleKeyPAINT
     A key for the 'paint' used to color an element.
final public static  StyleKeyPREFERREDSIZE
     A key for the 'preferred size' of an element.
final public static  StyleKeyRESERVED_LITERAL
     The string that is used to end a text if not all text fits into the element.
final public static  StyleKeySCALE
     A key for an element's 'scale' flag.
final public static  StyleKeySTRIKETHROUGH
     A key for an element's 'strikethrough' flag.
final public static  StyleKeySTROKE
     A key for the 'stroke' used to draw an element.
final public static  StyleKeyTRIM_TEXT_CONTENT
     The Layout Cacheable stylekey.
final public static  StyleKeyUNDERLINED
     A key for an element's 'underlined' flag.
final public static  StyleKeyVALIGNMENT
     A key for the vertical alignment of an element.
final public static  StyleKeyVISIBLE
     A key for an element's 'visible' flag.

Constructor Summary
protected  ElementStyleSheet(String name)
     Creates a new element style-sheet with the given name.
protected  ElementStyleSheet(String name, ElementStyleSheet deriveParent)
     Creates a new element style-sheet with the given name.

Method Summary
public  voidaddListener(StyleChangeListener l)
     Adds a StyleChangeListener .
public  voidaddParent(ElementStyleSheet parent)
     Adds a parent style-sheet.
public  voidaddParent(int position, ElementStyleSheet parent)
     Adds a parent style-sheet.
public  Objectclone()
     Creates and returns a copy of this object.
abstract protected  StyleSheetCarriercreateCarrier(ElementStyleSheet styleSheet)
    
public  ElementStyleSheetgetCascadeStyleSheet()
    
public  longgetChangeTracker()
    
public  ElementStyleSheetgetCopy()
     Clones the style-sheet.
public  IteratorgetDefinedPropertyNames()
     Returns an enumeration of all local property keys.
public  StyleKey[]getDefinedPropertyNamesArray()
    
public  FontDefinitiongetFontDefinitionProperty()
     Returns the font for this style-sheet.
public  ElementDefaultStyleSheetgetGlobalDefaultStyleSheet()
     Returns the global default (if defined).
public  StringgetName()
     Returns the name of the style-sheet.
protected  StyleSheetCarrier[]getParentReferences()
    
public  ElementStyleSheet[]getParents()
     Returns a list of the parent style-sheets.
public  ObjectgetStyleProperty(StyleKey key, Object defaultValue)
     Returns the value of a style.
final public  booleanisAllowCaching()
     Returns true if caching is allowed, and false otherwise.
public  booleanisGlobalDefault()
     Returns true, if this stylesheet is one of the global default stylesheets.
public  booleanisLocalKey(StyleKey key)
     Returns true, if the given key is locally defined, false otherwise.
protected  booleanisSubStyleSheet(ElementStyleSheet parent)
     Checks, whether the given element stylesheet is already added as child into the stylesheet tree.
Parameters:
  parent - the element that should be tested.
public  voidremoveListener(StyleChangeListener l)
     Removes a StyleChangeListener .
public  voidremoveParent(ElementStyleSheet parent)
     Removes a parent style-sheet.
public  voidsetAllowCaching(boolean allowCaching)
     Sets the flag that controls whether or not caching is allowed.
public  voidsetBooleanStyleProperty(StyleKey key, boolean value)
     Sets a boolean style property.
public  voidsetCascadeStyleSheet(ElementStyleSheet cascadeStyleSheet)
    
public  voidsetFontDefinitionProperty(FontDefinition font)
     Sets the font for this style-sheet.
public  voidsetGlobalDefaultStyleSheet(ElementDefaultStyleSheet defaultStyleSheet)
    
public  voidsetStyleProperty(StyleKey key, Object value)
     Sets a style property (or removes the style if the value is null).
public  voidstyleChanged(ElementStyleSheet source, StyleKey key, Object value)
     Forwards a change event notification to all registered StyleChangeListener objects.
public  voidstyleRemoved(ElementStyleSheet source, StyleKey key)
     Forwards a change event notification to all registered StyleChangeListener objects.
final public  Object[]toArray(StyleKey[] keys)
    

Field Detail
ALIGNMENT
final public static StyleKey ALIGNMENT(Code)
A key for the horizontal alignment of an element.



BOLD
final public static StyleKey BOLD(Code)
A key for an element's 'bold' flag.



BOUNDS
final public static StyleKey BOUNDS(Code)
A key for the 'bounds' of an element. This style property is not inherited from the parent band. This style property is an internal state property and is therefore not written to the XML.



DYNAMIC_HEIGHT
final public static StyleKey DYNAMIC_HEIGHT(Code)
A key for the dynamic height flag for an element.



ELEMENT_LAYOUT_CACHEABLE
final public static StyleKey ELEMENT_LAYOUT_CACHEABLE(Code)
The Layout Cacheable stylekey. Set this stylekey to false, to define that the element is not cachable. This key defaults to true.



EMBEDDED_FONT
final public static StyleKey EMBEDDED_FONT(Code)
A key for an element's 'embedd' flag.



EXCEL_DATA_FORMAT_STRING
final public static StyleKey EXCEL_DATA_FORMAT_STRING(Code)
The StyleKey for the user defined cell data format.



EXCEL_WRAP_TEXT
final public static StyleKey EXCEL_WRAP_TEXT(Code)
The StyleKey for the user defined cell data format.



EXTPAINT
final public static StyleKey EXTPAINT(Code)
A key for the 'ext-paint' used to fill or draw an element. If the specified paint is not supported by the output target, the color given with the 'paint' key is used instead.



FONT
final public static StyleKey FONT(Code)
A key for the 'font family' used to draw element text.



FONTENCODING
final public static StyleKey FONTENCODING(Code)
A key for an element's 'embedd' flag.



FONTSIZE
final public static StyleKey FONTSIZE(Code)
A key for the 'font size' used to draw element text.



HREF_INHERITED
final public static StyleKey HREF_INHERITED(Code)
An internal flag style indicating whether the current HRef is inherited from a child.

This style property is an internal state property and is therefore not written to the XML.




HREF_TARGET
final public static StyleKey HREF_TARGET(Code)



HREF_WINDOW
final public static StyleKey HREF_WINDOW(Code)
Specifies the anchor tag's target window for opening the link.



ITALIC
final public static StyleKey ITALIC(Code)
A key for an element's 'italic' flag.



KEEP_ASPECT_RATIO
final public static StyleKey KEEP_ASPECT_RATIO(Code)
A key for an element's 'keep aspect ratio' flag.



LINEHEIGHT
final public static StyleKey LINEHEIGHT(Code)
A key for the 'font size' used to draw element text.



MAXIMUMSIZE
final public static StyleKey MAXIMUMSIZE(Code)
A key for the 'maximum size' of an element. This style property is not inherited from the parent band.



MINIMUMSIZE
final public static StyleKey MINIMUMSIZE(Code)
A key for the 'minimum size' of an element. This style property is not inherited from the parent band.



PAINT
final public static StyleKey PAINT(Code)
A key for the 'paint' used to color an element. For historical reasons, this key requires a color value.



PREFERREDSIZE
final public static StyleKey PREFERREDSIZE(Code)
A key for the 'preferred size' of an element. This style property is not inherited from the parent band.



RESERVED_LITERAL
final public static StyleKey RESERVED_LITERAL(Code)
The string that is used to end a text if not all text fits into the element.



SCALE
final public static StyleKey SCALE(Code)
A key for an element's 'scale' flag.



STRIKETHROUGH
final public static StyleKey STRIKETHROUGH(Code)
A key for an element's 'strikethrough' flag.



STROKE
final public static StyleKey STROKE(Code)
A key for the 'stroke' used to draw an element. (This now only applies to shape and drawable-elements.)



TRIM_TEXT_CONTENT
final public static StyleKey TRIM_TEXT_CONTENT(Code)
The Layout Cacheable stylekey. Set this stylekey to false, to define that the element is not cachable. This key defaults to true.



UNDERLINED
final public static StyleKey UNDERLINED(Code)
A key for an element's 'underlined' flag.



VALIGNMENT
final public static StyleKey VALIGNMENT(Code)
A key for the vertical alignment of an element.



VISIBLE
final public static StyleKey VISIBLE(Code)
A key for an element's 'visible' flag.




Constructor Detail
ElementStyleSheet
protected ElementStyleSheet(String name)(Code)
Creates a new element style-sheet with the given name. The style-sheet initially contains no attributes, and has no parent style-sheets.
Parameters:
  name - the name (null not permitted).



ElementStyleSheet
protected ElementStyleSheet(String name, ElementStyleSheet deriveParent)(Code)
Creates a new element style-sheet with the given name. The style-sheet initially contains no attributes, and has no parent style-sheets.
Parameters:
  name - the name (null not permitted).




Method Detail
addListener
public void addListener(StyleChangeListener l)(Code)
Adds a StyleChangeListener .
Parameters:
  l - the listener.



addParent
public void addParent(ElementStyleSheet parent)(Code)
Adds a parent style-sheet. This method adds the parent to the beginning of the list, and guarantees, that this parent is queried first.
Parameters:
  parent - the parent (null not permitted).



addParent
public void addParent(int position, ElementStyleSheet parent)(Code)
Adds a parent style-sheet. Parents on a lower position are queried before any parent with an higher position in the list.
Parameters:
  position - the position where to insert the parent style sheet
Parameters:
  parent - the parent (null not permitted).
throws:
  IndexOutOfBoundsException - if the position is invalid (pos < 0 or pos >= numberOfParents)



clone
public Object clone() throws CloneNotSupportedException(Code)
Creates and returns a copy of this object. After the cloning, the new StyleSheet is no longer registered with its parents. a clone of this instance.
See Also:   Cloneable



createCarrier
abstract protected StyleSheetCarrier createCarrier(ElementStyleSheet styleSheet)(Code)



getCascadeStyleSheet
public ElementStyleSheet getCascadeStyleSheet()(Code)



getChangeTracker
public long getChangeTracker()(Code)



getCopy
public ElementStyleSheet getCopy() throws CloneNotSupportedException(Code)
Clones the style-sheet. The assigned parent style sheets are not cloned. The stylesheets are not assigned to the contained stylesheet collection, you have to reassign them manually ... the clone.



getDefinedPropertyNames
public Iterator getDefinedPropertyNames()(Code)
Returns an enumeration of all local property keys. an enumeration of all localy defined style property keys.



getDefinedPropertyNamesArray
public StyleKey[] getDefinedPropertyNamesArray()(Code)



getFontDefinitionProperty
public FontDefinition getFontDefinitionProperty()(Code)
Returns the font for this style-sheet. the font.



getGlobalDefaultStyleSheet
public ElementDefaultStyleSheet getGlobalDefaultStyleSheet()(Code)
Returns the global default (if defined). the list.



getName
public String getName()(Code)
Returns the name of the style-sheet. the name (never null).



getParentReferences
protected StyleSheetCarrier[] getParentReferences()(Code)



getParents
public ElementStyleSheet[] getParents()(Code)
Returns a list of the parent style-sheets.

The list is unmodifiable. the list.




getStyleProperty
public Object getStyleProperty(StyleKey key, Object defaultValue)(Code)
Returns the value of a style. If the style is not found in this style-sheet, the code looks in the parent style-sheets. If the style is not found in any of the parent style-sheets, then the default value (possibly null) is returned.
Parameters:
  key - the style key.
Parameters:
  defaultValue - the default value (null permitted). the value.



isAllowCaching
final public boolean isAllowCaching()(Code)
Returns true if caching is allowed, and false otherwise. A boolean.



isGlobalDefault
public boolean isGlobalDefault()(Code)
Returns true, if this stylesheet is one of the global default stylesheets. Global default stylesheets are unmodifiable and shared among all element stylesheets. true, if this is one of the unmodifiable global default stylesheets, false otherwise.



isLocalKey
public boolean isLocalKey(StyleKey key)(Code)
Returns true, if the given key is locally defined, false otherwise.
Parameters:
  key - the key to test true, if the key is local, false otherwise.



isSubStyleSheet
protected boolean isSubStyleSheet(ElementStyleSheet parent)(Code)
Checks, whether the given element stylesheet is already added as child into the stylesheet tree.
Parameters:
  parent - the element that should be tested. true, if the element is a child of this element style sheet, false otherwise.



removeListener
public void removeListener(StyleChangeListener l)(Code)
Removes a StyleChangeListener .
Parameters:
  l - the listener.



removeParent
public void removeParent(ElementStyleSheet parent)(Code)
Removes a parent style-sheet.
Parameters:
  parent - the style-sheet to remove (null not permitted).



setAllowCaching
public void setAllowCaching(boolean allowCaching)(Code)
Sets the flag that controls whether or not caching is allowed.
Parameters:
  allowCaching - the flag value.



setBooleanStyleProperty
public void setBooleanStyleProperty(StyleKey key, boolean value)(Code)
Sets a boolean style property.
Parameters:
  key - the style key (null not permitted).
Parameters:
  value - the value.
throws:
  NullPointerException - if the given key is null.
throws:
  ClassCastException - if the value cannot be assigned with the given key.



setCascadeStyleSheet
public void setCascadeStyleSheet(ElementStyleSheet cascadeStyleSheet)(Code)



setFontDefinitionProperty
public void setFontDefinitionProperty(FontDefinition font)(Code)
Sets the font for this style-sheet.
Parameters:
  font - the font (null not permitted).



setGlobalDefaultStyleSheet
public void setGlobalDefaultStyleSheet(ElementDefaultStyleSheet defaultStyleSheet)(Code)



setStyleProperty
public void setStyleProperty(StyleKey key, Object value)(Code)
Sets a style property (or removes the style if the value is null).
Parameters:
  key - the style key (null not permitted).
Parameters:
  value - the value.
throws:
  NullPointerException - if the given key is null.
throws:
  ClassCastException - if the value cannot be assigned with the given key.



styleChanged
public void styleChanged(ElementStyleSheet source, StyleKey key, Object value)(Code)
Forwards a change event notification to all registered StyleChangeListener objects.
Parameters:
  source - the source of the change.
Parameters:
  key - the style key.
Parameters:
  value - the new value.



styleRemoved
public void styleRemoved(ElementStyleSheet source, StyleKey key)(Code)
Forwards a change event notification to all registered StyleChangeListener objects.
Parameters:
  source - the source of the change.
Parameters:
  key - the style key.



toArray
final public Object[] toArray(StyleKey[] keys)(Code)



Methods inherited from org.jfree.report.style.AbstractStyleSheet
public boolean getBooleanStyleProperty(StyleKey key)(Code)(Java Doc)
public boolean getBooleanStyleProperty(StyleKey key, boolean defaultValue)(Code)(Java Doc)
public long getChangeTracker()(Code)(Java Doc)
public double getDoubleStyleProperty(StyleKey key, double def)(Code)(Java Doc)
public FontDefinition getFontDefinitionProperty()(Code)(Java Doc)
public InstanceID getId()(Code)(Java Doc)
public int getIntStyleProperty(StyleKey key, int def)(Code)(Java Doc)
public Object getStyleProperty(StyleKey key)(Code)(Java Doc)
public Object[] toArray(StyleKey[] keys)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.