Java Doc for StandardUtilities.java in  » Swing-Library » jEdit » org » gjt » sp » 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 » Swing Library » jEdit » org.gjt.sp.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.gjt.sp.util.StandardUtilities

StandardUtilities
public class StandardUtilities (Code)
Several tools that depends on JDK only.
author:
   Matthieu Casanova
version:
   $Id: StandardUtilities.java 9871 2007-06-28 16:33:20Z Vampire0 $
since:
   4.3pre5

Inner Class :public static class StringCompare implements Comparator



Method Summary
public static  intcompareStrings(String str1, String str2, boolean ignoreCase)
     Compares two strings.

Unlike String.compareTo(), this method correctly recognizes and handles embedded numbers.

public static  StringcreateWhiteSpace(int len, int tabSize)
    
public static  StringcreateWhiteSpace(int len, int tabSize, int start)
    
public static  StringgetIndentString(String str)
    
public static  intgetLeadingWhiteSpace(String str)
     Returns the number of leading white space characters in the specified string.
public static  intgetLeadingWhiteSpaceWidth(String str, int tabSize)
     Returns the width of the leading white space in the specified string.
public static  intgetOffsetOfVirtualColumn(Segment seg, int tabSize, int column, int[] totalVirtualWidth)
     Returns the array offset of a virtual column number (taking tabs into account) in the segment.
Parameters:
  seg - The segment
Parameters:
  tabSize - The tab size
Parameters:
  column - The virtual column number
Parameters:
  totalVirtualWidth - If this array is non-null, the totalvirtual width will be stored in its first location if this methodreturns -1.
public static  intgetTrailingWhiteSpace(String str)
     Returns the number of trailing whitespace characters in the specified string.
public static  intgetVirtualWidth(Segment seg, int tabSize)
     Returns the virtual column number (taking tabs into account) of the specified offset in the segment.
public static  StringglobToRE(String glob)
     Converts a Unix-style glob to a regular expression.

? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).

public static  booleanobjectsEqual(Object o1, Object o2)
     Returns if two strings are equal.



Method Detail
compareStrings
public static int compareStrings(String str1, String str2, boolean ignoreCase)(Code)
Compares two strings.

Unlike String.compareTo(), this method correctly recognizes and handles embedded numbers. For example, it places "My file 2" before "My file 10".


Parameters:
  str1 - The first string
Parameters:
  str2 - The second string
Parameters:
  ignoreCase - If true, case will be ignored negative If str1 < str2, 0 if both are the same,positive if str1 > str2
since:
   jEdit 4.3pre5




createWhiteSpace
public static String createWhiteSpace(int len, int tabSize)(Code)
Creates a string of white space with the specified length.

To get a whitespace string tuned to the current buffer's settings, call this method as follows:

myWhitespace = MiscUtilities.createWhiteSpace(myLength,
 (buffer.getBooleanProperty("noTabs") ? 0
 : buffer.getTabSize()));

Parameters:
  len - The length
Parameters:
  tabSize - The tab size, or 0 if tabs are not to be used



createWhiteSpace
public static String createWhiteSpace(int len, int tabSize, int start)(Code)
Creates a string of white space with the specified length.

To get a whitespace string tuned to the current buffer's settings, call this method as follows:

myWhitespace = MiscUtilities.createWhiteSpace(myLength,
 (buffer.getBooleanProperty("noTabs") ? 0
 : buffer.getTabSize()));

Parameters:
  len - The length
Parameters:
  tabSize - The tab size, or 0 if tabs are not to be used
Parameters:
  start - The start offset, for tab alignment



getIndentString
public static String getIndentString(String str)(Code)

Parameters:
  str - A java string the leading whitespace of that string, for indenting subsequent lines.
since:
   jEdit 4.3pre10



getLeadingWhiteSpace
public static int getLeadingWhiteSpace(String str)(Code)
Returns the number of leading white space characters in the specified string.
Parameters:
  str - The string



getLeadingWhiteSpaceWidth
public static int getLeadingWhiteSpaceWidth(String str, int tabSize)(Code)
Returns the width of the leading white space in the specified string.
Parameters:
  str - The string
Parameters:
  tabSize - The tab size



getOffsetOfVirtualColumn
public static int getOffsetOfVirtualColumn(Segment seg, int tabSize, int column, int[] totalVirtualWidth)(Code)
Returns the array offset of a virtual column number (taking tabs into account) in the segment.
Parameters:
  seg - The segment
Parameters:
  tabSize - The tab size
Parameters:
  column - The virtual column number
Parameters:
  totalVirtualWidth - If this array is non-null, the totalvirtual width will be stored in its first location if this methodreturns -1. -1 if the column is out of bounds



getTrailingWhiteSpace
public static int getTrailingWhiteSpace(String str)(Code)
Returns the number of trailing whitespace characters in the specified string.
Parameters:
  str - The string



getVirtualWidth
public static int getVirtualWidth(Segment seg, int tabSize)(Code)
Returns the virtual column number (taking tabs into account) of the specified offset in the segment.
Parameters:
  seg - The segment
Parameters:
  tabSize - The tab size



globToRE
public static String globToRE(String glob)(Code)
Converts a Unix-style glob to a regular expression.

? becomes ., * becomes .*, {aa,bb} becomes (aa|bb).
Parameters:
  glob - The glob pattern
since:
   jEdit 4.3pre7




objectsEqual
public static boolean objectsEqual(Object o1, Object o2)(Code)
Returns if two strings are equal. This correctly handles null pointers, as opposed to calling o1.equals(o2).
since:
   jEdit 4.3pre6



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.