Package org.apache.uima.caseditor.editor
Class AnnotationStyle
java.lang.Object
org.apache.uima.caseditor.editor.AnnotationStyle
The
AnnotationStyle describes the look of an certain annotation type in the
AnnotationEditor.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe styles that can be used to draw an annotation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ColorThe default drawing color.static final intThe Constant DEFAULT_LAYER.static final AnnotationStyle.StyleThe defaultDrawingStyle. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationStyle(String annotation, AnnotationStyle.Style style, Color color, int layer) Instantiates a new annotation style.AnnotationStyle(String annotation, AnnotationStyle.Style style, Color color, int layer, String configuration) Initialize a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares if current is equal to another object.Retrieves the annotation type.static AnnotationStylegetAnnotationStyleFromStore(org.eclipse.jface.preference.IPreferenceStore store, String typeName) Retrieves an annotation style from the provided preference store.getColor()Retrieves the color of the annotation.Gets the configuration.intgetLayer()Retrieves the drawing layer.getStyle()Retrieves the drawing style of the annotation.inthashCode()Generates a hash code using of toString().static voidputAnnotatationStyleToStore(org.eclipse.jface.preference.IPreferenceStore store, AnnotationStyle style) Note: This method must not be called by user code!toString()Represents this object as string.
-
Field Details
-
DEFAULT_STYLE
The defaultDrawingStyle. -
DEFAULT_COLOR
The default drawing color. -
DEFAULT_LAYER
public static final int DEFAULT_LAYERThe 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 typestyle- - the drawing stylecolor- - annotation colorlayer- - drawing layerconfiguration- the configuration string for the style or null if no configuration
-
AnnotationStyle
Instantiates a new annotation style.- Parameters:
annotation- the annotationstyle- the stylecolor- the colorlayer- the layer
-
-
Method Details
-
getAnnotation
Retrieves the annotation type.- Returns:
- - annotation type.
-
getStyle
Retrieves the drawing style of the annotation.- Returns:
- - annotation drawing style
-
getColor
Retrieves the color of the annotation.- Returns:
- - annotation color
-
getLayer
public int getLayer()Retrieves the drawing layer.- Returns:
- the drawing layer
-
getConfiguration
Gets the configuration.- Returns:
- the configuration
-
equals
Compares if current is equal to another object. -
hashCode
public int hashCode()Generates a hash code using of toString(). -
toString
Represents this object as 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 storestyle- 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 storetypeName- the type name- Returns:
- an annotation style from the provided preference store
-