NASA World Wind

gov.nasa.worldwind.util
Class WWUtil

java.lang.Object
  extended by gov.nasa.worldwind.util.WWUtil

public class WWUtil
extends Object


Constructor Summary
WWUtil()
           
 
Method Summary
static void alignComponent(Component parent, Component child, String alignment)
           
static Boolean convertStringToBoolean(String s)
           
static Double convertStringToDouble(String s)
          Converts a specified string to a floating point value.
static Integer convertStringToInteger(String s)
          Converts a specified string to an integer value.
static Long convertStringToLong(String s)
          Converts a specified string to a long integer value.
static Color decodeColor(String encodedString)
          Returns the Color described by the String encodedString.
protected static void doListFileNames(File file, FileFilter filter, boolean recurse, boolean exitBranchOnFirstMatch, Collection<String> names)
           
protected static String[] doListFileNames(String filePath, FileFilter filter, boolean recurse, boolean exitBranchOnFirstMatch)
           
static String encodeColor(Color color)
          Returns a String encoding of the specified color.
static String[] listAllFileNames(String filePath, FileFilter filter)
           
protected static boolean listFile(File file, FileFilter filter, Collection<String> names)
           
static String[] listFileNames(String filePath, FileFilter filter)
           
static String[] listTopFileNames(String filePath, FileFilter filter)
           
static Color makeColorBrighter(Color color)
           
static Color makeColorDarker(Color color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WWUtil

public WWUtil()
Method Detail

alignComponent

public static void alignComponent(Component parent,
                                  Component child,
                                  String alignment)

convertStringToBoolean

public static Boolean convertStringToBoolean(String s)

convertStringToDouble

public static Double convertStringToDouble(String s)
Converts a specified string to a floating point value. Returns null if the string cannot be converted.

Parameters:
s - the string to convert.
Returns:
floating point value of the string, or null if the string cannot be converted.
Throws:
IllegalArgumentException - if the string is null.

convertStringToInteger

public static Integer convertStringToInteger(String s)
Converts a specified string to an integer value. Returns null if the string cannot be converted.

Parameters:
s - the string to convert.
Returns:
integer value of the string, or null if the string cannot be converted.
Throws:
IllegalArgumentException - if the string is null.

convertStringToLong

public static Long convertStringToLong(String s)
Converts a specified string to a long integer value. Returns null if the string cannot be converted.

Parameters:
s - the string to convert.
Returns:
long integer value of the string, or null if the string cannot be converted.
Throws:
IllegalArgumentException - if the string is null.

decodeColor

public static Color decodeColor(String encodedString)
Returns the Color described by the String encodedString. This understands Colors encoded with a call to encodeColor(java.awt.Color). If encodedString cannot be decoded, this method returns null.

Parameters:
encodedString - String to decode.
Returns:
Color decoded from the specified encodedString, or null if the String cannot be decoded.
Throws:
IllegalArgumentException - If encodedString is null.

doListFileNames

protected static void doListFileNames(File file,
                                      FileFilter filter,
                                      boolean recurse,
                                      boolean exitBranchOnFirstMatch,
                                      Collection<String> names)

doListFileNames

protected static String[] doListFileNames(String filePath,
                                          FileFilter filter,
                                          boolean recurse,
                                          boolean exitBranchOnFirstMatch)

encodeColor

public static String encodeColor(Color color)
Returns a String encoding of the specified color. The Color can be restored with a call to decodeColor(String).

Parameters:
color - Color to encode.
Returns:
String encoding of the specified color.
Throws:
IllegalArgumentException - If color is null.

listAllFileNames

public static String[] listAllFileNames(String filePath,
                                        FileFilter filter)

listFile

protected static boolean listFile(File file,
                                  FileFilter filter,
                                  Collection<String> names)

listFileNames

public static String[] listFileNames(String filePath,
                                     FileFilter filter)

listTopFileNames

public static String[] listTopFileNames(String filePath,
                                        FileFilter filter)

makeColorBrighter

public static Color makeColorBrighter(Color color)

makeColorDarker

public static Color makeColorDarker(Color color)

NASA World Wind

Hosted by docs.bugaco.com