Java Doc for Field.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.Element
         jimm.datavision.field.Field

All known Subclasses:   jimm.datavision.field.UserColumnField,  jimm.datavision.field.ImageField,  jimm.datavision.field.SubreportField,  jimm.datavision.field.SpecialField,  jimm.datavision.field.ColumnField,  jimm.datavision.field.FormulaField,  jimm.datavision.field.TextField,  jimm.datavision.field.ParameterField,
Field
abstract public class Field extends Element implements Identity,Draggable,Cloneable(Code)
The abstract superclass of visual report fields that display text labels, database columns, special values, aggregate values, formulas, and parameters. A field has a bounds Rectangle that determines its position within a section and an associated Format and Border for determining how to display the field.

To avoid repeated font size and line width calculations, a FormattedValueCache holds the formatted version of this field's value.
author:
   Jim Menard, jimm@io.com



Field Summary
final public static  doubleDEFAULT_HEIGHT
    
final public static  doubleDEFAULT_WIDTH
    
protected  Borderborder
    
protected  Rectanglebounds
    
protected  FormattedValueCachecache
    
protected  Formatformat
    
protected  Longid
    
static  LongmaxIdSeen
    
protected  Objectvalue
    

Constructor Summary
protected  Field(Long id, Report report, Section section, Object value, boolean visible)
     Constructor.

Method Summary
public  booleancanBeAggregated()
     Returns true if this field can be aggregated.
public  Objectclone()
     Returns a clone.
public static  Fieldcreate(Long id, Report report, Section section, String type, Object value, boolean visible)
     This factory method constructs and returns a new instance of a subclass of Field based on the type string.

If id is null, generates a new id number.

public static  FieldcreateFromDragString(Report report, String str)
     Creates a field from a drag string.
public  StringdesignLabel()
     Returns a string representing the field in the GUI during report design.
abstract public  StringdragString()
     Returns the string used to identify a field type when dragging.
protected  voidfinalize()
    
abstract public  StringformulaString()
     Returns a string representing the field as it appears in a formula.
public  BordergetBorder()
     Returns the border for this field.
public  BordergetBorderOrDefault()
     Returns the border for this field or, if it is null, the report's default border.
public  RectanglegetBounds()
     Returns the bounds rectangle for this field.
public  FormatgetFormat()
     Returns the format for this field.
public  ObjectgetId()
    
public  doublegetOutputHeight()
     Returns the height needed to output the current value of this field.
public  ObjectgetValue()
     Returns the value for this field.
public  FieldWidgetmakeWidget(SectionWidget sw)
     Returns a new widget of the appropriate FieldWidget subclass for this field.
public  booleanrefersTo(Field f)
     Returns true if this field contains a reference to the specified field.
public  booleanrefersTo(Formula f)
     Returns true if this field contains a reference to the specified formula.
public  booleanrefersTo(UserColumn uc)
     Returns true if this field contains a reference to the specified user column.
public  booleanrefersTo(Parameter p)
     Returns true if this field contains a reference to the specified parameter.
public  voidsetBorder(Border newBorder)
     Sets the border.
public  voidsetBounds(Rectangle newBounds)
     Sets the bounds rectangle.
public  voidsetFormat(Format newFormat)
     Sets the format.
public  voidsetValue(Object newValue)
     Sets the value.
public  StringtoString()
     Returns this fields formatted value, ready for display in the report.
abstract public  StringtypeString()
     Returns the string that specifies this field's type in the report XML.
public  voidupdate(Observable o, Object arg)
    
protected  voidwriteFieldGuts(XMLWriter out)
     Writes objects contained within this field (bounds, border, and format).
public  voidwriteXML(XMLWriter out)
     Writes this field as an XML tag.

Field Detail
DEFAULT_HEIGHT
final public static double DEFAULT_HEIGHT(Code)



DEFAULT_WIDTH
final public static double DEFAULT_WIDTH(Code)



border
protected Border border(Code)



bounds
protected Rectangle bounds(Code)



cache
protected FormattedValueCache cache(Code)



format
protected Format format(Code)



id
protected Long id(Code)



maxIdSeen
static Long maxIdSeen(Code)



value
protected Object value(Code)




Constructor Detail
Field
protected Field(Long id, Report report, Section section, Object value, boolean visible)(Code)
Constructor.
Parameters:
  id - the unique identifier for the new field
Parameters:
  report - the report containing this element
Parameters:
  section - the report section containing the field
Parameters:
  value - the value this field represents visually
Parameters:
  visible - show/hide flag




Method Detail
canBeAggregated
public boolean canBeAggregated()(Code)
Returns true if this field can be aggregated. This method returns false by default but is overridded by classes whose values may be aggregated. true if this field can be aggregated



clone
public Object clone()(Code)
Returns a clone. Subclasses may need ot override this method to copy additional instance variables that are not set in their constructors. an almost-ready clone of this object



create
public static Field create(Long id, Report report, Section section, String type, Object value, boolean visible)(Code)
This factory method constructs and returns a new instance of a subclass of Field based on the type string.

