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

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `createDesktopShortcuts(net.sourceforge.jnlp.security.dialogresults.AccessWarningPaneComplexReturn.ShortcutResult menu, net.sourceforge.jnlp.security.dialogresults.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.dialogresults.AccessWarningPaneComplexReturn.ShortcutResult info, boolean isSigned)` Returns the contents of the `XDesktopEntry` through the `Reader` interface.
    `static java.io.File` | `getDesktop()`
    `java.io.File` | `getDesktopIconFile()`
    `java.io.File` | `getGeneratedJnlpFileName()`
    `int` | `getIconSize()`
    `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.dialogresults.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.dialogresults.AccessWarningPaneComplexReturn.ShortcutResult menu,
                                             net.sourceforge.jnlp.security.dialogresults.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()

    - #### getDesktopIconFile

          public java.io.File getDesktopIconFile()

    - #### getDesktop

          public static java.io.File getDesktop()

    - #### getLinuxMenuIconFile

          public java.io.File getLinuxMenuIconFile()

    - #### findFreedesktopOrgDesktopPathCatch

          public static java.lang.String findFreedesktopOrgDesktopPathCatch()

Submit a bug or feature