|
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)
|
String |
getText()
Returns the current hyperlink text. |
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(String text)
Sets the text of this hyperlink. |
void |
setToolTipText(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 String |
shortenText(GC gc,
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 styleMethod 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 Composite
wHint
- 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 String getText()
getText
in class AbstractHyperlink
public String getToolTipText()
Control
getToolTipText
in class Control
public void setToolTipText(String string)
Control
The 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 Control
string
- the new tool tip text (or null)public void setText(String text)
text
- the hyperlink textprotected void paintHyperlink(GC gc)
paintHyperlink
in class AbstractHyperlink
gc
- graphic contextprotected void paintText(GC gc, Rectangle bounds)
gc
- graphic contextbounds
- the bounding rectangle in which to paint the textprotected String shortenText(GC gc, 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.