Class DefaultHyperlinkPresenter

    • Field Detail


        public static final String HYPERLINK_COLOR_SYSTEM_DEFAULT
        A named preference that holds the preference whether to use the native link color.

        The preference value is of type Boolean.

        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultHyperlinkPresenter

        public DefaultHyperlinkPresenter​(IPreferenceStore store)
        Creates a new default hyperlink presenter which uses HYPERLINK_COLOR to read the color from the given preference store.
        store - the preference store
      • DefaultHyperlinkPresenter

        public DefaultHyperlinkPresenter​(Color color)
        Creates a new default hyperlink presenter.
        color - the hyperlink color or null if the existing text color should be preserved; to be disposed by the caller
      • DefaultHyperlinkPresenter

        public DefaultHyperlinkPresenter​(RGB color)
        Creates a new default hyperlink presenter.
        color - the hyperlink color or null if the existing text color should be preserved
    • Method Detail

      • canShowMultipleHyperlinks

        public boolean canShowMultipleHyperlinks()
        Description copied from interface: IHyperlinkPresenter
        Tells whether this presenter is able to handle more than one hyperlink.
        Specified by:
        canShowMultipleHyperlinks in interface IHyperlinkPresenter
        true if this presenter can handle more than one hyperlink
      • showHyperlinks

        public void showHyperlinks​(IHyperlink[] hyperlinks)
        Description copied from interface: IHyperlinkPresenter
        Tells this hyperlink presenter to show the given hyperlinks on the installed text viewer.
        Specified by:
        showHyperlinks in interface IHyperlinkPresenter
        hyperlinks - the hyperlinks to show
      • canHideHyperlinks

        public boolean canHideHyperlinks()
        Tells whether the currently shown hyperlinks can be hidden.
        Specified by:
        canHideHyperlinks in interface IHyperlinkPresenterExtension
        true if the hyperlink manager can hide the current hyperlinks
      • setColor

        public void setColor​(Color color)
        Sets the hyperlink foreground color.
        color - the hyperlink foreground color or null if the existing text color should be preserved
      • applyTextPresentation

        public void applyTextPresentation​(TextPresentation textPresentation)
        Description copied from interface: ITextPresentationListener
        This method is called when a text presentation is about to be applied to the text viewer. The receiver is allowed to change the text presentation during that call.
        Specified by:
        applyTextPresentation in interface ITextPresentationListener
        textPresentation - the current text presentation
      • documentChanged

        public void documentChanged​(DocumentEvent event)
        Description copied from interface: IDocumentListener
        The manipulation described by the document event has been performed.
        Specified by:
        documentChanged in interface IDocumentListener
        event - the document event describing the document change
      • inputDocumentChanged

        public void inputDocumentChanged​(IDocument oldInput,
                                         IDocument newInput)
        Description copied from interface: ITextInputListener
        Called after the input document has been replaced.
        Specified by:
        inputDocumentChanged in interface ITextInputListener
        oldInput - the text viewer's previous input document
        newInput - the text viewer's new input document
      • propertyChange

        public void propertyChange​(PropertyChangeEvent event)
        Description copied from interface: IPropertyChangeListener
        Notification that a property has changed.

        This method gets called when the observed object fires a property change event.

        Specified by:
        propertyChange in interface IPropertyChangeListener
        event - the property change event object describing which property changed and how