Java Doc for Format.java in  » Report » datavision-1.1.0 » jimm » datavision » field » 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 » datavision 1.1.0 » jimm.datavision.field 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Observable
      jimm.datavision.field.Format

Format
public class Format extends Observable implements Writeable,Cloneable(Code)
A format describes how to display a field. It specifies font family name, size, attributes (bold, italic, underline, wrap), alignment, and print format.

If a field's value is null, then the getter returns the value of the report's default field's format (which will never be null.
author:
   Jim Menard, jimm@io.com



Field Summary
final public static  intALIGN_CENTER
     Used to specify center alignment.
final public static  intALIGN_LEFT
     Used to specify left alignment.
final public static  intALIGN_RIGHT
     Used to specify right alignment.
final protected static  ColorDEFAULT_COLOR
    
final protected static  StringDEFAULT_FONT_FAMILY_NAME
    
final protected static  intDEFAULT_SIZE
    
protected  Integeralign
    
protected  Booleanbold
    
protected  Colorcolor
    
protected  Fieldfield
    
protected  Fontfont
    
protected  StringfontFamilyName
    
protected  Stringformat
    
protected  Booleanitalic
    
protected  Doublesize
    
protected  Booleanunderline
    
protected  Booleanwrap
    

Constructor Summary
 Format()
     Constructor.

Method Summary
public static  intalignFromString(String s)
     Returns an ALIGN_* constant, given one of "left", "center", or "right".
public static  StringalignToString(int align)
     Given an ALIGN_* constant, return the string used to represent that value in a report XML file.
public  voidclearFontCache()
     Clears the font we may be holding on to.
public  Objectclone()
     Returns a clone of this format.
public static  FormatcreateDefaultFormat()
    
public static  FormatcreateEmptyFormat()
    
public  booleanequals(Object obj)
    
protected  voidfillClonedField(Format f)
    
public  intgetAlign()
     Returns the alignment.
public  ColorgetColor()
     Returns the color for this format.
public  FormatgetDefaultFormat()
     Returns this field's report's default field's format (*whew*).
public  FontgetFont()
     Based on our font family name, alignment flags, and size, return a font.
public  StringgetFontFamilyName()
     Returns the font family name for this format.
public  StringgetFormat()
     Returns the format string for this field.
public  doublegetSize()
     Returns the size for this format.
public  inthashCode()
    
public  booleanisBold()
     Returns the bold state.
public  booleanisItalic()
     Returns the italic state.
public  booleanisUnderline()
     Returns the underline state.
public  booleanisWrap()
     Returns the wrap state.
public  voidsetAlign(int newAlign)
     Sets the alignment.
public  voidsetBold(boolean newBold)
     Sets the bold state.
public  voidsetColor(Color newColor)
    
 voidsetField(Field f)
     Normally you don't need to call this, because Field.setFormat calls this.
public  voidsetFontFamilyName(String newFontFamilyName)
    
public  voidsetFormat(String newFormat)
     Sets the format string.
public  voidsetItalic(boolean newItalic)
     Sets the italic state.
public  voidsetSize(double newSize)
    
public  voidsetUnderline(boolean newUnderline)
     Sets the underline state.
public  voidsetWrap(boolean newWrap)
     Sets the wrap state.
public  StringtoString()
     Returns a string representation of this format.
public  voidwriteXML(XMLWriter out)
     Writes this format as an XML tag.

Field Detail
ALIGN_CENTER
final public static int ALIGN_CENTER(Code)
Used to specify center alignment.



ALIGN_LEFT
final public static int ALIGN_LEFT(Code)
Used to specify left alignment.



ALIGN_RIGHT
final public static int ALIGN_RIGHT(Code)
Used to specify right alignment.



DEFAULT_COLOR
final protected static Color DEFAULT_COLOR(Code)



DEFAULT_FONT_FAMILY_NAME
final protected static String DEFAULT_FONT_FAMILY_NAME(Code)



DEFAULT_SIZE
final protected static int DEFAULT_SIZE(Code)



align
protected Integer align(Code)



bold
protected Boolean bold(Code)



color
protected Color color(Code)



field
protected Field field(Code)



font
protected Font font(Code)



fontFamilyName
protected String fontFamilyName(Code)



format
protected String format(Code)



italic
protected Boolean italic(Code)



size
protected Double size(Code)



