Package org.eclipse.jface.text.hyperlink
Class MultipleHyperlinkPresenter
- java.lang.Object
-
- org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
-
- org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter
-
- All Implemented Interfaces:
EventListener,IHyperlinkPresenter,IHyperlinkPresenterExtension,IHyperlinkPresenterExtension2,IDocumentListener,ITextInputListener,ITextPresentationListener,IPropertyChangeListener
public class MultipleHyperlinkPresenter extends DefaultHyperlinkPresenter implements IHyperlinkPresenterExtension2
A hyperlink presenter capable of showing multiple hyperlinks in a hover.- Since:
- 3.4
-
-
Field Summary
-
Fields inherited from class org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
HYPERLINK_COLOR, HYPERLINK_COLOR_SYSTEM_DEFAULT
-
-
Constructor Summary
Constructors Constructor Description MultipleHyperlinkPresenter(IPreferenceStore store)Creates a new multiple hyperlink presenter which usesDefaultHyperlinkPresenter.HYPERLINK_COLORto read the color from the given preference store.MultipleHyperlinkPresenter(RGB color)Creates a new multiple hyperlink presenter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHideHyperlinks()Tells whether the currently shown hyperlinks can be hidden.booleancanShowMultipleHyperlinks()Tells whether this presenter is able to handle more than one hyperlink.voidhideHyperlinks()Tells this hyperlink presenter to hide the hyperlinks requested to be shown byIHyperlinkPresenter.showHyperlinks(IHyperlink[]).voidinstall(ITextViewer viewer)Installs this hyperlink presenter on the given text viewer.voidshowHyperlinks(IHyperlink[] hyperlinks)Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer.voidshowHyperlinks(IHyperlink[] activeHyperlinks, boolean takesFocusWhenVisible)Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer and specifies whether or not the control takes focus when visible.voiduninstall()Uninstalls this hyperlink presenter.-
Methods inherited from class org.eclipse.jface.text.hyperlink.DefaultHyperlinkPresenter
applyTextPresentation, documentAboutToBeChanged, documentChanged, inputDocumentAboutToBeChanged, inputDocumentChanged, propertyChange, setColor
-
-
-
-
Constructor Detail
-
MultipleHyperlinkPresenter
public MultipleHyperlinkPresenter(IPreferenceStore store)
Creates a new multiple hyperlink presenter which usesDefaultHyperlinkPresenter.HYPERLINK_COLORto read the color from the given preference store.- Parameters:
store- the preference store
-
MultipleHyperlinkPresenter
public MultipleHyperlinkPresenter(RGB color)
Creates a new multiple hyperlink presenter.- Parameters:
color- the hyperlink color, to be disposed by the caller
-
-
Method Detail
-
install
public void install(ITextViewer viewer)
Description copied from interface:IHyperlinkPresenterInstalls this hyperlink presenter on the given text viewer.- Specified by:
installin interfaceIHyperlinkPresenter- Overrides:
installin classDefaultHyperlinkPresenter- Parameters:
viewer- the text viewer
-
uninstall
public void uninstall()
Description copied from interface:IHyperlinkPresenterUninstalls this hyperlink presenter.- Specified by:
uninstallin interfaceIHyperlinkPresenter- Overrides:
uninstallin classDefaultHyperlinkPresenter
-
canShowMultipleHyperlinks
public boolean canShowMultipleHyperlinks()
Description copied from interface:IHyperlinkPresenterTells whether this presenter is able to handle more than one hyperlink.- Specified by:
canShowMultipleHyperlinksin interfaceIHyperlinkPresenter- Overrides:
canShowMultipleHyperlinksin classDefaultHyperlinkPresenter- Returns:
trueif this presenter can handle more than one hyperlink
-
canHideHyperlinks
public boolean canHideHyperlinks()
Description copied from class:DefaultHyperlinkPresenterTells whether the currently shown hyperlinks can be hidden.- Specified by:
canHideHyperlinksin interfaceIHyperlinkPresenterExtension- Overrides:
canHideHyperlinksin classDefaultHyperlinkPresenter- Returns:
trueif the hyperlink manager can hide the current hyperlinks
-
hideHyperlinks
public void hideHyperlinks()
Description copied from interface:IHyperlinkPresenterTells this hyperlink presenter to hide the hyperlinks requested to be shown byIHyperlinkPresenter.showHyperlinks(IHyperlink[]).- Specified by:
hideHyperlinksin interfaceIHyperlinkPresenter- Overrides:
hideHyperlinksin classDefaultHyperlinkPresenter
-
showHyperlinks
public void showHyperlinks(IHyperlink[] hyperlinks)
Description copied from interface:IHyperlinkPresenterTells this hyperlink presenter to show the given hyperlinks on the installed text viewer.- Specified by:
showHyperlinksin interfaceIHyperlinkPresenter- Overrides:
showHyperlinksin classDefaultHyperlinkPresenter- Parameters:
hyperlinks- the hyperlinks to show
-
showHyperlinks
public void showHyperlinks(IHyperlink[] activeHyperlinks, boolean takesFocusWhenVisible)
Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer and specifies whether or not the control takes focus when visible.- Specified by:
showHyperlinksin interfaceIHyperlinkPresenterExtension2- Parameters:
activeHyperlinks- the hyperlinks to showtakesFocusWhenVisible-trueif the control takes the focus when visible,falseotherwise. Will be ignored if there is only one hyperlink to show.- Since:
- 3.7
-
-