Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

Hyperlink control

Hyperlink is a custom widget created to complement the standard SWT widget set when used in the context of UI Forms. Hyperlink is a selectable text control that acts like a Web browser hyperlink:

	Hyperlink link = toolkit.createHyperlink(form.getBody(), "Click here.",
				SWT.WRAP);
		link.addHyperlinkListener(new HyperlinkAdapter() {
			public void linkActivated(HyperlinkEvent e) {
				System.out.println("Link activated!");
			}
		});
		link.setText("A sample link");

Hyperlinks fire HyperlinkEvent objects when users interact with them. By adding a HyperlinkListener, clients can capture when the mouse enters and exits the link, as well as activates it (either by mouse click or by 'Enter' key).

Hyperlinks created by the form toolkit are automatically inserted into a hyperlink group. HyperlinkGroup manages common hyperlink properties like normal and hover foreground color, underline style etc. for all the links that belong to the group.

Since many hyperlinks are combined with a small image, UI Forms provide a subclass called ImageHyperlink that add the ability to combine text and image in one clickable control. This class can also be used when a hyperlink image (without text) is needed. If image is not set, ImageHyperlink behaves identically to Hyperlink.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire