Java Doc for CSSPrimitiveValue.java in  » Web-Server » Rimfaxe-Web-Server » org » w3c » dom » css » 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 » Web Server » Rimfaxe Web Server » org.w3c.dom.css 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.w3c.dom.css.CSSPrimitiveValue

CSSPrimitiveValue
public interface CSSPrimitiveValue extends CSSValue(Code)
The CSSPrimitiveValue interface represents a single CSS value . This interface may be used to determine the value of a specific style property currently set in a block or to set a specific style property explicitly within the block. An instance of this interface might be obtained from the getPropertyCSSValue method of the CSSStyleDeclaration interface. A CSSPrimitiveValue object only occurs in a context of a CSS property.

Conversions are allowed between absolute values (from millimeters to centimeters, from degrees to radians, and so on) but not between relative values. (For example, a pixel value cannot be converted to a centimeter value.) Percentage values can't be converted since they are relative to the parent value (or another property value). There is one exception for color percentage values: since a color percentage value is relative to the range 0-255, a color percentage value can be converted to a number; (see also the RGBColor interface).

See also the Document Object Model (DOM) Level 2 Style Specification.
since:
   DOM Level 2



Field Summary
final public static  shortCSS_ATTR
     The value is a attribute function.
final public static  shortCSS_CM
     The value is a length (cm).
final public static  shortCSS_COUNTER
     The value is a counter or counters function.
final public static  shortCSS_DEG
     The value is an angle (deg).
final public static  shortCSS_DIMENSION
     The value is a number with an unknown dimension.
final public static  shortCSS_EMS
     The value is a length (ems).
final public static  shortCSS_EXS
     The value is a length (exs).
final public static  shortCSS_GRAD
     The value is an angle (grad).
final public static  shortCSS_HZ
     The value is a frequency (Hz).
final public static  shortCSS_IDENT
     The value is an identifier.
final public static  shortCSS_IN
     The value is a length (in).
final public static  shortCSS_KHZ
     The value is a frequency (kHz).
final public static  shortCSS_MM
     The value is a length (mm).
final public static  shortCSS_MS
     The value is a time (ms).
final public static  shortCSS_NUMBER
     The value is a simple number.
final public static  shortCSS_PC
     The value is a length (pc).
final public static  shortCSS_PERCENTAGE
     The value is a percentage.
final public static  shortCSS_PT
     The value is a length (pt).
final public static  shortCSS_PX
     The value is a length (px).
final public static  shortCSS_RAD
     The value is an angle (rad).
final public static  shortCSS_RECT
     The value is a rect function.
final public static  shortCSS_RGBCOLOR
     The value is a RGB color.
final public static  shortCSS_S
     The value is a time (s).
final public static  shortCSS_STRING
     The value is a STRING.
final public static  shortCSS_UNKNOWN
     The value is not a recognized CSS2 value.
final public static  shortCSS_URI
     The value is a URI.


Method Summary
public  CountergetCounterValue()
     This method is used to get the Counter value.
public  floatgetFloatValue(short unitType)
     This method is used to get a float value in a specified unit.
public  shortgetPrimitiveType()
     The type of the value as defined by the constants specified above.
public  RGBColorgetRGBColorValue()
     This method is used to get the RGB color.
public  RectgetRectValue()
     This method is used to get the Rect value.
public  StringgetStringValue()
     This method is used to get the string value.
public  voidsetFloatValue(short unitType, float floatValue)
     A method to set the float value with a specified unit.
public  voidsetStringValue(short stringType, String stringValue)
     A method to set the string value with the specified unit.

Field Detail
CSS_ATTR
final public static short CSS_ATTR(Code)
The value is a attribute function. The value can be obtained by using the getStringValue method.



CSS_CM
final public static short CSS_CM(Code)
The value is a length (cm). The value can be obtained by using the getFloatValue method.



CSS_COUNTER
final public static short CSS_COUNTER(Code)
The value is a counter or counters function. The value can be obtained by using the getCounterValue method.



CSS_DEG
final public static short CSS_DEG(Code)
The value is an angle (deg). The value can be obtained by using the getFloatValue method.



CSS_DIMENSION
final public static short CSS_DIMENSION(Code)
The value is a number with an unknown dimension. The value can be obtained by using the getFloatValue method.



CSS_EMS
final public static short CSS_EMS(Code)
The value is a length (ems). The value can be obtained by using the getFloatValue method.



CSS_EXS
final public static short CSS_EXS(Code)
The value is a length (exs). The value can be obtained by using the getFloatValue method.



CSS_GRAD
final public static short CSS_GRAD(Code)
The value is an angle (grad). The value can be obtained by using the getFloatValue method.



CSS_HZ
final public static short CSS_HZ(Code)
The value is a frequency (Hz). The value can be obtained by using the getFloatValue method.



CSS_IDENT
final public static short CSS_IDENT(Code)
The value is an identifier. The value can be obtained by using the getStringValue method.



CSS_IN
final public static short CSS_IN(Code)
The value is a length (in). The value can be obtained by using the getFloatValue method.



