XDesktopEntry (IcedTea-Web: NetX )
Keywords: net.sourceforge.jnlp.util.XDesktopEntry class
Date: 2016-05-12

net.sourceforge.jnlp.util

## Class XDesktopEntry

- java.lang.Object
- - net.sourceforge.jnlp.util.XDesktopEntry

-     public class XDesktopEntry
      extends java.lang.Object

  This class builds a (freedesktop.org) desktop entry out of a `JNLPFile` . This entry can be used to install desktop shortcuts. See xdg-desktop-icon (1) and http://standards.freedesktop.org/desktop-entry-spec/latest/ for more information

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String[]` | `BROWSERS`
    `static java.lang.String` | `FAVICON`
    `static java.lang.String` | `JAVA_ICON_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XDesktopEntry(JNLPFile file)` Create a XDesktopEntry for the given JNLP file

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createDesktopShortcuts(net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult menu, net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult desktop, boolean isSigned)` Create a desktop shortcut for this desktop entry
    `static java.lang.String` | `findFreedesktopOrgDesktopPathCatch()`
    `static java.lang.String` | `getBrowserBin()`
    `java.io.Reader` | `getContentsAsReader(boolean menu, net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult info, boolean isSigned)` Returns the contents of the `XDesktopEntry` through the `Reader` interface.
    `java.io.File` | `getGeneratedJnlpFileName()`
    `int` | `getIconSize()`
    `java.io.File` | `getLinuxDesktopIconFile()`
    `java.io.File` | `getLinuxMenuIconFile()`
    `java.io.File` | `getShortcutTmpFile()`
    `void` | `refreshExistingShortcuts(boolean desktop, boolean menu)`
    `void` | `setIconSize(int size)` Set the icon size to use for the desktop shortcut

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### JAVA_ICON_NAME

          public static final java.lang.String JAVA_ICON_NAME

      See Also:
        Constant Field Values

    - #### BROWSERS

          public static final java.lang.String[] BROWSERS

    - #### FAVICON

          public static final java.lang.String FAVICON

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### XDesktopEntry

          public XDesktopEntry(JNLPFile file)

      Create a XDesktopEntry for the given JNLP file
      Parameters:
        `file` - a `JNLPFile` that indicates the application to launch

  - ### Method Detail

    - #### getContentsAsReader

          public java.io.Reader getContentsAsReader(boolean menu,
                                           net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult info,
                                           boolean isSigned)

      Returns the contents of the `XDesktopEntry` through the `Reader` interface.
      Parameters:
        `menu` - whether to create this icon to menu
        `info` - result of user's interference
        `isSigned` - whether the app is signed
      Returns:
        reader with desktop shortcut specification

    - #### getBrowserBin

          public static java.lang.String getBrowserBin()

    - #### getIconSize

          public int getIconSize()

      Returns:
        the size of the icon (in pixels) for the desktop shortcut

    - #### getShortcutTmpFile

          public java.io.File getShortcutTmpFile()

    - #### setIconSize

          public void setIconSize(int size)

      Set the icon size to use for the desktop shortcut
      Parameters:
        `size` - the size (in pixels) of the icon to use. Commonly used sizes are of 16, 22, 32, 48, 64 and 128

    - #### createDesktopShortcuts

          public void createDesktopShortcuts(net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult menu,
                                    net.sourceforge.jnlp.security.dialogs.AccessWarningPaneComplexReturn.ShortcutResult desktop,
                                    boolean isSigned)

      Create a desktop shortcut for this desktop entry
      Parameters:
        `menu` - how to create in menu
        `desktop` - how to create on desktop
        `isSigned` - if it is signed

    - #### refreshExistingShortcuts

          public void refreshExistingShortcuts(boolean desktop,
                                      boolean menu)

    - #### getGeneratedJnlpFileName

          public java.io.File getGeneratedJnlpFileName()

    - #### getLinuxDesktopIconFile

          public java.io.File getLinuxDesktopIconFile()

    - #### getLinuxMenuIconFile

          public java.io.File getLinuxMenuIconFile()

    - #### findFreedesktopOrgDesktopPathCatch

          public static java.lang.String findFreedesktopOrgDesktopPathCatch()

Submit a bug or feature