A Rich UI hyperlink defines a link that, if clicked, causes
presentation of the target content.
The following fields are supported:
- text specifies the string displayed
on the page
- target specifies a string that identifies
the window in which the new web page opens. Here are the valid values:
- "_top" opens the page in the current window, taking up the entire
page. This behavior is also in effect if you specify "_self", "_parent",
or no value for target.
- "_blank" opens the page is a different browser or browser window.
- href specifies the web address of interest
The following example renders a link to the web site for EGL Development
Tools, and the displayed text is “Do more with EGL”:
Handler Hyper type RUIHandler {children = [myHyperlink]}
myHyperlink HyperLink
{
text = "Do more with EGL",
target = "_blank",
href = "http://www.eclipse.org/edt"
};
end
If the web page to which you are linking takes up the Preview view,
you can clear the page as follows:
- Double-click the Link Preview with Editor button
(the two arrows); or
- Load an EGL file that contains a different Rich UI handler.
Other supported fields and functions are described in the following
topics in the EGL Programmer’s Guide: “Rich UI widget fields” and
”Rich UI widget functions.”
Use of this widget requires the following statement:
import org.eclipse.edt.rui.widgets.Hyperlink;