|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.lpex.alef.LpexHyperlinkManager
public class LpexHyperlinkManager
Default implementation of a hyperlink manager for an LPEX text viewer.
This class uses Eclipse's HyperlinkManager.DETECTION_STRATEGY definitions.
Constructor Summary | |
---|---|
LpexHyperlinkManager(HyperlinkManager.DETECTION_STRATEGY detectionStrategy)
Creates a new LPEX hyperlink manager. |
Method Summary | |
---|---|
protected int |
computeLongestHyperlinkLength(List<?> hyperlinks)
Computes the length of the longest detected hyperlink. |
protected void |
deactivate()
Deactivates the currently shown hyperlinks. |
protected IHyperlink[] |
findHyperlinks()
Finds hyperlinks at the current offset. |
void |
focusGained(FocusEvent e)
|
void |
focusLost(FocusEvent e)
|
protected int |
getCurrentTextOffset()
Returns the current text offset at the mouse-pointer location. |
void |
handleEvent(Event event)
|
void |
install(LpexTextViewer textViewer,
IHyperlinkPresenter hyperlinkPresenter,
IHyperlinkDetector[] hyperlinkDetectors,
int eventStateMask)
Installs this hyperlink manager with the given arguments in the text viewer. |
void |
keyPressed(KeyEvent event)
|
void |
keyReleased(KeyEvent event)
|
void |
mouseDoubleClick(MouseEvent e)
|
void |
mouseDown(MouseEvent event)
|
void |
mouseMove(MouseEvent event)
|
void |
mouseUp(MouseEvent e)
|
boolean |
openHyperlink()
Opens the hyperlink at the caret location or opens a chooser if more than one hyperlink is available. |
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 mouse button 1 triggers the hyperlink mode. |
void |
textChanged(TextEvent event)
|
void |
uninstall()
Uninstalls this hyperlink manager from the text viewer. |
void |
widgetDisposed(DisposeEvent e)
An LpexWindow of the associated viewer is being disposed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LpexHyperlinkManager(HyperlinkManager.DETECTION_STRATEGY detectionStrategy)
detectionStrategy
- the detection strategy one of
HyperlinkManager.ALL
,
HyperlinkManager.FIRST
,
HyperlinkManager.LONGEST_REGION_ALL
,
HyperlinkManager.LONGEST_REGION_FIRST
Method Detail |
---|
public void install(LpexTextViewer textViewer, IHyperlinkPresenter hyperlinkPresenter, IHyperlinkDetector[] hyperlinkDetectors, int eventStateMask)
textViewer
- an LpexTextViewerhyperlinkPresenter
- 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)
hyperlinkDetectors
- and array of hyperlink detectors, must not be emptypublic void setHyperlinkStateMask(int eventStateMask)
eventStateMask
- the SWT event state mask to activate hyperlink modepublic void uninstall()
protected void deactivate()
protected IHyperlink[] findHyperlinks()
null
if none.protected int computeLongestHyperlinkLength(List<?> hyperlinks)
hyperlinks
-
protected int getCurrentTextOffset()
public void keyPressed(KeyEvent event)
public void keyReleased(KeyEvent event)
public void mouseDoubleClick(MouseEvent e)
public void mouseDown(MouseEvent event)
public void mouseUp(MouseEvent e)
public void mouseMove(MouseEvent event)
public void focusGained(FocusEvent e)
public void focusLost(FocusEvent e)
public void handleEvent(Event event)
public void textChanged(TextEvent event)
public void widgetDisposed(DisposeEvent e)
public boolean openHyperlink()
true
if at least one hyperlink has been found at the caret location, false
otherwise#OPEN_HYPERLINK
|
LPEX 4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |