RFC: Netx - Parser support for shortcut, association and related-content elements
Omair Majid
omajid at redhat.com
Mon Jun 8 09:54:02 PDT 2009
Hi,
The attached patch adds support to the JNLP parser for parsing
association, shortcut and related-content elements from the JNLP file.
ChangeLog:
2009-06-08 Omair Majid <omajid at redhat.com>
* rt/net/sourceforge/jnlp/AssociationDesc.java: New file.
(AssociationDesc): New function. Create an association descriptor.
(getExtensions): New function. Get the extensions for this
association.
(getMimeType): New function. Get the mimetype for this association.
(checkMimeType): New function.
* rt/net/sourceforge/jnlp/InformationDesc.java
(getAssociations): New function. Get the associations.
(getShortcut): New function. Get the shortcut.
(getRelatedContents): New function. Get the related-contents.
* rt/net/sourceforge/jnlp/MenuDesc.java: New file.
(MenuDesc): New function.
(getSubMenu): New function. Get the submenu for this menu
descriptor.
* rt/net/sourceforge/jnlp/Parser.java
(getInformationDesc): Parse "assocation", "shortcut" and
"related-content" elements.
(getAssociation): New function. Parse the association node to create
a AssociationDesc.
(getShortcut): New function. Parse the shortcut node to create a
ShortcutDesc.
(getMenu): New function. Parse a menu node to create a MenuDesc.
(getRelatedContent): New function. Parse a related-content node to
create a RelatedContentDesc.
* rt/net/sourceforge/jnlp/RelatedContentDesc.java
(RelatedContentDesc): New function.
(setTitle): New function. Set the title of this content.
(getTitle): New function. Get the title of this content.
(setDescription): New function. Set the description of this content.
(getDescription): New function. Get the description of this content.
(getLocation): New function. Get the location of this content.
(setIconDesc): New function. Set the icon descriptor for this
content.
(getIcon): Get the icon descriptor for this content.
* rt/net/sourceforge/jnlp/ShortcutDesc.java
(ShortcutDesc): New function.
(ShortcutDesc): New function. Initialize requiresOnline and
onDesktop.
(isOnline): New function. Return true if the shortcut is online
only.
(onDesktop): New function. Return true if the shortcut should be
placed on the desktop.
(addMenu): New function. Add a menu descriptor for this shortcut.
(getMenu): New function. Return the menu descriptor for this
shortcut.
* rt/net/sourceforge/jnlp/resources/Messages.properties:
Add PTwoDesktops, PTwoMenus, PTwoTitle and PTwoIcons.
Any comments?
Cheers,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netx-parser-shortcut-association-related-content.patch
Type: text/x-patch
Size: 11348 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20090608/fb6ae461/netx-parser-shortcut-association-related-content.patch
More information about the distro-pkg-dev
mailing list