Java Doc for BaseField.java in  » PDF » pdf-itext » com » lowagie » text » pdf » 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 » PDF » pdf itext » com.lowagie.text.pdf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.lowagie.text.pdf.BaseField

All known Subclasses:   com.lowagie.text.pdf.RadioCheckField,  com.lowagie.text.pdf.TextField,  com.lowagie.text.pdf.PushbuttonField,
BaseField
abstract public class BaseField (Code)
Common field variables.
author:
   Paulo Soares (psoares@consiste.pt)


Field Summary
final public static  floatBORDER_WIDTH_MEDIUM
     A medium border with 2 point width.
final public static  floatBORDER_WIDTH_THICK
     A thick border with 3 point width.
final public static  floatBORDER_WIDTH_THIN
     A thin border with 1 point width.
final public static  intCOMB
     combo box flag.
final public static  intDO_NOT_SCROLL
     The field will not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than will fit within its annotation rectangle.
final public static  intDO_NOT_SPELL_CHECK
     The text entered in the field will not be spell-checked.
final public static  intEDIT
     If set the combo box includes an editable text box as well as a drop list; if clear, it includes only a drop list.
final public static  intFILE_SELECTION
     The text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.
final public static  intHIDDEN
     The field is hidden.
final public static  intHIDDEN_BUT_PRINTABLE
     The field is hidden but is printable.
final public static  intMULTILINE
     The field may contain multiple lines of text.
final public static  intPASSWORD
     The field is intended for entering a secure password that should not be echoed visibly to the screen.
final public static  intREAD_ONLY
     The user may not change the value of the field.
final public static  intREQUIRED
     The field must have a value at the time it is exported by a submit-form action.
final public static  intVISIBLE
     The field is visible.
final public static  intVISIBLE_BUT_DOES_NOT_PRINT
     The field is visible but does not print.
protected  intalignment
    
protected  ColorbackgroundColor
    
protected  ColorborderColor
    
protected  intborderStyle
    
protected  floatborderWidth
    
protected  Rectanglebox
    
protected  StringfieldName
     Holds value of property fieldName.
protected  BaseFontfont
    
protected  floatfontSize
    
protected  intmaxCharacterLength
     Holds value of property maxCharacterLength.
protected  intoptions
     Holds value of property options.
protected  introtation
     Holds value of property rotation.
protected  Stringtext
    
protected  ColortextColor
    
protected  intvisibility
     Holds value of property visibility.
protected  PdfWriterwriter
    

Constructor Summary
public  BaseField(PdfWriter writer, Rectangle box, String fieldName)
     Creates a new TextField.
Parameters:
  writer - the document PdfWriter
Parameters:
  box - the field location and dimensions
Parameters:
  fieldName - the field name.

Method Summary
protected static  ArrayListbreakLines(ArrayList breaks, BaseFont font, float fontSize, float width)
    
public  intgetAlignment()
     Gets the text horizontal alignment.
public  ColorgetBackgroundColor()
     Gets the background color.
protected  PdfAppearancegetBorderAppearance()
    
public  ColorgetBorderColor()
     Gets the border color.
public  intgetBorderStyle()
     Gets the border style.
public  floatgetBorderWidth()
     Gets the border width in points.
public  RectanglegetBox()
     Gets the field dimension and position.
public  StringgetFieldName()
     Gets the field name.
public  BaseFontgetFont()
     Gets the text font.
public  floatgetFontSize()
     Gets the font size.
protected static  ArrayListgetHardBreaks(String text)
    
public  intgetMaxCharacterLength()
     Gets the maximum length of the field's text, in characters.
public  intgetOptions()
     Gets the option flags.
protected  BaseFontgetRealFont()
    
public  intgetRotation()
     Gets the field rotation.
public  StringgetText()
     Gets the text.
public  ColorgetTextColor()
     Gets the text color.
public  intgetVisibility()
     Gets the field visibility flag.
public  PdfWritergetWriter()
     Getter for property writer.
public static  voidmoveFields(PdfDictionary from, PdfDictionary to)
     Moves the field keys from from to to.
public  voidsetAlignment(int alignment)
     Sets the text horizontal alignment.
public  voidsetBackgroundColor(Color backgroundColor)
     Sets the background color.
public  voidsetBorderColor(Color borderColor)
     Sets the border color.
public  voidsetBorderStyle(int borderStyle)
     Sets the border style.
public  voidsetBorderWidth(float borderWidth)
     Sets the border width in points.
public  voidsetBox(Rectangle box)
     Sets the field dimension and position.
public  voidsetFieldName(String fieldName)
     Sets the field name.
Parameters:
  fieldName - the field name.
public  voidsetFont(BaseFont font)
     Sets the text font.