If id is null, generates a new id number. This number is one higher than any previously-seen id number. This does not guarantee that no later field will be created manually with the same id number.
Parameters:
  id - the unique identifier for the new field; if null,generate a new id
Parameters:
  section - the report section containing the field
Parameters:
  type - one of "special", "text", "column", "formula", "parameter","image", or one of the aggregate function names; found in report XML




createFromDragString
public static Field createFromDragString(Report report, String str)(Code)
Creates a field from a drag string. str should a string created by some field's Field.dragString method.
Parameters:
  report - the report containing this element
Parameters:
  str - a drag string a new field



designLabel
public String designLabel()(Code)
Returns a string representing the field in the GUI during report design. a string useful for display in the design GUI



dragString
abstract public String dragString()(Code)
Returns the string used to identify a field type when dragging. Usually returns Field.typeString plus a value or an id. the string used to identify the field when dragging



finalize
protected void finalize() throws Throwable(Code)



formulaString
abstract public String formulaString()(Code)
Returns a string representing the field as it appears in a formula. a string useful in a formula



getBorder
public Border getBorder()(Code)
Returns the border for this field. May return null. the border, possibly null



getBorderOrDefault
public Border getBorderOrDefault()(Code)
Returns the border for this field or, if it is null, the report's default border. If we return the default border, we clone it in order to give it this field. this field's border or the default border



getBounds
public Rectangle getBounds()(Code)
Returns the bounds rectangle for this field. the bounds rectangle



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



getId
public Object getId()(Code)



getOutputHeight
public double getOutputHeight()(Code)
Returns the height needed to output the current value of this field. This default implementation returns the height of the field as defined in the report designer (the bounds height).



getValue
public Object getValue()(Code)
Returns the value for this field. May return null. the value, possibly null



makeWidget
public FieldWidget makeWidget(SectionWidget sw)(Code)
Returns a new widget of the appropriate FieldWidget subclass for this field. Subclasses override this method to return different types of widgets.
Parameters:
  sw - a field widget



refersTo
public boolean refersTo(Field f)(Code)
Returns true if this field contains a reference to the specified field. Most fields return false; only a AggregateField or FormulaField would return true.
Parameters:
  f - a field true if this field contains a reference to thespecified field



refersTo
public boolean refersTo(Formula f)(Code)
Returns true if this field contains a reference to the specified formula. Most fields return false; only a AggregateField or FormulaField would return true.
Parameters:
  f - a formula true if this field contains a reference to thespecified field



refersTo
public boolean refersTo(UserColumn uc)(Code)
Returns true if this field contains a reference to the specified user column. Most fields return false; only a AggregateField , UserColumnField , or FormulaField would return true.
Parameters:
  uc - a user column true if this field contains a reference to thespecified user column



refersTo
public boolean refersTo(Parameter p)(Code)
Returns true if this field contains a reference to the specified parameter. Most fields return false; only a AggregateField or FormulaField would return true.
Parameters:
  p - a parameter true if this field contains a reference to thespecified field



setBorder
public void setBorder(Border newBorder)(Code)
Sets the border.
Parameters:
  newBorder - the new border



setBounds
public void setBounds(Rectangle newBounds)(Code)
Sets the bounds rectangle.
Parameters:
  newBounds - the new bounds rectangle



setFormat
public void setFormat(Format newFormat)(Code)
Sets the format. If this field already has a format, you can just modify it instead of giving it a completely new one.
Parameters:
  newFormat - the format



setValue
public void setValue(Object newValue)(Code)
Sets the value.
Parameters:
  newValue - the new value



toString
public String toString()(Code)
Returns this fields formatted value, ready for display in the report. If this field is invisible, or getValue returns null then this method will return null. the report display string; may be null



typeString
abstract public String typeString()(Code)
Returns the string that specifies this field's type in the report XML. a string representing this field's type; used in XML files



update
public void update(Observable o, Object arg)(Code)



writeFieldGuts
protected void writeFieldGuts(XMLWriter out)(Code)
Writes objects contained within this field (bounds, border, and format).
Parameters:
  out - a writer that knows how to write XML



writeXML
public void writeXML(XMLWriter out)(Code)
Writes this field as an XML tag. Writes bounds, border, and format.
Parameters:
  out - a writer that knows how to write XML



Fields inherited from jimm.datavision.Element
protected Report report(Code)(Java Doc)
protected Section section(Code)(Java Doc)
protected boolean visible(Code)(Java Doc)

Methods inherited from jimm.datavision.Element
public Report getReport()(Code)(Java Doc)
public Section getSection()(Code)(Java Doc)
public boolean isVisible()(Code)(Java Doc)
public void setSection(Section s)(Code)(Java Doc)
public void setVisible(boolean newVisible)(Code)(Java Doc)
public void update(Observable o, Object arg)(Code)(Java Doc)
abstract public void writeXML(XMLWriter out)(Code)(Java Doc)

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.