Class InformationDesc
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.information.InformationDesc
The information element contains information intended to be consumed by the JNLP Client to integrate
the application into the desktop, provide user feedback, etc.
- Author:
- Jon A. Maxwell (JAM) - initial author
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInformationDesc(Locale[] locales, boolean strict) Create an information element object.InformationDesc(Locale[] locales, String os, String arch) Create an information element object.InformationDesc(Locale[] locales, String os, String arch, boolean strict) Create an information element object. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an information item (description, icon, etc) under a specified key name.getArch()A short statement about the application.getIconLocation(IconKind kind, int dimension) getIconLocation(IconKind kind, int width, int height) Returns the URL of the icon with the given type and a size closest to the requested width and height.IconDesc[]Returns the icons specified by the JNLP file.getItems()Locale[]getOs()getTitle()booleanboolean
-
Field Details
-
INFORMATION_ELEMENT
- See Also:
-
OS_ATTRIBUTE
- See Also:
-
ARCH_ATTRIBUTE
- See Also:
-
LOCALE_ATTRIBUTE
- See Also:
-
TITLE_ELEMENT
- See Also:
-
VENDOR_ELEMENT
- See Also:
-
OFFLINE_ALLOWED_ELEMENT
- See Also:
-
strict
public final boolean strict
-
-
Constructor Details
-
InformationDesc
Create an information element object.- Parameters:
locales- the locales for which the information element should be usedstrict- whether parser was strict
-
InformationDesc
Create an information element object.- Parameters:
locales- the locales for which the information element should be usedos- the operating system for which the information element should be consideredarch- the architecure for which the information element should be considered
-
InformationDesc
Create an information element object.- Parameters:
locales- the locales for which the information element should be usedos- the operating system for which the information element should be consideredarch- the architecure for which the information element should be consideredstrict- whether parser was strict
-
-
Method Details
-
getTitle
- Returns:
- the application's title.
-
getVendor
- Returns:
- the application's vendor.
-
getHomepage
- Returns:
- the application's homepage.
-
getDescription
A short statement about the application. Longer descriptions should be put on a separate web page and referred to using the homepage element.- Returns:
- the default description for the application.
-
getDescription
- Parameters:
kind- one ofDescriptionKind- Returns:
- the application's description of the specified type.
-
getDescriptionStrict
- Parameters:
kind- one ofDescriptionKind- Returns:
- the application's description of the specified type.
-
getIcons
Returns the icons specified by the JNLP file.- Parameters:
kind- one ofIconKind- Returns:
- an array of zero of more IconDescs of the specified icon type
-
getIconLocation
-
getIconLocation
Returns the URL of the icon with the given type and a size closest to the requested width and height. This method will only return an icon smaller than the specified width and height if there exists no bigger icons.- Parameters:
kind- the kind of icon to getwidth- desired width of iconheight- desired height of icon- Returns:
- the closest icon by size or null if no icons declared
-
getLocales
- Returns:
- the locales for the information.
-
getOs
- Returns:
- the operating system for which the information element should be considered
-
getArch
- Returns:
- the architecure for which the information element should be considered
-
isOfflineAllowed
public boolean isOfflineAllowed()- Returns:
- whether offline execution allowed.
-
isSharingAllowed
public boolean isSharingAllowed()- Returns:
- whether the resources specified in the JNLP file may be shared by more than one instance in the same JVM (JNLP extension). This is an extension to the JNLP spec and will always return false for standard JNLP files.
-
getAssociations
- Returns:
- the associations specified in the JNLP file
-
getShortcut
- Returns:
- the shortcut specified by this JNLP file
-
getRelatedContents
- Returns:
- the related-contents specified by this JNLP file
-
getItems
- Parameters:
key- key to find item- Returns:
- all items matching the specified key.
-
addItem
Add an information item (description, icon, etc) under a specified key name.- Parameters:
key- key to place value tovalue- value to be placed to key
-
getItems
-