BooleanToXml
public static String BooleanToXml(boolean col)
PointToXml
public static String PointToXml(Point col)
colorToXml
public static String colorToXml(Color col)
executableByExtension
public static boolean executableByExtension(String file)
expandFileName
public static String expandFileName(String file)
Replaces a ~ in a filename with the users home directory
expandPlaceholders
public static String expandPlaceholders(String message,
String s1)
Example: expandPlaceholders("Hello $1.","Dolly"); => "Hello Dolly."
expandPlaceholders
public static String expandPlaceholders(String message,
String s1,
String s2)
expandPlaceholders
public static String expandPlaceholders(String message,
String s1,
String s2,
String s3)
firstLetterCapitalized
public static String firstLetterCapitalized(String text)
getAvailableFontFamilyNames
public static Set getAvailableFontFamilyNames()
getAvailableFontFamilyNamesAsVector
public static Vector getAvailableFontFamilyNamesAsVector()
getExtension
public static String getExtension(File f)
Returns the lowercase of the extension of a file. Example: getExtension("fork.pork.MM") == "mm"
getExtension
public static String getExtension(String s)
Returns the lowercase of the extension of a file name. Example: getExtension("fork.pork.MM") == "mm"
isAbsolutePath
public static boolean isAbsolutePath(String path)
isAvailableFontFamily
public static boolean isAvailableFontFamily(String fontFamilyName)
listToString
public static String listToString(List list)
removeExtension
public static String removeExtension(String s)
safeEquals
public static boolean safeEquals(String string1,
String string2)
setHidden
public static void setHidden(File file,
boolean hidden,
boolean synchronously)
stringToList
public static List stringToList(String string)
Converts a String in the format "value;value;value" to
a List with the values (as strings)
toRelativeURL
public static String toRelativeURL(URL base,
URL target)
This method converts an absolute url to an url relative to a given base-url.
The algorithm is somewhat chaotic, but it works (Maybe rewrite it).
Be careful, the method is ".mm"-specific. Something like this should be included
in the librarys, but I couldn't find it. You can create a new absolute url with
"new URL(URL context, URL relative)".
toXMLEscapedText
public static String toXMLEscapedText(String text)
toXMLEscapedTextWithNBSPizedSpaces
public static String toXMLEscapedTextWithNBSPizedSpaces(String text)
toXMLUnescapedText
public static String toXMLUnescapedText(String text)
urlGetFile
public static String urlGetFile(URL url)
This is a correction of a method getFile of a class URL. Namely, on Windows it
returned file paths like /C: etc., which are not valid on Windows. This correction
is heuristic to a great extend. One of the reasons is that file:// is basically no
protocol at all, but rather something every browser and every system uses slightly
differently.
xmlToBoolean
public static boolean xmlToBoolean(String string)
xmlToColor
public static Color xmlToColor(String string)
xmlToPoint
public static Point xmlToPoint(String string)