-
public interface FileExtensionIconProviderProvides icons (i.e. squareNodes) for a given file extension.- Author:
- claudio.rosati@esss.se
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static StringextensionFor(File file)static StringextensionFor(Path path)NodeiconFor(String extension, int size)Return an icon (i.e.
-
-
-
Method Detail
-
iconFor
Node iconFor(String extension, int size)
Return an icon (i.e. a squareNodefor the given file extension. A file extension is string following the last '.' in the file's pathname.- Parameters:
extension- File extension for which a graphical representation is needed. Implementation should discard the first character if equal to '.'. Can benull.size- The size of the squareNodeto be returned.- Returns:
- An icon as a
Nodeinstance, ornullifextensionisnullor empty,size <= 0, or no suitable representation can be found.
-
extensionFor
static String extensionFor(File file)
- Parameters:
file- TheFilefor which the extension must be returned.- Returns:
extensionFor(java.nio.file.Path)callingFile.toPath()on the given parameter.
-
-