Java Doc for HSSFDataValidation.java in  » Collaboration » poi-3.0.2-beta2 » org » apache » poi » hssf » util » 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 » Collaboration » poi 3.0.2 beta2 » org.apache.poi.hssf.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.poi.hssf.util.HSSFDataValidation

HSSFDataValidation
public class HSSFDataValidation (Code)

Title: HSSFDataValidation

Description: Utilty class for creating data validation cells

Copyright: Copyright (c) 2004

Company:


author:
   Dragos Buleandra (dragos.buleandra@trade2b.ro)
version:
   2.0-pre


Field Summary
final public static  intDATA_TYPE_ANY
    
final public static  intDATA_TYPE_DATE
    
final public static  intDATA_TYPE_DECIMAL
    
final public static  intDATA_TYPE_FORMULA
    
final public static  intDATA_TYPE_INTEGER
    
final public static  intDATA_TYPE_LIST
    
final public static  intDATA_TYPE_TEXT_LENGTH
    
final public static  intDATA_TYPE_TIME
    
final public static  intERROR_STYLE_INFO
    
final public static  intERROR_STYLE_STOP
    
final public static  intERROR_STYLE_WARNING
    
final public static  intOPERATOR_BETWEEN
    
final public static  intOPERATOR_EQUAL
    
final public static  intOPERATOR_GREATER_OR_EQUAL
    
final public static  intOPERATOR_GREATER_THAN
    
final public static  intOPERATOR_LESS_OR_EQUAL
    
final public static  intOPERATOR_LESS_THAN
    
final public static  intOPERATOR_NOT_BETWEEN
    
final public static  intOPERATOR_NOT_EQUAL
    

Constructor Summary
public  HSSFDataValidation()
    
public  HSSFDataValidation(short first_row, short first_col, short last_row, short last_col)
    

Method Summary
public  voidcreateErrorBox(String title, String text)
     Sets the title and text for the error box .
public  voidcreatePromptBox(String title, String text)
     Sets the title and text for the prompt box .
public  intgetDataValidationType()
    
public  booleangetEmptyCellAllowed()
    
public  StringgetErrorBoxText()
    
public  StringgetErrorBoxTitle()
    
public  intgetErrorStyle()
    
public  booleangetExplicitListFormula()
     Returns the settings for explicit formula .
public  shortgetFirstColumn()
    
public  StringgetFirstFormula()
    
public  shortgetFirstRow()
    
public  shortgetLastColumn()
    
public  shortgetLastRow()
    
public  intgetOperator()
    
public  StringgetPromptBoxText()
    
public  StringgetPromptBoxTitle()
    
public  StringgetSecondFormula()
    
public  booleangetShowErrorBox()
    
public  booleangetShowPromptBox()
    
public  booleangetSurppressDropDownArrow()
     Useful only list validation objects .
public  voidsetDataValidationType(int data_type)
    
public  voidsetEmptyCellAllowed(boolean allowed)
    
public  voidsetErrorStyle(int error_style)
    
public  voidsetExplicitListFormula(boolean explicit)
     If this object has an explicit formula .
public  voidsetFirstColumn(short first_column)
    
public  voidsetFirstFormula(String formula)
     Sets the first formula for this object . A formula is divided into three parts : first formula , operator and second formula . In other words , a formula contains a left oprand , an operator and a right operand. This is the general rule .
public  voidsetFirstRow(short first_row)
    
public  voidsetLastColumn(short last_column)
    
public  voidsetLastRow(short last_row)
    
public  voidsetOperator(int operator)
    
public  voidsetSecondFormula(String formula)
     Sets the first formula for this object . A formula is divided into three parts : first formula , operator and second formula . In other words , a formula contains a left oprand , an operator and a right operand. This is the general rule .
public  voidsetShowErrorBox(boolean show)
    
public  voidsetShowPromptBox(boolean show)
    
public  voidsetSurppressDropDownArrow(boolean surppres)
     Useful for list validation objects .

Field Detail
DATA_TYPE_ANY
final public static int DATA_TYPE_ANY(Code)
Any type



DATA_TYPE_DATE
final public static int DATA_TYPE_DATE(Code)
Date type



DATA_TYPE_DECIMAL
final public static int DATA_TYPE_DECIMAL(Code)
Decimal type



DATA_TYPE_FORMULA
final public static int DATA_TYPE_FORMULA(Code)
Formula ( custom ) type



DATA_TYPE_INTEGER
final public static int DATA_TYPE_INTEGER(Code)
Integer type



DATA_TYPE_LIST
final public static int DATA_TYPE_LIST(Code)
List type ( combo box type )



