Class AnnotationStyle

java.lang.Object
org.apache.uima.caseditor.editor.AnnotationStyle

public final class AnnotationStyle extends Object
The AnnotationStyle describes the look of an certain annotation type in the AnnotationEditor.
  • Field Details

    • DEFAULT_STYLE

      public static final AnnotationStyle.Style DEFAULT_STYLE
      The default DrawingStyle.
    • DEFAULT_COLOR

      public static final Color DEFAULT_COLOR
      The default drawing color.
    • DEFAULT_LAYER

      public static final int DEFAULT_LAYER
      The Constant DEFAULT_LAYER.
      See Also:
  • Constructor Details

    • AnnotationStyle

      public AnnotationStyle(String annotation, AnnotationStyle.Style style, Color color, int layer, String configuration)
      Initialize a new instance.
      Parameters:
      annotation - - the annotation type
      style - - the drawing style
      color - - annotation color
      layer - - drawing layer
      configuration - the configuration string for the style or null if no configuration
    • AnnotationStyle

      public AnnotationStyle(String annotation, AnnotationStyle.Style style, Color color, int layer)
      Instantiates a new annotation style.
      Parameters:
      annotation - the annotation
      style - the style
      color - the color
      layer - the layer
  • Method Details

    • getAnnotation

      public String getAnnotation()
      Retrieves the annotation type.
      Returns:
      - annotation type.
    • getStyle

      public AnnotationStyle.Style getStyle()
      Retrieves the drawing style of the annotation.
      Returns:
      - annotation drawing style
    • getColor

      public Color getColor()
      Retrieves the color of the annotation.
      Returns:
      - annotation color
    • getLayer

      public int getLayer()
      Retrieves the drawing layer.
      Returns:
      the drawing layer
    • getConfiguration

      public String getConfiguration()
      Gets the configuration.
      Returns:
      the configuration
    • equals

      public boolean equals(Object object)
      Compares if current is equal to another object.
      Overrides:
      equals in class Object
      Parameters:
      object - the object
      Returns:
      true, if successful
    • hashCode

      public int hashCode()
      Generates a hash code using of toString().
      Overrides:
      hashCode in class Object
      Returns:
      the int
    • toString

      public String toString()
      Represents this object as string.
      Overrides:
      toString in class Object
      Returns:
      the string
    • putAnnotatationStyleToStore

      public static void putAnnotatationStyleToStore(org.eclipse.jface.preference.IPreferenceStore store, AnnotationStyle style)
      Note: This method must not be called by user code! It is only public because the migration code in the Cas Editor Ide Plugin needs to access this method.
      Parameters:
      store - the store
      style - the style
    • getAnnotationStyleFromStore

      public static AnnotationStyle getAnnotationStyleFromStore(org.eclipse.jface.preference.IPreferenceStore store, String typeName)
      Retrieves an annotation style from the provided preference store.

      Note: This method must not be called by user code! It is only public because the migration code in the Cas Editor Ide Plugin needs to access this method.

      Parameters:
      store - the store
      typeName - the type name
      Returns:
      an annotation style from the provided preference store