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
Modifier and TypeClassDescriptionstatic enum
The styles that can be used to draw an annotation. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Color
The default drawing color.static final int
The Constant DEFAULT_LAYER.static final AnnotationStyle.Style
The defaultDrawingStyle
. -
Constructor Summary
ConstructorDescriptionAnnotationStyle
(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 TypeMethodDescriptionboolean
Compares if current is equal to another object.Retrieves the annotation type.static AnnotationStyle
getAnnotationStyleFromStore
(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.int
getLayer()
Retrieves the drawing layer.getStyle()
Retrieves the drawing style of the annotation.int
hashCode()
Generates a hash code using of toString().static void
putAnnotatationStyleToStore
(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
-