Java Doc for Compatibility.java in  » IDE-Eclipse » swt » org » eclipse » swt » internal » 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 » IDE Eclipse » swt » org.eclipse.swt.internal 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.swt.internal.Compatibility

Compatibility
final public class Compatibility (Code)
This class is a placeholder for utility methods commonly used on J2SE platforms but not supported on some J2ME profiles.

It is part of our effort to provide support for both J2SE and J2ME platforms.

IMPORTANT: some of the methods have been modified from their J2SE parents. Refer to the description of each method for specific changes.

  • Exceptions thrown may differ since J2ME's set of exceptions is a subset of J2SE's one.
  • The range of the mathematic functions is subject to change.


Field Summary
public static  doublePI
     Returns the PI constant as a double.
static  doubletoRadians
    


Method Summary
public static  intceil(int p, int q)
     Answers the most negative (i.e.
public static  intcos(int angle, int length)
     Answers the length of the side adjacent to the given angle of a right triangle.
public static  booleanequalsIgnoreCase(String s1, String s2)
     Compares two instances of class String ignoring the case of the characters and answers if they are equal.
public static  voidexec(String prog)
     Execute a program in a separate platform process if the underlying platform support this.
public static  voidexec(String[] progArray)
     Execute progArray[0] in a separate platform process if the underlying platform support this.
public static  intfloor(int p, int q)
     Answers the most positive (i.e.
public static  StringgetMessage(String key)
     Returns the NLS'ed message for the given argument.
public static  StringgetMessage(String key, Object[] args)
    
public static  voidinterrupt()
     Interrupt the current thread.
public static  booleanisLetter(char c)
     Answers whether the character is a letter.
public static  booleanisLetterOrDigit(char c)
     Answers whether the character is a letter or a digit.
public static  booleanisSpaceChar(char c)
     Answers whether the character is a Unicode space character.
public static  booleanisWhitespace(char c)
     Answers whether the character is a whitespace character.
public static  OutputStreamnewDeflaterOutputStream(OutputStream stream)
     Create an DeflaterOutputStream if such things are supported.
public static  InputStreamnewFileInputStream(String filename)
     Open a file if such things are supported.
public static  OutputStreamnewFileOutputStream(String filename)
     Open a file if such things are supported.
public static  InputStreamnewInflaterInputStream(InputStream stream)
     Create an InflaterInputStream if such things are supported.
public static  intpow2(int n)
     Returns 2 raised to the power of the argument.
public static  intround(int p, int q)
     Answers the result of rounding to the closest integer the number obtained by dividing the first argument p by the second argument q.

IMPORTANT: the j2me version has an additional restriction on the arguments.

public static  intsin(int angle, int length)
     Answers the length of the side opposite to the given angle of a right triangle.

Field Detail
PI
public static double PI(Code)
Returns the PI constant as a double.



toRadians
static double toRadians(Code)





Method Detail
ceil
public static int ceil(int p, int q)(Code)
Answers the most negative (i.e. closest to negative infinity) integer value which is greater than the number obtained by dividing the first argument p by the second argument q.
Parameters:
  p - numerator
Parameters:
  q - denominator (must be different from zero) the ceiling of the rational number p / q.



cos
public static int cos(int angle, int length)(Code)
Answers the length of the side adjacent to the given angle of a right triangle. In other words, it returns the integer conversion of length * cos (angle).

IMPORTANT: the j2me version has an additional restriction on the argument. length must be between -32767 and 32767 (inclusive).


Parameters:
  angle - the angle in degrees
Parameters:
  length - the length of the triangle's hypotenuse the integer conversion of length * cos (angle)



equalsIgnoreCase
public static boolean equalsIgnoreCase(String s1, String s2)(Code)
Compares two instances of class String ignoring the case of the characters and answers if they are equal.
Parameters:
  s1 - string
Parameters:
  s2 - string true if the two instances of class String are equal



exec
public static void exec(String prog) throws java.io.IOException(Code)
Execute a program in a separate platform process if the underlying platform support this.

The new process inherits the environment of the caller.


Parameters:
  prog - the name of the program to execute
exception:
  IOException - if the program cannot be executed
exception:
  SecurityException - if the current SecurityManager disallows program execution



exec
public static void exec(String[] progArray) throws java.io.IOException(Code)
Execute progArray[0] in a separate platform process if the underlying platform support this.

The new process inherits the environment of the caller.


Parameters:
  progArray - array containing the program to execute and its arguments
exception:
  IOException - if the program cannot be executed
exception:
  SecurityException - if the current SecurityManager disallows program execution




floor
public static int floor(int p, int q)(Code)
Answers the most positive (i.e. closest to positive infinity) integer value which is less than the number obtained by dividing the first argument p by the second argument q.
Parameters:
  p - numerator
Parameters:
  q - denominator (must be different from zero) the floor of the rational number p / q.



getMessage
public static String getMessage(String key)(Code)
Returns the NLS'ed message for the given argument. This is only being called from SWT.
Parameters:
  key - the key to look up the message for the given key
See Also:   SWT.getMessage(String)



getMessage
public static String getMessage(String key, Object[] args)(Code)



interrupt
public static void interrupt()(Code)
Interrupt the current thread.

Note that this is not available on CLDC.




isLetter
public static boolean isLetter(char c)(Code)
Answers whether the character is a letter.
Parameters:
  c - the character true when the character is a letter



isLetterOrDigit
public static boolean isLetterOrDigit(char c)(Code)
Answers whether the character is a letter or a digit.
Parameters:
  c - the character true when the character is a letter or a digit



isSpaceChar
public static boolean isSpaceChar(char c)(Code)
Answers whether the character is a Unicode space character.
Parameters:
  c - the character true when the character is a Unicode space character



isWhitespace
public static boolean isWhitespace(char c)(Code)
Answers whether the character is a whitespace character.
Parameters:
  c - the character to test true if the character is whitespace



newDeflaterOutputStream
public static OutputStream newDeflaterOutputStream(OutputStream stream) throws IOException(Code)
Create an DeflaterOutputStream if such things are supported.
Parameters:
  stream - the output stream a deflater stream or null
exception:
  IOException -
since:
   3.4



newFileInputStream
public static InputStream newFileInputStream(String filename) throws IOException(Code)
Open a file if such things are supported.
Parameters:
  filename - the name of the file to open a stream on the file if it could be opened.
exception:
  IOException -



newFileOutputStream
public static OutputStream newFileOutputStream(String filename) throws IOException(Code)
Open a file if such things are supported.
Parameters:
  filename - the name of the file to open a stream on the file if it could be opened.
exception:
  IOException -



newInflaterInputStream
public static InputStream newInflaterInputStream(InputStream stream) throws IOException(Code)
Create an InflaterInputStream if such things are supported.
Parameters:
  stream - the input stream a inflater stream or null
exception:
  IOException -
since:
   3.3



pow2
public static int pow2(int n)(Code)
Returns 2 raised to the power of the argument.
Parameters:
  n - an int value between 0 and 30 (inclusive) 2 raised to the power of the argument
exception:
  IllegalArgumentException -
  • ERROR_INVALID_RANGE - if the argument is not between 0 and 30 (inclusive)



round
public static int round(int p, int q)(Code)
Answers the result of rounding to the closest integer the number obtained by dividing the first argument p by the second argument q.

IMPORTANT: the j2me version has an additional restriction on the arguments. p must be within the range 0 - 32767 (inclusive). q must be within the range 1 - 32767 (inclusive).


Parameters:
  p - numerator
Parameters:
  q - denominator (must be different from zero) the closest integer to the rational number p / q



sin
public static int sin(int angle, int length)(Code)
Answers the length of the side opposite to the given angle of a right triangle. In other words, it returns the integer conversion of length * sin (angle).

IMPORTANT: the j2me version has an additional restriction on the argument. length must be between -32767 and 32767 (inclusive).


Parameters:
  angle - the angle in degrees
Parameters:
  length - the length of the triangle's hypotenuse the integer conversion of length * sin (angle)



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.