DATA_TYPE_TEXT_LENGTH
final public static int DATA_TYPE_TEXT_LENGTH(Code)
String length type



DATA_TYPE_TIME
final public static int DATA_TYPE_TIME(Code)
Time type



ERROR_STYLE_INFO
final public static int ERROR_STYLE_INFO(Code)
INFO style like



ERROR_STYLE_STOP
final public static int ERROR_STYLE_STOP(Code)
STOP style like



ERROR_STYLE_WARNING
final public static int ERROR_STYLE_WARNING(Code)
WARNING style like



OPERATOR_BETWEEN
final public static int OPERATOR_BETWEEN(Code)
Condition operator



OPERATOR_EQUAL
final public static int OPERATOR_EQUAL(Code)



OPERATOR_GREATER_OR_EQUAL
final public static int OPERATOR_GREATER_OR_EQUAL(Code)



OPERATOR_GREATER_THAN
final public static int OPERATOR_GREATER_THAN(Code)



OPERATOR_LESS_OR_EQUAL
final public static int OPERATOR_LESS_OR_EQUAL(Code)



OPERATOR_LESS_THAN
final public static int OPERATOR_LESS_THAN(Code)



OPERATOR_NOT_BETWEEN
final public static int OPERATOR_NOT_BETWEEN(Code)



OPERATOR_NOT_EQUAL
final public static int OPERATOR_NOT_EQUAL(Code)




Constructor Detail
HSSFDataValidation
public HSSFDataValidation()(Code)
Empty constructor



HSSFDataValidation
public HSSFDataValidation(short first_row, short first_col, short last_row, short last_col)(Code)
Constructor wich initializes the cell range on wich this object will be applied
Parameters:
  first_row - First row
Parameters:
  first_col - First column
Parameters:
  last_row - Last row
Parameters:
  last_col - Last column




Method Detail
createErrorBox
public void createErrorBox(String title, String text)(Code)
Sets the title and text for the error box . Error box is displayed when the user enters an invalid value int o a cell which belongs to this validation object . In order for an error box to be displayed you should also use method setShowErrorBox( boolean show )
Parameters:
  title - The error box's title
Parameters:
  text - The error box's text
See Also:    setShowErrorBox( boolean show )



createPromptBox
public void createPromptBox(String title, String text)(Code)
Sets the title and text for the prompt box . Prompt box is displayed when the user selects a cell which belongs to this validation object . In order for a prompt box to be displayed you should also use method setShowPromptBox( boolean show )
Parameters:
  title - The prompt box's title
Parameters:
  text - The prompt box's text
See Also:    setShowPromptBox( boolean show )



getDataValidationType
public int getDataValidationType()(Code)
The data type of this object The type
See Also:    DATA_TYPE_ANY, DATA_TYPE_INTEGER, DATA_TYPE_DECIMNAL, DATA_TYPE_LIST, DATA_TYPE_DATE,
See Also:   DATA_TYPE_TIME, DATA_TYPE_TEXT_LENTGH, DATA_TYPE_FORMULA



getEmptyCellAllowed
public boolean getEmptyCellAllowed()(Code)
Retrieve the settings for empty cells allowed True if this object should treats empty as valid value , false otherwise



getErrorBoxText
public String getErrorBoxText()(Code)
Returns the error box's text Error box's text or null



getErrorBoxTitle
public String getErrorBoxTitle()(Code)
Returns the error box's title Error box's title or null



getErrorStyle
public int getErrorStyle()(Code)
returns the error style of errror box the style constant
See Also:    ERROR_STYLE_STOP, ERROR_STYLE_WARNING, ERROR_STYLE_INFO



getExplicitListFormula
public boolean getExplicitListFormula()(Code)
Returns the settings for explicit formula . This is useful only for list data validation objects. This method always returns false if the object isn't a list validation object
See Also:    setDataValidationType( int data_type )



getFirstColumn
public short getFirstColumn()(Code)



getFirstFormula
public String getFirstFormula()(Code)
Returns the first formula



getFirstRow
public short getFirstRow()(Code)



getLastColumn
public short getLastColumn()(Code)



getLastRow
public short getLastRow()(Code)



getOperator
public int getOperator()(Code)
Retrieves the operator used for this object's formula
See Also:    OPERATOR_BETWEEN, OPERATOR_NOT_BETWEEN, OPERATOR_EQUAL, OPERATOR_NOT_EQUAL
See Also:   OPERATOR_GREATER_THAN, OPERATOR_LESS_THAN, OPERATOR_GREATER_OR_EQUAL,
See Also:   OPERATOR_LESS_OR_EQUAL