CSS_KHZ
final public static short CSS_KHZ(Code)
The value is a frequency (kHz). The value can be obtained by using the getFloatValue method.



CSS_MM
final public static short CSS_MM(Code)
The value is a length (mm). The value can be obtained by using the getFloatValue method.



CSS_MS
final public static short CSS_MS(Code)
The value is a time (ms). The value can be obtained by using the getFloatValue method.



CSS_NUMBER
final public static short CSS_NUMBER(Code)
The value is a simple number. The value can be obtained by using the getFloatValue method.



CSS_PC
final public static short CSS_PC(Code)
The value is a length (pc). The value can be obtained by using the getFloatValue method.



CSS_PERCENTAGE
final public static short CSS_PERCENTAGE(Code)
The value is a percentage. The value can be obtained by using the getFloatValue method.



CSS_PT
final public static short CSS_PT(Code)
The value is a length (pt). The value can be obtained by using the getFloatValue method.



CSS_PX
final public static short CSS_PX(Code)
The value is a length (px). The value can be obtained by using the getFloatValue method.



CSS_RAD
final public static short CSS_RAD(Code)
The value is an angle (rad). The value can be obtained by using the getFloatValue method.



CSS_RECT
final public static short CSS_RECT(Code)
The value is a rect function. The value can be obtained by using the getRectValue method.



CSS_RGBCOLOR
final public static short CSS_RGBCOLOR(Code)
The value is a RGB color. The value can be obtained by using the getRGBColorValue method.



CSS_S
final public static short CSS_S(Code)
The value is a time (s). The value can be obtained by using the getFloatValue method.



CSS_STRING
final public static short CSS_STRING(Code)
The value is a STRING. The value can be obtained by using the getStringValue method.



CSS_UNKNOWN
final public static short CSS_UNKNOWN(Code)
The value is not a recognized CSS2 value. The value can only be obtained by using the cssText attribute.



CSS_URI
final public static short CSS_URI(Code)
The value is a URI. The value can be obtained by using the getStringValue method.





Method Detail
getCounterValue
public Counter getCounterValue() throws DOMException(Code)
This method is used to get the Counter value. If this CSS value doesn't contain a counter value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Counter interface. The Counter value.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Counter value (e.g. this is not CSS_COUNTER).



getFloatValue
public float getFloatValue(short unitType) throws DOMException(Code)
This method is used to get a float value in a specified unit. If this CSS value doesn't contain a float value or can't be converted into the specified unit, a DOMException is raised.
Parameters:
  unitType - A unit code to get the float value. The unit code can only be a float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION). The float value in the specified unit.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float value or if the float value can't be converted into the specified unit.



getPrimitiveType
public short getPrimitiveType()(Code)
The type of the value as defined by the constants specified above.



getRGBColorValue
public RGBColor getRGBColorValue() throws DOMException(Code)
This method is used to get the RGB color. If this CSS value doesn't contain a RGB color value, a DOMException is raised. Modification to the corresponding style property can be achieved using the RGBColor interface. the RGB color value.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the attached property can't return a RGB color value (e.g. this is not CSS_RGBCOLOR).



getRectValue
public Rect getRectValue() throws DOMException(Code)
This method is used to get the Rect value. If this CSS value doesn't contain a rect value, a DOMException is raised. Modification to the corresponding style property can be achieved using the Rect interface. The Rect value.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect value. (e.g. this is not CSS_RECT).



getStringValue
public String getStringValue() throws DOMException(Code)
This method is used to get the string value. If the CSS value doesn't contain a string value, a DOMException is raised. Some properties (like 'font-family' or 'voice-family') convert a whitespace separated list of idents to a string. The string value in the current unit. The current primitiveType can only be a string unit type (i.e. CSS_STRING, CSS_URI, CSS_IDENT and CSS_ATTR).
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value.



setFloatValue
public void setFloatValue(short unitType, float floatValue) throws DOMException(Code)
A method to set the float value with a specified unit. If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a DOMException will be raised.
Parameters:
  unitType - A unit code as defined above. The unit code can only be a float unit type (i.e. CSS_NUMBER, CSS_PERCENTAGE, CSS_EMS, CSS_EXS, CSS_PX, CSS_CM, CSS_MM, CSS_IN, CSS_PT, CSS_PC, CSS_DEG, CSS_RAD, CSS_GRAD, CSS_MS, CSS_S, CSS_HZ, CSS_KHZ, CSS_DIMENSION).
Parameters:
  floatValue - The new float value.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the attached property doesn't support the float value or the unit type.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.



setStringValue
public void setStringValue(short stringType, String stringValue) throws DOMException(Code)
A method to set the string value with the specified unit. If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a DOMException will be raised.
Parameters:
  stringType - A string code as defined above. The string code can only be a string unit type (i.e. CSS_STRING, CSS_URI, CSS_IDENT, and CSS_ATTR).
Parameters:
  stringValue - The new string value.
exception:
  DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value or if the string value can't be converted into the specified unit.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly.



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