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.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringSpecifies the architecure for which the information element should be considered.static final Stringthe data as list of key,value pairsstatic final Stringstatic final Stringprivate final Locale[]The locales for which the information element should be used.static final Stringprivate final StringSpecifies the operating system for which the information element should be considered.static final Stringfinal booleanstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionInformationDesc(Locale[] locales) Create an information element object.InformationDesc(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.private ObjectgetItems()Locale[]getOs()getTitle()booleanbooleanprivate longsquareDistance(int width, int height, IconDesc icon)
-
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:
-
locales
The locales for which the information element should be used. -
os
Specifies the operating system for which the information element should be considered. If the value is a prefix of the os.name system property, then the information element can be used. If the attribute is not specified, it matches all operating systems. -
arch
Specifies the architecure for which the information element should be considered. If the value is a prefix of the os.arch system property, then the information element can be used. If the attribute is not specified, it matches all architecures. -
info
-
strict
public final boolean strict
-
-
Constructor Details
-
InformationDesc
InformationDesc(Locale[] locales) Create an information element object.- Parameters:
locales- the locales for which the information element should be used
-
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
-
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
-
squareDistance
-
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
-
getItem
-
getItems
-
addItem
-
getItems
-