/[Apache-SVN]
ViewVC logotype

Revision 1694282


Jump to revision: Previous Next
Author: rwhitcomb
Date: Wed Aug 5 18:45:38 2015 UTC (8 years, 8 months ago)
Changed paths: 5
Log Message:
PIVOT-977:  Implement a specialized subclass of LinkButton to really do an HTML hyperlink.

This is the complete implementation, plus small tests, of this functionality.

The HyperlinkButton subclasses LinkButton, but uses the TerraLinkButtonSkin class
(that is, no new skin is neeeded).  The component completely relies on the existing
LinkButton class for all functionality, but adds the ability to specify a URI or URL
as the target of the link, then defines a custom Action object that calls
Desktop.getDesktop().browse(URI)
to implement the hyperlink jump.

Normally the hyperlink text is the string form of the URI or URL, but this can be
overridden via alternate constructors or by specifying "buttonData" as a BXML
attribute or with an embedded <ButtonData> element.

The test programs test these alternate forms.

The "build.xml" is changed to copy the .png files from the test source to the
test binary area so the icon image can be found in the test program.

The "TerraTheme" is extended to associate the HyperlinkButton component with
the TerraLinkButtonSkin skin class.



Changed paths

Path Details
Directorypivot/trunk/build.xml modified , text changed
Directorypivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest.java added
Directorypivot/trunk/tests/src/org/apache/pivot/tests/HyperlinkButtonTest2.java added
Directorypivot/trunk/wtk/src/org/apache/pivot/wtk/HyperlinkButton.java added
Directorypivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTheme.java modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26