|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.hyperlink.HyperlinkManager
Default implementation of a hyperlink manager.
Field Summary | |
---|---|
static org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY |
ALL
All detected hyperlinks from all detectors are collected and passed to the hyperlink presenter. |
static org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY |
FIRST
The first detected hyperlink is passed to the hyperlink presenter and no further detector is consulted. |
static org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY |
LONGEST_REGION_ALL
All detected hyperlinks from all detectors are collected and all those with the longest region are passed to the hyperlink presenter. |
static org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY |
LONGEST_REGION_FIRST
All detected hyperlinks from all detectors are collected and form all those with the longest region only the first one is passed to the hyperlink presenter. |
Constructor Summary | |
---|---|
HyperlinkManager(org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY detectionStrategy)
Creates a new hyperlink manager. |
Method Summary | |
---|---|
protected int |
computeLongestHyperlinkLength(List hyperlinks)
|
protected void |
deactivate()
|
protected IHyperlink[] |
findHyperlinks()
|
void |
focusGained(FocusEvent e)
Sent when a control gets focus. |
void |
focusLost(FocusEvent event)
Sent when a control loses focus. |
protected int |
getCurrentTextOffset()
|
void |
install(ITextViewer textViewer,
IHyperlinkPresenter hyperlinkPresenter,
IHyperlinkDetector[] hyperlinkDetectors,
int eventStateMask)
Installs this hyperlink manager with the given arguments. |
void |
keyPressed(KeyEvent event)
Sent when a key is pressed on the system keyboard. |
void |
keyReleased(KeyEvent event)
Sent when a key is released on the system keyboard. |
void |
mouseDoubleClick(MouseEvent e)
Sent when a mouse button is pressed twice within the (operating system specified) double click period. |
void |
mouseDown(MouseEvent event)
Sent when a mouse button is pressed. |
void |
mouseMove(MouseEvent event)
Sent when the mouse moves. |
void |
mouseUp(MouseEvent e)
Sent when a mouse button is released. |
void |
setHyperlinkDetectors(IHyperlinkDetector[] hyperlinkDetectors)
Sets the hyperlink detectors for this hyperlink manager. |
void |
setHyperlinkStateMask(int eventStateMask)
Sets the SWT event state mask which in combination with the left mouse button triggers the hyperlink mode. |
void |
uninstall()
Uninstalls this hyperlink manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY FIRST
public static final org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY ALL
This strategy is only allowed if IHyperlinkPresenter.canShowMultipleHyperlinks()
returns true
.
public static final org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY LONGEST_REGION_ALL
This strategy is only allowed if IHyperlinkPresenter.canShowMultipleHyperlinks()
returns true
.
public static final org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY LONGEST_REGION_FIRST
Constructor Detail |
public HyperlinkManager(org.eclipse.jface.text.hyperlink.HyperlinkManager.DETECTION_STRATEGY detectionStrategy)
detectionStrategy
- the detection strategy one of {ALL
, FIRST
, LONGEST_REGION_ALL
, LONGEST_REGION_FIRST
}Method Detail |
public void install(ITextViewer textViewer, IHyperlinkPresenter hyperlinkPresenter, IHyperlinkDetector[] hyperlinkDetectors, int eventStateMask)
textViewer
- the text viewerhyperlinkPresenter
- the hyperlink presenterhyperlinkDetectors
- the array of hyperlink detectors, must not be emptyeventStateMask
- the SWT event state mask to activate hyperlink modepublic void setHyperlinkDetectors(IHyperlinkDetector[] hyperlinkDetectors)
It is allowed to call this method after this hyperlink manger has been installed.
hyperlinkDetectors
- and array of hyperlink detectors, must not be emptypublic void setHyperlinkStateMask(int eventStateMask)
It is allowed to call this method after this hyperlink manger has been installed.
eventStateMask
- the SWT event state mask to activate hyperlink modepublic void uninstall()
protected void deactivate()
protected IHyperlink[] findHyperlinks()
protected int computeLongestHyperlinkLength(List hyperlinks)
protected int getCurrentTextOffset()
public void keyPressed(KeyEvent event)
KeyListener
keyPressed
in interface KeyListener
event
- an event containing information about the key presspublic void keyReleased(KeyEvent event)
KeyListener
keyReleased
in interface KeyListener
event
- an event containing information about the key releasepublic void mouseDoubleClick(MouseEvent e)
MouseListener
mouseDoubleClick
in interface MouseListener
e
- an event containing information about the mouse double clickDisplay.getDoubleClickTime()
public void mouseDown(MouseEvent event)
MouseListener
mouseDown
in interface MouseListener
event
- an event containing information about the mouse button presspublic void mouseUp(MouseEvent e)
MouseListener
mouseUp
in interface MouseListener
e
- an event containing information about the mouse button releasepublic void mouseMove(MouseEvent event)
MouseMoveListener
mouseMove
in interface MouseMoveListener
event
- an event containing information about the mouse movepublic void focusGained(FocusEvent e)
FocusListener
focusGained
in interface FocusListener
e
- an event containing information about the focus changepublic void focusLost(FocusEvent event)
FocusListener
focusLost
in interface FocusListener
event
- an event containing information about the focus change
|
Eclipse Platform Release 3.1 |
|||||||||||
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, 2005. All rights reserved.