Class InvalidAnnotatedStringHandler

  • All Implemented Interfaces:
    AnnotatedStringHandler, ExtensionPoint

    public class InvalidAnnotatedStringHandler
    extends java.lang.Object
    implements AnnotatedStringHandler
    An annotated string handler that is used to display an error message string when there is a problem creating an annotated string.
    • Constructor Detail

      • InvalidAnnotatedStringHandler

        public InvalidAnnotatedStringHandler()
      • InvalidAnnotatedStringHandler

        public InvalidAnnotatedStringHandler​(java.lang.String errorText)
    • Method Detail

      • createAnnotatedString

        public AttributedString createAnnotatedString​(AttributedString prototypeString,
                                                      java.lang.String[] text,
                                                      Program program)
                                               throws AnnotationException
        Description copied from interface: AnnotatedStringHandler
        Creates an FieldElement based upon the give array of Strings. The first String in the list is expected to be the annotation tag used to create the annotation. At the very least the array is expected to be comprised of two elements, the annotation and some data. Extra data may be provided as needed by implementing classes.
        Specified by:
        createAnnotatedString in interface AnnotatedStringHandler
        prototypeString - The prototype FieldElement that dictates the attributes for the newly created string. Implementations may change attributes as needed.
        text - An array of Strings used to create the FieldElement being returned.
        program - The program with which the returned string is associated.
        An AnnotatedTextFieldElement that will be used to render the given text.
        AnnotationException - if the given text data does not fit the expected format for the given handler implementation.
        See Also:
        AnnotatedStringHandler#createAnnotatedString(AttributedString, String[], ServiceProvider)
      • handleMouseClick

        public boolean handleMouseClick​(java.lang.String[] annotationParts,
                                        Navigatable navigatable,
                                        ServiceProvider serviceProvider)
        Description copied from interface: AnnotatedStringHandler
        A method that is notified when an annotation is clicked. Returns true if this annotation handles the click; return false if this annotation does not do anything with the click.
        Specified by:
        handleMouseClick in interface AnnotatedStringHandler
        annotationParts - The constituent parts of the annotation
        navigatable - The location in the program that was clicked.
        serviceProvider - A service provider for needed services.
        true if this annotation handles the click; return false if this annotation does not do anything with the click.