getPromptBoxText
public String getPromptBoxText()(Code)
Returns the prompt box's text Prompt box's text or null



getPromptBoxTitle
public String getPromptBoxTitle()(Code)
Returns the prompt box's title Prompt box's title or null



getSecondFormula
public String getSecondFormula()(Code)
Returns the second formula



getShowErrorBox
public boolean getShowErrorBox()(Code)
True if an error box should be displayed , false otherwise



getShowPromptBox
public boolean getShowPromptBox()(Code)

Parameters:
  show - True if an prompt box should be displayed , false otherwise



getSurppressDropDownArrow
public boolean getSurppressDropDownArrow()(Code)
Useful only list validation objects . This method always returns false if the object isn't a list validation object True if a list should display the values into a drop down list , false otherwise .
See Also:    setDataValidationType( int data_type )



setDataValidationType
public void setDataValidationType(int data_type)(Code)
Set the type of this object
Parameters:
  data_type - The type
See Also:    DATA_TYPE_ANY, DATA_TYPE_INTEGER, DATA_TYPE_DECIMNAL, DATA_TYPE_LIST, DATA_TYPE_DATE,
See Also:   DATA_TYPE_TIME, DATA_TYPE_TEXT_LENTGH, DATA_TYPE_FORMULA



setEmptyCellAllowed
public void setEmptyCellAllowed(boolean allowed)(Code)
Sets if this object allows empty as a valid value
Parameters:
  allowed - True if this object should treats empty as valid value , false otherwise



setErrorStyle
public void setErrorStyle(int error_style)(Code)
Sets the error style for error box
Parameters:
  error_style - Error style constant
See Also:    ERROR_STYLE_STOP, ERROR_STYLE_WARNING, ERROR_STYLE_INFO



setExplicitListFormula
public void setExplicitListFormula(boolean explicit)(Code)
If this object has an explicit formula . This is useful only for list data validation object
Parameters:
  explicit - True if use an explicit formula



setFirstColumn
public void setFirstColumn(short first_column)(Code)



setFirstFormula
public void setFirstFormula(String formula)(Code)
Sets the first formula for this object . A formula is divided into three parts : first formula , operator and second formula . In other words , a formula contains a left oprand , an operator and a right operand. This is the general rule . An example is 1<= value <= 5 . In this case , the left operand ( or the first formula ) is the number 1 . The operator is OPERATOR_BETWEEN and the right operand ( or the second formula ) is 5 .
Parameters:
  formula -



setFirstRow
public void setFirstRow(short first_row)(Code)



setLastColumn
public void setLastColumn(short last_column)(Code)



setLastRow
public void setLastRow(short last_row)(Code)



setOperator
public void setOperator(int operator)(Code)
Sets the operator involved in the formula whic governs this object Example : if you wants that a cell to accept only values between 1 and 5 , which mathematically means 1 <= value <= 5 , then the operator should be OPERATOR_BETWEEN
Parameters:
  operator - A constant for operator
See Also:    OPERATOR_BETWEEN, OPERATOR_NOT_BETWEEN, OPERATOR_EQUAL, OPERATOR_NOT_EQUAL
See Also:   OPERATOR_GREATER_THAN, OPERATOR_LESS_THAN, OPERATOR_GREATER_OR_EQUAL,
See Also:   OPERATOR_LESS_OR_EQUAL



setSecondFormula
public void setSecondFormula(String formula)(Code)
Sets the first formula for this object . A formula is divided into three parts : first formula , operator and second formula . In other words , a formula contains a left oprand , an operator and a right operand. This is the general rule . An example is 1<= value <=5 . In this case , the left operand ( or the first formula ) is the number 1 . The operator is OPERATOR_BETWEEN and the right operand ( or the second formula ) is 5 . But there are cases when a second formula isn't needed : You want somethink like : all values less than 5 . In this case , there's only a first formula ( in our case 5 ) and the operator OPERATOR_LESS_THAN
Parameters:
  formula -



setShowErrorBox
public void setShowErrorBox(boolean show)(Code)
Sets the behaviour when an invalid value is entered
Parameters:
  show - True if an error box should be displayed , false otherwise



setShowPromptBox
public void setShowPromptBox(boolean show)(Code)
Sets the behaviour when a cell which belongs to this object is selected
Parameters:
  show - True if an prompt box should be displayed , false otherwise



setSurppressDropDownArrow
public void setSurppressDropDownArrow(boolean surppres)(Code)
Useful for list validation objects .
Parameters:
  surppres - True if a list should display the values into a drop down list , false otherwise .In other words , if a list should display the arrow sign on its right side



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.