KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > hyperlink > IHyperlink


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.text.hyperlink;
12
13 import org.eclipse.jface.text.IRegion;
14
15
16 /**
17  * Represents a hyperlink.
18  * <p>
19  * Clients may implement this interface.
20  * </p>
21  *
22  * @since 3.1
23  */

24 public interface IHyperlink {
25
26     /**
27      * The region covered by this type of hyperlink.
28      *
29      * @return the hyperlink region
30      */

31     IRegion getHyperlinkRegion();
32
33     /**
34      * Optional label for this type of hyperlink.
35      * <p>
36      * This type label can be used by {@link IHyperlinkPresenter}s
37      * which show several hyperlinks at once.
38      * </p>
39      *
40      * @return the type label or <code>null</code> if none
41      */

42     String JavaDoc getTypeLabel();
43
44     /**
45      * Optional text for this hyperlink.
46      * <p>
47      * This can be used in situations where there are
48      * several targets for the same hyperlink location.
49      * </p>
50      *
51      * @return the text or <code>null</code> if none
52      */

53     String JavaDoc getHyperlinkText();
54
55     /**
56      * Opens the given hyperlink.
57      */

58     void open();
59 }
60
Popular Tags