public  voidsetFontSize(float fontSize)
     Sets the font size.
public  voidsetMaxCharacterLength(int maxCharacterLength)
     Sets the maximum length of the field's text, in characters.
public  voidsetOptions(int options)
     Sets the option flags.
public  voidsetRotation(int rotation)
     Sets the field rotation.
public  voidsetRotationFromPage(Rectangle page)
     Convenience method to set the field rotation the same as the page rotation.
public  voidsetText(String text)
     Sets the text for text fields.
public  voidsetTextColor(Color textColor)
     Sets the text color.
public  voidsetVisibility(int visibility)
     Sets the field visibility flag.
public  voidsetWriter(PdfWriter writer)
     Setter for property writer.
protected static  voidtrimRight(StringBuffer buf)
    

Field Detail
BORDER_WIDTH_MEDIUM
final public static float BORDER_WIDTH_MEDIUM(Code)
A medium border with 2 point width.



BORDER_WIDTH_THICK
final public static float BORDER_WIDTH_THICK(Code)
A thick border with 3 point width.



BORDER_WIDTH_THIN
final public static float BORDER_WIDTH_THIN(Code)
A thin border with 1 point width.



COMB
final public static int COMB(Code)
combo box flag.



DO_NOT_SCROLL
final public static int DO_NOT_SCROLL(Code)
The field will not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than will fit within its annotation rectangle. Once the field is full, no further text will be accepted.



DO_NOT_SPELL_CHECK
final public static int DO_NOT_SPELL_CHECK(Code)
The text entered in the field will not be spell-checked. This flag is meaningful only in text fields and in combo fields with the EDIT flag set.



EDIT
final public static int EDIT(Code)
If set the combo box includes an editable text box as well as a drop list; if clear, it includes only a drop list. This flag is only meaningful with combo fields.



FILE_SELECTION
final public static int FILE_SELECTION(Code)
The text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.



HIDDEN
final public static int HIDDEN(Code)
The field is hidden.



HIDDEN_BUT_PRINTABLE
final public static int HIDDEN_BUT_PRINTABLE(Code)
The field is hidden but is printable.



MULTILINE
final public static int MULTILINE(Code)
The field may contain multiple lines of text. This flag is only meaningful with text fields.



PASSWORD
final public static int PASSWORD(Code)
The field is intended for entering a secure password that should not be echoed visibly to the screen.



READ_ONLY
final public static int READ_ONLY(Code)
The user may not change the value of the field.



REQUIRED
final public static int REQUIRED(Code)
The field must have a value at the time it is exported by a submit-form action.



VISIBLE
final public static int VISIBLE(Code)
The field is visible.



VISIBLE_BUT_DOES_NOT_PRINT
final public static int VISIBLE_BUT_DOES_NOT_PRINT(Code)
The field is visible but does not print.



alignment
protected int alignment(Code)



backgroundColor
protected Color backgroundColor(Code)



borderColor
protected Color borderColor(Code)



borderStyle
protected int borderStyle(Code)



borderWidth
protected float borderWidth(Code)



box
protected Rectangle box(Code)



fieldName
protected String fieldName(Code)
Holds value of property fieldName.



font
protected BaseFont font(Code)



fontSize
protected float fontSize(Code)



maxCharacterLength
protected int maxCharacterLength(Code)
Holds value of property maxCharacterLength.



options
protected int options(Code)
Holds value of property options.



rotation
protected int rotation(Code)
Holds value of property rotation.



text
protected String text(Code)



textColor
protected Color textColor(Code)



visibility
protected int visibility(Code)
Holds value of property visibility.



writer
protected PdfWriter writer(Code)




Constructor Detail
BaseField
public BaseField(PdfWriter writer, Rectangle box, String fieldName)(Code)
Creates a new TextField.
Parameters:
  writer - the document PdfWriter
Parameters:
  box - the field location and dimensions
Parameters:
  fieldName - the field name. If null only the widget keyswill be included in the field allowing it to be used as a kid field.




Method Detail
breakLines
protected static ArrayList breakLines(ArrayList breaks, BaseFont font, float fontSize, float width)(Code)



getAlignment
public int getAlignment()(Code)
Gets the text horizontal alignment. the text horizontal alignment



getBackgroundColor
public Color getBackgroundColor()(Code)
Gets the background color. the background color



getBorderAppearance
protected PdfAppearance getBorderAppearance()(Code)



getBorderColor
public Color getBorderColor()(Code)
Gets the border color. the border color



getBorderStyle
public int getBorderStyle()(Code)
Gets the border style. the border style



getBorderWidth
public float getBorderWidth()(Code)
Gets the border width in points. the border width in points



getBox
public Rectangle getBox()(Code)
Gets the field dimension and position. the field dimension and position



