|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
org.eclipse.ui.forms.widgets.AbstractHyperlink
org.eclipse.ui.forms.widgets.Hyperlink
public class Hyperlink
Hyperlink is a concrete implementation of the abstract base class that draws text in the client area. Text can be wrapped and underlined. Hyperlink is typically added to the hyperlink group so that certain properties are managed for all the hyperlinks that belong to it.
Hyperlink can be extended.
HyperlinkGroup| Field Summary |
|---|
| Fields inherited from class org.eclipse.ui.forms.widgets.AbstractHyperlink |
|---|
marginHeight, marginWidth |
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
Hyperlink(Composite parent,
int style)
Creates a new hyperlink control in the provided parent. |
|
| Method Summary | |
|---|---|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Overrides the parent by incorporating the margin. |
protected Point |
computeTextSize(int wHint,
int hHint)
|
java.lang.String |
getText()
Returns the current hyperlink text. |
java.lang.String |
getToolTipText()
Returns the receiver's tool tip text, or null if it has not been set. |
protected void |
initAccessible()
|
boolean |
isUnderlined()
Returns the underline state of the hyperlink. |
protected void |
paintHyperlink(GC gc)
Paints the hyperlink text. |
protected void |
paintText(GC gc,
Rectangle bounds)
Paints the hyperlink text in provided bounding rectangle. |
void |
setText(java.lang.String text)
Sets the text of this hyperlink. |
void |
setToolTipText(java.lang.String string)
Sets the receiver's tool tip text to the argument, which may be null indicating that the default tool tip for the control will be shown. |
void |
setUnderlined(boolean underlined)
Sets the underlined state. |
protected java.lang.String |
shortenText(GC gc,
java.lang.String t,
int width)
|
| Methods inherited from class org.eclipse.ui.forms.widgets.AbstractHyperlink |
|---|
addHyperlinkListener, getHref, getSelection, handleActivate, handleEnter, handleExit, paint, removeHyperlinkListener, setEnabled, setHref |
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
|---|
drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Hyperlink(Composite parent,
int style)
parent - the control parentstyle - the widget style| Method Detail |
|---|
protected void initAccessible()
public void setUnderlined(boolean underlined)
underlined - if true , a line will be drawn below the text for
each wrapped line.public boolean isUnderlined()
public Point computeSize(int wHint,
int hHint,
boolean changed)
computeSize in class CompositewHint - the width hint (can be SWT.DEFAULT)hHint - the height hint (can be SWT.DEFAULT)changed - true if the control's contents have changed, and false otherwise
Layout,
Control.getBorderWidth(),
Control.getBounds(),
Control.getSize(),
Control.pack(boolean),
"computeTrim, getClientArea for controls that implement them"public java.lang.String getText()
getText in class AbstractHyperlinkpublic java.lang.String getToolTipText()
Control
getToolTipText in class Controlpublic void setToolTipText(java.lang.String string)
ControlThe mnemonic indicator (character '&') is not displayed in a tool tip. To display a single '&' in the tool tip, the character '&' can be escaped by doubling it in the string.
setToolTipText in class Controlstring - the new tool tip text (or null)public void setText(java.lang.String text)
text - the hyperlink textprotected void paintHyperlink(GC gc)
paintHyperlink in class AbstractHyperlinkgc - graphic context
protected void paintText(GC gc,
Rectangle bounds)
gc - graphic contextbounds - the bounding rectangle in which to paint the text
protected java.lang.String shortenText(GC gc,
java.lang.String t,
int width)
protected Point computeTextSize(int wHint,
int hHint)
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.