-
public interface FileExtensionIconProvider
Provides icons (i.e. squareNode
s) 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 String
extensionFor(File file)
static String
extensionFor(Path path)
Node
iconFor(String extension, int size)
Return an icon (i.e.
-
-
-
Method Detail
-
iconFor
Node iconFor(String extension, int size)
Return an icon (i.e. a squareNode
for 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 squareNode
to be returned.- Returns:
- An icon as a
Node
instance, ornull
ifextension
isnull
or empty,size <= 0
, or no suitable representation can be found.
-
extensionFor
static String extensionFor(File file)
- Parameters:
file
- TheFile
for which the extension must be returned.- Returns:
extensionFor(java.nio.file.Path)
callingFile.toPath()
on the given parameter.
-
-