getFieldName
public String getFieldName()(Code)
Gets the field name. the field name



getFont
public BaseFont getFont()(Code)
Gets the text font. the text font



getFontSize
public float getFontSize()(Code)
Gets the font size. the font size



getHardBreaks
protected static ArrayList getHardBreaks(String text)(Code)



getMaxCharacterLength
public int getMaxCharacterLength()(Code)
Gets the maximum length of the field's text, in characters. the maximum length of the field's text, in characters.



getOptions
public int getOptions()(Code)
Gets the option flags. the option flags



getRealFont
protected BaseFont getRealFont() throws IOException, DocumentException(Code)



getRotation
public int getRotation()(Code)
Gets the field rotation. the field rotation



getText
public String getText()(Code)
Gets the text. the text



getTextColor
public Color getTextColor()(Code)
Gets the text color. the text color



getVisibility
public int getVisibility()(Code)
Gets the field visibility flag. the field visibility flag



getWriter
public PdfWriter getWriter()(Code)
Getter for property writer. Value of property writer.



moveFields
public static void moveFields(PdfDictionary from, PdfDictionary to)(Code)
Moves the field keys from from to to. The moved keys are removed from from.
Parameters:
  from - the source
Parameters:
  to - the destination. It may be null



setAlignment
public void setAlignment(int alignment)(Code)
Sets the text horizontal alignment. It can be Element.ALIGN_LEFT, Element.ALIGN_CENTER and Element.ALIGN_RIGHT.
Parameters:
  alignment - the text horizontal alignment



setBackgroundColor
public void setBackgroundColor(Color backgroundColor)(Code)
Sets the background color. Set to null for transparent background.
Parameters:
  backgroundColor - the background color



setBorderColor
public void setBorderColor(Color borderColor)(Code)
Sets the border color. Set to null to remove the border.
Parameters:
  borderColor - the border color



setBorderStyle
public void setBorderStyle(int borderStyle)(Code)
Sets the border style. The styles are found in PdfBorderDictionary and can be STYLE_SOLID, STYLE_DASHED, STYLE_BEVELED, STYLE_INSET and STYLE_UNDERLINE.
Parameters:
  borderStyle - the border style



setBorderWidth
public void setBorderWidth(float borderWidth)(Code)
Sets the border width in points. To eliminate the border set the border color to null.
Parameters:
  borderWidth - the border width in points



setBox
public void setBox(Rectangle box)(Code)
Sets the field dimension and position.
Parameters:
  box - the field dimension and position



setFieldName
public void setFieldName(String fieldName)(Code)
Sets the field name.
Parameters:
  fieldName - the field name. If null only the widget keyswill be included in the field allowing it to be used as a kid field.



setFont
public void setFont(BaseFont font)(Code)
Sets the text font. If null then Helvetica will be used.
Parameters:
  font - the text font



setFontSize
public void setFontSize(float fontSize)(Code)
Sets the font size. If 0 then auto-sizing will be used but only for text fields.
Parameters:
  fontSize - the font size



setMaxCharacterLength
public void setMaxCharacterLength(int maxCharacterLength)(Code)
Sets the maximum length of the field's text, in characters. It is only meaningful for text fields.
Parameters:
  maxCharacterLength - the maximum length of the field's text, in characters



setOptions
public void setOptions(int options)(Code)
Sets the option flags. The option flags can be a combination by oring of READ_ONLY, REQUIRED, MULTILINE, DO_NOT_SCROLL, PASSWORD, FILE_SELECTION, DO_NOT_SPELL_CHECK and EDIT.
Parameters:
  options - the option flags



setRotation
public void setRotation(int rotation)(Code)
Sets the field rotation. This value should be the same as the page rotation where the field will be shown.
Parameters:
  rotation - the field rotation



setRotationFromPage
public void setRotationFromPage(Rectangle page)(Code)
Convenience method to set the field rotation the same as the page rotation.
Parameters:
  page - the page



setText
public void setText(String text)(Code)
Sets the text for text fields.
Parameters:
  text - the text



setTextColor
public void setTextColor(Color textColor)(Code)
Sets the text color. If null the color used will be black.
Parameters:
  textColor - the text color



setVisibility
public void setVisibility(int visibility)(Code)
Sets the field visibility flag. This flags can be one of VISIBLE, HIDDEN, VISIBLE_BUT_DOES_NOT_PRINT and HIDDEN_BUT_PRINTABLE.
Parameters:
  visibility - field visibility flag



setWriter
public void setWriter(PdfWriter writer)(Code)
Setter for property writer.
Parameters:
  writer - New value of property writer.



trimRight
protected static void trimRight(StringBuffer buf)(Code)



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.