public class DesktopEntry extends AbstractFreedesktopEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
DesktopEntry.Type
There are 4 types of desktop entries: Application, Link, FSDevice and
Directory.
|
example| Constructor and Description |
|---|
DesktopEntry(org.apache.commons.vfs2.FileObject... base) |
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
getActions()
Additional actions possible.Will always return at least an empty
collection.
|
Collection<String> |
getCategories()
Categories in which the entry should be shown in a menu (for possible
values see the Desktop Menu Specification).
|
String |
getDev()
Get the device to mount.
|
String |
getExec()
Program to execute, possibly with arguments.
|
Collection<String> |
getFilePattern()
A list of regular expressions to match against for a file manager to
determine if this entry's icon should be displayed.
|
String |
getFSType()
Get the type of file system to try and mount.
|
String |
getGenericName()
Generic name of the application, for example "Web Browser".
|
String |
getIcon()
Icon to display in file manager, menus, etc.
|
String |
getIcon(Locale locale)
Icon to display in file manager, menus, etc.
|
String |
getIcon(String language)
Icon to display in file manager, menus, etc.
|
Collection<String> |
getMimeType()
Get a list of all the Mime types the applications supported by this
entry.
|
String |
getMountPoint()
Get the mount point of the device.
|
String |
getPath()
If entry is of type Application, the working directory to run the program
in.
|
String |
getSortOrder()
Get the order in which to display files.
|
String |
getStartupWMClass()
The window manager class or name hint (see the Startup Notification
Protocol Specification for more details) to use for startup notifocation
(see the Startup Notification Protocol Specification for more details).
|
String |
getSwallowExec()
Program to exec if swallowed app is clicked.
|
String |
getSwallowTitle()
If entry is swallowed onto the panel, this should be the title of the
window.
|
String |
getSwallowTitle(Locale locale)
If entry is swallowed onto the panel, this should be the title of the
window.
|
String |
getSwallowTitle(String language)
If entry is swallowed onto the panel, this should be the title of the
window.
|
String |
getTryExec()
File name of a binary on disk used to determine if the program is
actually installed.
|
DesktopEntry.Type |
getType()
There are 4 types of desktop entries: Application, Link, FSDevice and
Directory.
|
String |
getUnmountIcon()
Icon to display when device is not mounted.
|
String |
getUnmountIcon(Locale locale)
Icon to display when device is not mounted.
|
String |
getUnmountIcon(String language)
Icon to display when device is not mounted.
|
URI |
getURL()
If entry is Link type, the URL to access.
|
String |
getVersion()
Version of Desktop Entry Specification (While the version field is not
required to be present, it should be in all newer implementations of the
Desktop Entry Specification.
|
protected void |
initFromProperties(INIFile iniFile,
Properties properties) |
boolean |
isHidden()
Hidden should have been called Deleted.
|
boolean |
isNoDisplay()
NoDisplay means "this application exists, but don't display it in the
menus".
|
boolean |
isReadOnly()
Get whether the device is read only or not.
|
boolean |
isStartupNotify()
If true, it is KNOWN that the application will send a "remove" message
when started with the DESKTOP_LAUNCH_ID environment variable set (see the
Startup Notification Protocol Specification for more details).
|
boolean |
isTerminal()
Whether the program runs in a terminal window.
|
protected void |
load() |
checkLoaded, getBase, getBases, getComment, getComment, getComment, getInternalName, getLocalisableField, getName, getName, getName, init, isLoaded, load, load, loadDefaults, toStringpublic DesktopEntry(org.apache.commons.vfs2.FileObject... base)
throws IOException,
ParseException
IOExceptionParseExceptionpublic Collection<String> getFilePattern()
public DesktopEntry.Type getType()
public String getVersion()
public boolean isNoDisplay()
public String getGenericName()
public String getIcon()
public String getIcon(Locale locale)
locale - localepublic String getIcon(String language)
language - languagepublic boolean isHidden()
public String getTryExec()
null if the entry was not
specified.public String getExec()
null if the entry was not specified.public String getPath()
null if the
entry was not specified.public boolean isTerminal()
public String getSwallowTitle()
public String getSwallowTitle(Locale locale)
locale - localepublic String getSwallowTitle(String language)
language - languagepublic String getSwallowExec()
public Collection<String> getActions()
public Collection<String> getMimeType()
public String getSortOrder()
null if the entry was not specified.public String getDev()
null if the entry was not specified.public String getFSType()
null if the entry was not specified.public String getMountPoint()
null if the entry was not specified.public boolean isReadOnly()
public String getUnmountIcon()
public String getUnmountIcon(Locale locale)
locale - localepublic String getUnmountIcon(String language)
language - languagepublic URI getURL()
public Collection<String> getCategories()
public boolean isStartupNotify()
public String getStartupWMClass()
isStartupNotify()protected void initFromProperties(INIFile iniFile, Properties properties) throws IOException, ParseException
initFromProperties in class AbstractFreedesktopEntityIOExceptionParseExceptionprotected void load()
throws IOException,
ParseException
load in class AbstractFreedesktopEntityIOExceptionParseExceptionCopyright © 2016. All rights reserved.