Eclipse Platform
2.1

org.eclipse.ui.texteditor
Class AnnotationPreference

java.lang.Object
  |
  +--org.eclipse.ui.texteditor.AnnotationPreference

public class AnnotationPreference
extends Object

An annotation preference provides all the information required for handing the preferences for the presentation of annotations of a specified type. The provided information covers:

Since:
2.1

Constructor Summary
AnnotationPreference()
          Creates a new uninitialized annotation preference.
AnnotationPreference(Object annotationType, String colorKey, String textKey, String overviewRulerKey, int presentationLayer)
          Creates a new annotation preference for the given annotation type.
 
Method Summary
 boolean contributesToHeader()
          Returns whether the annotation type contributes to the header of the overview ruler.
 Object getAnnotationType()
          Returns the annotation type.
 String getColorPreferenceKey()
          Returns the preference key for the presentation color.
 RGB getColorPreferenceValue()
          Returns the default presentation color.
 String getMarkerType()
          Returns the marker type.
 String getOverviewRulerPreferenceKey()
          Returns the preference key for the visibility in the overview ruler.
 boolean getOverviewRulerPreferenceValue()
          Returns the default visibility in the overview ruler.
 String getPreferenceLabel()
          Returns the presentation string for this annotation type.
 int getPresentationLayer()
          Returns the presentation layer.
 int getSeverity()
          Returns the marker severity.
 String getTextPreferenceKey()
          Returns the preference key for the visibility inside text.
 boolean getTextPreferenceValue()
          Returns the default visibility inside text.
 boolean isPreferenceKey(String key)
          Returns whether the given string is a preference key.
 void setAnnotationType(Object annotationType)
          Sets the annotation type.
 void setColorPreferenceKey(String colorKey)
          Sets the preference key for the presentation color.
 void setColorPreferenceValue(RGB colorValue)
          Sets the default presentation color.
 void setContributesToHeader(boolean contributesToHeader)
          Sets whether the annotation type contributes to the overview ruler's header.
 void setMarkerType(String markerType)
          Sets the marker type.
 void setOverviewRulerPreferenceKey(String overviewRulerKey)
          Sets the preference key for the visibility in the overview ruler.
 void setOverviewRulerPreferenceValue(boolean overviewRulerValue)
          Sets the default visibility in the overview ruler.
 void setPreferenceLabel(String label)
          Sets the presentation label of this annotation type.
 void setPresentationLayer(int presentationLayer)
          Sets the presentation layer.
 void setSeverity(int severity)
          Sets the marker serverity.
 void setTextPreferenceKey(String textKey)
          Sets the preference key for the visibility inside text.
 void setTextPreferenceValue(boolean textValue)
          Sets the default visibility inside text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationPreference

public AnnotationPreference()
Creates a new uninitialized annotation preference.

AnnotationPreference

public AnnotationPreference(Object annotationType,
                            String colorKey,
                            String textKey,
                            String overviewRulerKey,
                            int presentationLayer)
Creates a new annotation preference for the given annotation type.
Parameters:
annotationType - the annotation type
colorKey - the preference key for the presentation color
textKey - the preference key for the visibility inside text
overviewRulerKey - the preference key for the visibility in the overview ruler
presentationLayer - the presentation layer
Method Detail

isPreferenceKey

public boolean isPreferenceKey(String key)
Returns whether the given string is a preference key.
Parameters:
key - the string to test
Returns:
true if the string is a preference key

getAnnotationType

public Object getAnnotationType()
Returns the annotation type.
Returns:
the annotation type

getMarkerType

public String getMarkerType()
Returns the marker type.
Returns:
the marker type

getColorPreferenceKey

public String getColorPreferenceKey()
Returns the preference key for the presentation color.
Returns:
the preference key for the presentation color

getColorPreferenceValue

public RGB getColorPreferenceValue()
Returns the default presentation color.
Returns:
the default presentation color.

getPreferenceLabel

public String getPreferenceLabel()
Returns the presentation string for this annotation type.
Returns:
the presentation string for this annotation type

getOverviewRulerPreferenceKey

public String getOverviewRulerPreferenceKey()
Returns the preference key for the visibility in the overview ruler.
Returns:
the preference key for the visibility in the overview ruler

getOverviewRulerPreferenceValue

public boolean getOverviewRulerPreferenceValue()
Returns the default visibility in the overview ruler.
Returns:
the default visibility in the overview ruler

getPresentationLayer

public int getPresentationLayer()
Returns the presentation layer.
Returns:
the presentation layer

getSeverity

public int getSeverity()
Returns the marker severity.
Returns:
the marker severity

getTextPreferenceKey

public String getTextPreferenceKey()
Returns the preference key for the visibility inside text.
Returns:
the preference key for the visibility inside text

getTextPreferenceValue

public boolean getTextPreferenceValue()
Returns the default visibility inside text.
Returns:
the default visibility inside text

contributesToHeader

public boolean contributesToHeader()
Returns whether the annotation type contributes to the header of the overview ruler.
Returns:
true if the annotation type contributes to the header of the overview ruler

setAnnotationType

public void setAnnotationType(Object annotationType)
Sets the annotation type.
Parameters:
annotationType - the annotation type

setMarkerType

public void setMarkerType(String markerType)
Sets the marker type.
Parameters:
markerType - the marker type

setColorPreferenceKey

public void setColorPreferenceKey(String colorKey)
Sets the preference key for the presentation color.
Parameters:
colorKey - the preference key

setColorPreferenceValue

public void setColorPreferenceValue(RGB colorValue)
Sets the default presentation color.
Parameters:
colorValue - the default color

setPreferenceLabel

public void setPreferenceLabel(String label)
Sets the presentation label of this annotation type.
Parameters:
label - the presentation label

setOverviewRulerPreferenceKey

public void setOverviewRulerPreferenceKey(String overviewRulerKey)
Sets the preference key for the visibility in the overview ruler.
Parameters:
overviewRulerKey - the preference key

setOverviewRulerPreferenceValue

public void setOverviewRulerPreferenceValue(boolean overviewRulerValue)
Sets the default visibility in the overview ruler.
Parameters:
overviewRulerValue - true if visible by default, false otherwise

setPresentationLayer

public void setPresentationLayer(int presentationLayer)
Sets the presentation layer.
Parameters:
presentationLayer - the presentation layer

setSeverity

public void setSeverity(int severity)
Sets the marker serverity.
Parameters:
severity - the marker severity

setTextPreferenceKey

public void setTextPreferenceKey(String textKey)
Sets the preference key for the visibility inside text.
Parameters:
overviewRulerKey - the preference key

setTextPreferenceValue

public void setTextPreferenceValue(boolean textValue)
Sets the default visibility inside text.
Parameters:
overviewRulerValue - true if visible by default, false otherwise

setContributesToHeader

public void setContributesToHeader(boolean contributesToHeader)
Sets whether the annotation type contributes to the overview ruler's header.
Parameters:
contributesToHeader - true if in header, false otherwise

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.