freemind.main
Class Tools
public
class
Tools
extends Object
Method Summary |
static String | BooleanToXml(boolean col) |
static String | colorToXml(Color col) |
static boolean | executableByExtension(String file) |
static String | expandFileName(String file)
Replaces a ~ in a filename with the users home directory |
static String | expandPlaceholders(String message, String s1)
Example: expandPlaceholders("Hello $1.","Dolly"); => "Hello Dolly." |
static String | expandPlaceholders(String message, String s1, String s2) |
static String | expandPlaceholders(String message, String s1, String s2, String s3) |
static String | firstLetterCapitalized(String text) |
static Set | getAvailableFontFamilyNames() |
static Vector | getAvailableFontFamilyNamesAsVector() |
static String | getExtension(File f)
Returns the lowercase of the extension of a file. |
static String | getExtension(String s)
Returns the lowercase of the extension of a file name. |
static boolean | isAbsolutePath(String path) |
static boolean | isAvailableFontFamily(String fontFamilyName) |
static String | listToString(List list) |
static String | PointToXml(Point col) |
static String | removeExtension(String s) |
static boolean | safeEquals(String string1, String string2) |
static void | setHidden(File file, boolean hidden, boolean synchronously) |
static List | stringToList(String string)
Converts a String in the format "value;value;value" to
a List with the values (as strings) |
static String | toRelativeURL(URL base, URL target)
This method converts an absolute url to an url relative to a given base-url.
|
static String | toXMLEscapedText(String text) |
static String | toXMLEscapedTextWithNBSPizedSpaces(String text) |
static String | toXMLUnescapedText(String text) |
static String | urlGetFile(URL url)
This is a correction of a method getFile of a class URL. |
static boolean | xmlToBoolean(String string) |
static Color | xmlToColor(String string) |
static Point | xmlToPoint(String string) |
public static final Set executableExtensions
public static String BooleanToXml(boolean col)
public static String colorToXml(Color col)
public static boolean executableByExtension(String file)
public static String expandFileName(String file)
Replaces a ~ in a filename with the users home directory
public static String expandPlaceholders(String message, String s1)
Example: expandPlaceholders("Hello $1.","Dolly"); => "Hello Dolly."
public static String expandPlaceholders(String message, String s1, String s2)
public static String expandPlaceholders(String message, String s1, String s2, String s3)
public static String firstLetterCapitalized(String text)
public static Set getAvailableFontFamilyNames()
public static Vector getAvailableFontFamilyNamesAsVector()
public static String getExtension(File f)
Returns the lowercase of the extension of a file. Example: getExtension("fork.pork.MM") == "mm"
public static String getExtension(String s)
Returns the lowercase of the extension of a file name. Example: getExtension("fork.pork.MM") == "mm"
public static boolean isAbsolutePath(String path)
public static boolean isAvailableFontFamily(String fontFamilyName)
public static String listToString(List list)
public static String PointToXml(Point col)
public static String removeExtension(String s)
public static boolean safeEquals(String string1, String string2)
public static void setHidden(File file, boolean hidden, boolean synchronously)
public static List stringToList(String string)
Converts a String in the format "value;value;value" to
a List with the values (as strings)
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)".
public static String toXMLEscapedText(String text)
public static String toXMLEscapedTextWithNBSPizedSpaces(String text)
public static String toXMLUnescapedText(String text)
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.
public static boolean xmlToBoolean(String string)
public static Color xmlToColor(String string)
public static Point xmlToPoint(String string)