underline
protected Boolean underline(Code)



wrap
protected Boolean wrap(Code)




Constructor Detail
Format
Format()(Code)
Constructor. Creates an empty format.




Method Detail
alignFromString
public static int alignFromString(String s)(Code)
Returns an ALIGN_* constant, given one of "left", "center", or "right". If the specified string is null or is not one of these values, ALIGN_LEFT is returned.
Parameters:
  s - the string "left", "center", or "right" (case is notsignificant) one of ALIGN_LEFT, ALIGN_CENTER,or ALIGN_RIGHT



alignToString
public static String alignToString(int align)(Code)
Given an ALIGN_* constant, return the string used to represent that value in a report XML file. If align is not one of those values, returns "left".
Parameters:
  align - one of "left", "center", or "right"



clearFontCache
public void clearFontCache()(Code)
Clears the font we may be holding on to.



clone
public Object clone()(Code)
Returns a clone of this format.



createDefaultFormat
public static Format createDefaultFormat()(Code)



createEmptyFormat
public static Format createEmptyFormat()(Code)



equals
public boolean equals(Object obj)(Code)



fillClonedField
protected void fillClonedField(Format f)(Code)



getAlign
public int getAlign()(Code)
Returns the alignment. one of the ALIGN_* values



getColor
public Color getColor()(Code)
Returns the color for this format. the color



getDefaultFormat
public Format getDefaultFormat()(Code)
Returns this field's report's default field's format (*whew*).



getFont
public Font getFont()(Code)
Based on our font family name, alignment flags, and size, return a font. Never returns null. a font; never null



getFontFamilyName
public String getFontFamilyName()(Code)
Returns the font family name for this format. the font family name



getFormat
public String getFormat()(Code)
Returns the format string for this field. May return null. the format string, possibly null



getSize
public double getSize()(Code)
Returns the size for this format. the size



hashCode
public int hashCode()(Code)



isBold
public boolean isBold()(Code)
Returns the bold state. the bold state



isItalic
public boolean isItalic()(Code)
Returns the italic state. the italic state



isUnderline
public boolean isUnderline()(Code)
Returns the underline state. the underline state



isWrap
public boolean isWrap()(Code)
Returns the wrap state. the wrap state



setAlign
public void setAlign(int newAlign)(Code)
Sets the alignment.
Parameters:
  newAlign - one of the ALIGN_* values



setBold
public void setBold(boolean newBold)(Code)
Sets the bold state.
Parameters:
  newBold - the new value



setColor
public void setColor(Color newColor)(Code)
Sets the color
Parameters:
  newColor - the new color



setField
void setField(Field f)(Code)
Normally you don't need to call this, because Field.setFormat calls this.
Parameters:
  f - a field



setFontFamilyName
public void setFontFamilyName(String newFontFamilyName)(Code)
Sets the font family name
Parameters:
  newFontFamilyName - the new font family name



setFormat
public void setFormat(String newFormat)(Code)
Sets the format string.
Parameters:
  newFormat - the new format string



setItalic
public void setItalic(boolean newItalic)(Code)
Sets the italic state.
Parameters:
  newItalic - the new value



setSize
public void setSize(double newSize)(Code)
Sets the size
Parameters:
  newSize - the new size



setUnderline
public void setUnderline(boolean newUnderline)(Code)
Sets the underline state.
Parameters:
  newUnderline - the new underline state



setWrap
public void setWrap(boolean newWrap)(Code)
Sets the wrap state.
Parameters:
  newWrap - the new wrap state



toString
public String toString()(Code)
Returns a string representation of this format. Mainly used for debugging. pretty string, inn't it?



writeXML
public void writeXML(XMLWriter out)(Code)
Writes this format as an XML tag. Only writes the differences between this format and the default one.
Parameters:
  out - a writer that knows how to write XML



Methods inherited from java.util.Observable
public synchronized void addObserver(Observer o)(Code)(Java Doc)
protected synchronized void clearChanged()(Code)(Java Doc)
public synchronized int countObservers()(Code)(Java Doc)
public synchronized void deleteObserver(Observer o)(Code)(Java Doc)
public synchronized void deleteObservers()(Code)(Java Doc)
public synchronized boolean hasChanged()(Code)(Java Doc)
public void notifyObservers()(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
protected synchronized void setChanged()(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.