Java Doc for Extent.java in  » Ajax » NextApp-Echo2 » nextapp » echo2 » app » 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 » Ajax » NextApp Echo2 » nextapp.echo2.app 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   nextapp.echo2.app.Extent

Extent
public class Extent implements Comparable,Serializable(Code)
A representation of a linear distance with units. Extent objects are immutable once constructed.

WARNING: Many Components will have Extent-based properties that allow only certain types of units. Make certain to verify the API specification of any Component to ensure that you are using Extents correctly with it. The Extent-based getXXX() and setXXX() property methods of a Component will explain what types of Extents are allowed.



Field Summary
final public static  intCM
     Centimeter units.
final public static  intEM
     Em units (height of font).
final public static  intEX
     Ex units (height of character 'x' in font).
final public static  intIN
     Inch units.
final public static  intMM
     Millimeter units.
final public static  intPC
    
final public static  intPERCENT
     Percentage units.
final public static  intPT
     Points (1pt = 1/72in).
final public static  intPX
     Pixel units.

Constructor Summary
public  Extent(int value)
     Creates a new Extent with pixel units.
public  Extent(int value, int units)
     Creates a new Extent.

Method Summary
public static  Extentadd(Extent a, Extent b)
     Adds one Extent to another, returning the sum as a new Extent.
public  intcompareTo(Object o)
    
public  booleanequals(Object o)
    
public  intgetUnits()
     Returns the units of the Extent.
public  intgetValue()
     Returns the value of the Extent.
public  booleanisComparableTo(Extent that)
     Determines whether this Extent can be compared to another Extent to determine which is a greater length.
public  booleanisEnglish()
     Determines if the Extent has English units, i.e., the units are of type IN (inches), PC (picas), or PT (points).
public  booleanisPercentage()
     Determines if the Extent has percentage-based units.
public  booleanisPrint()
     Determines if this Extent has 'print' based units, i.e., the units are in real dimensions, such as SI or English values, rather than screen-based units such as pixels or percentages.
public  booleanisSI()
     Determines if the Extent has SI (Metric) units, i.e., the units are of type MM (millimeters) or CM (centimeters).
public  inttoMm()
     Returns the value of the extent in millimeters.
public  inttoPoint()
     Returns the value of the extent in points.
public  StringtoString()
     Returns a string describing the state of the Extent.
public static  voidvalidate(Extent value, int validUnits)
     Validates that the specified Extent is acceptable for use in a particular environment, by ensuring that its units are of a supported type.

Field Detail
CM
final public static int CM(Code)
Centimeter units.



EM
final public static int EM(Code)
Em units (height of font).



EX
final public static int EX(Code)
Ex units (height of character 'x' in font).



IN
final public static int IN(Code)
Inch units.



MM
final public static int MM(Code)
Millimeter units.



PC
final public static int PC(Code)
Picas (1pc = 12pt)



PERCENT
final public static int PERCENT(Code)
Percentage units.



PT
final public static int PT(Code)
Points (1pt = 1/72in).



PX
final public static int PX(Code)
Pixel units.




Constructor Detail
Extent
public Extent(int value)(Code)
Creates a new Extent with pixel units.
Parameters:
  value - the value of the extent in pixels



Extent
public Extent(int value, int units)(Code)
Creates a new Extent.
Parameters:
  value - the value of the extent
Parameters:
  units - the units of the value, one of the following constants:
  • PC: Pixels
  • PERCENT: Percent (of size of containing component)
  • PT: Points
  • CM: Centimeters
  • MM: Millimeters
  • IN: Inches
  • EM: Ems (height of 'M' character)
  • EX: Exs (height of 'x' character)
  • PC: Picas




Method Detail
add
public static Extent add(Extent a, Extent b)(Code)
Adds one Extent to another, returning the sum as a new Extent. Null is returned if the Extents have incompatible units. If either provided Extent is null, the other is returned.
Parameters:
  a - the first Extent
Parameters:
  b - the second Extent the sum of the Extents, if calculable



compareTo
public int compareTo(Object o)(Code)

See Also:   java.lang.Comparable.compareTo(java.lang.Object)



equals
public boolean equals(Object o)(Code)

See Also:   java.lang.Object.equals(java.lang.Object)



getUnits
public int getUnits()(Code)
Returns the units of the Extent. The units of the Extent, one of the following constants:
  • PC: Pixels
  • PERCENT: Percent (of size of containing component)
  • PT: Points
  • CM: Centimeters
  • MM: Millimeters
  • IN: Inches
  • EM: Ems (height of 'M' character)
  • EX: Exs (height of 'x' character)
  • PC: Picas



getValue
public int getValue()(Code)
Returns the value of the Extent. The value of the Extent



isComparableTo
public boolean isComparableTo(Extent that)(Code)
Determines whether this Extent can be compared to another Extent to determine which is a greater length.
Parameters:
  that - the Extent to test comparability to true if the Extents can be compared



isEnglish
public boolean isEnglish()(Code)
Determines if the Extent has English units, i.e., the units are of type IN (inches), PC (picas), or PT (points). true if this Extent has English units



isPercentage
public boolean isPercentage()(Code)
Determines if the Extent has percentage-based units. true if the Extent has percentage-based units



isPrint
public boolean isPrint()(Code)
Determines if this Extent has 'print' based units, i.e., the units are in real dimensions, such as SI or English values, rather than screen-based units such as pixels or percentages. true if this Extent has 'print' based units



isSI
public boolean isSI()(Code)
Determines if the Extent has SI (Metric) units, i.e., the units are of type MM (millimeters) or CM (centimeters). true if this Extent has SI units



toMm
public int toMm()(Code)
Returns the value of the extent in millimeters. the value of the extent in millimeters
throws:
  IllegalStateException - if the value cannot be returned in millimeters.Verify that isPrint() returns true to avoid potentially receiving this exception.



toPoint
public int toPoint()(Code)
Returns the value of the extent in points. the value of the extent in points
throws:
  IllegalStateException - if the value cannot be returned in points(verify that isPrint() returns true to avoid potentially receiving this exception).



toString
public String toString()(Code)
Returns a string describing the state of the Extent. For debugging purposes only, do not rely on formatting.
See Also:   java.lang.Object.toString



validate
public static void validate(Extent value, int validUnits)(Code)
Validates that the specified Extent is acceptable for use in a particular environment, by ensuring that its units are of a supported type.
Parameters:
  value - the Extent to validate
Parameters:
  validUnits - a bitmask containing one or more of the unit constants(multiple unit constants may be ORed together)
throws:
  IllegalArgumentException - if the Extent is invalid



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.