|
Eclipse Platform Release 3.0 |
||||||||||
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
This is the base class for custom hyperlink widget. It is responsible for processing mouse and keyboard events, and converting them into unified hyperlink events. Subclasses are responsible for rendering the hyperlink in the client area.
Field Summary | |
protected int |
marginHeight
Amount of the margin height around the hyperlink (default is 1). |
protected int |
marginWidth
Amount of the margin width around the hyperlink (default is 1). |
Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
Constructor Summary | |
AbstractHyperlink(Composite parent,
int style)
Creates a new hyperlink in the provided parent. |
Method Summary | |
void |
addHyperlinkListener(IHyperlinkListener listener)
Adds the event listener to this hyperlink. |
Object |
getHref()
Returns the object associated with this hyperlink. |
boolean |
getSelection()
Returns the selection state of the control. |
String |
getText()
Returns the textual representation of this hyperlink suitable for showing in tool tips or on the status line. |
protected void |
handleActivate(Event e)
Called when hyperlink has been activated. |
protected void |
handleEnter(Event e)
Called when hyperlink is entered. |
protected void |
handleExit(Event e)
Called when hyperlink is exited. |
protected void |
paint(PaintEvent e)
Paints the control as a reaction to the provided paint event. |
protected abstract void |
paintHyperlink(GC gc)
Paints the hyperlink as a reaction to the provided paint event. |
void |
removeHyperlinkListener(IHyperlinkListener listener)
Removes the event listener from this hyperlink. |
void |
setHref(Object href)
Sets the object associated with this hyperlink. |
Methods inherited from class org.eclipse.swt.widgets.Canvas |
getCaret, scroll, setCaret, setFont |
Methods inherited from class org.eclipse.swt.widgets.Composite |
checkSubclass, computeSize, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, 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, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int marginWidth
protected int marginHeight
Constructor Detail |
public AbstractHyperlink(Composite parent, int style)
parent
- the control parentstyle
- the widget styleMethod Detail |
public void addHyperlinkListener(IHyperlinkListener listener)
listener
- the event listener to addpublic void removeHyperlinkListener(IHyperlinkListener listener)
listener
- the event listener to removepublic boolean getSelection()
true
if the widget has focus, false
otherwise.protected void handleEnter(Event e)
protected void handleExit(Event e)
protected void handleActivate(Event e)
public void setHref(Object href)
href
- the hyperlink object referencepublic Object getHref()
setHref(java.lang.Object)
public String getText()
protected abstract void paintHyperlink(GC gc)
protected void paint(PaintEvent e)
e
- the paint event
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.