org.netbeans.modules.editor.lib/1 1.44.0 9

org.netbeans.editor
Class AnnotationTypes

java.lang.Object
  extended by org.netbeans.editor.AnnotationTypes

public class AnnotationTypes
extends Object

Registry of all annotation types. This is singleton and it also keeps the settings whether the annotation types which are not active are drawn on the background, whther the combining of annotations is turned on or off etc. These settings are shared by all views.

Since:
08/2001

Nested Class Summary
static interface AnnotationTypes.Loader
          Loader of annotation types.
 
Field Summary
static String PROP_ANNOTATION_TYPES
          Property which is fired when list of annotation types is changing.
static String PROP_BACKGROUND_DRAWING
          Whether the pasive glyphs are drawn on the background under the text (boolean).
static String PROP_BACKGROUND_GLYPH_ALPHA
          The alpha of the pasive glyphs drawn on the background under the text (int 0..100%).
static String PROP_COMBINE_GLYPHS
          Whether the glyphs should be combined according to combination annotation types (boolean).
static String PROP_GLYPHS_OVER_LINE_NUMBERS
          Whether the glyph icon should be drawn over the line numbers (boolean).
static String PROP_SHOW_GLYPH_GUTTER
          Whether the glyph gutter should be shown after opening editor or not (boolean).
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add listeners on changes of annotation type properties
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Fire property change to registered listeners.
 Iterator<String> getAnnotationTypeNames()
          Iterator of all annotation type names in the system
 int getAnnotationTypeNamesCount()
          Gets count of all annotation type names
 Integer getBackgroundGlyphAlpha()
          Getter for BackgroundGlyphAlpha property
static URL getDefaultGlyphURL()
          Gets Image which represents the default glyph icon.
 AnnotationType getType(String name)
          Returns AnnotationType instance for the given name of the type
static AnnotationTypes getTypes()
          Returns instance of AnnotationTypes singleton.
 int getVisibleAnnotationTypeNamesCount()
          Gets count of all visible annotation type names
 Boolean isBackgroundDrawing()
          Getter for BackgroundDrawing property
 Boolean isCombineGlyphs()
          Getter for CombineGlyphs property
 Boolean isGlyphsOverLineNumbers()
          Getter for GlyphsOverLineNumbers property
 Boolean isShowGlyphGutter()
          Getter for ShowGlyphGutter property
 void registerLoader(AnnotationTypes.Loader l)
          Register loader for loading of annotation types
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove listeners on changes of annotation type properties
 void removeType(String name)
           
 void saveSetting(String settingName, Object value)
          Save change of property
 void saveType(AnnotationType type)
          Save changes in one annotation type
 void setBackgroundDrawing(Boolean drawing)
          Setter for the BackgroundDrawing property
 void setBackgroundGlyphAlpha(int alpha)
          Setter for the BackgroundGlyphAlpha property
 void setCombineGlyphs(Boolean combine)
          Setter for the CombineGlyphs property
 void setGlyphsOverLineNumbers(Boolean over)
          Setter for the GlyphsOverLineNumbers property
 void setShowGlyphGutter(Boolean gutter)
          Setter for the ShowGlyphGutter property
 void setTypes(Map map)
          Initialize the map of all annotation types
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_BACKGROUND_DRAWING

public static final String PROP_BACKGROUND_DRAWING
Whether the pasive glyphs are drawn on the background under the text (boolean).

See Also:
Constant Field Values

PROP_BACKGROUND_GLYPH_ALPHA

public static final String PROP_BACKGROUND_GLYPH_ALPHA
The alpha of the pasive glyphs drawn on the background under the text (int 0..100%).

See Also:
Constant Field Values

PROP_COMBINE_GLYPHS

public static final String PROP_COMBINE_GLYPHS
Whether the glyphs should be combined according to combination annotation types (boolean).

See Also:
Constant Field Values

PROP_GLYPHS_OVER_LINE_NUMBERS

public static final String PROP_GLYPHS_OVER_LINE_NUMBERS
Whether the glyph icon should be drawn over the line numbers (boolean).

See Also:
Constant Field Values

PROP_SHOW_GLYPH_GUTTER

public static final String PROP_SHOW_GLYPH_GUTTER
Whether the glyph gutter should be shown after opening editor or not (boolean). If this value is set to False, the gutter will automatically show after first annotation has been added.

See Also:
Constant Field Values

PROP_ANNOTATION_TYPES

public static final String PROP_ANNOTATION_TYPES
Property which is fired when list of annotation types is changing.

See Also:
Constant Field Values
Method Detail

getTypes

public static AnnotationTypes getTypes()
Returns instance of AnnotationTypes singleton.


getDefaultGlyphURL

public static URL getDefaultGlyphURL()
Gets Image which represents the default glyph icon. It is used in case the annotation type does not have its own icon.


isBackgroundDrawing

public Boolean isBackgroundDrawing()
Getter for BackgroundDrawing property

Returns:
whether the background drawing should be used or not

setBackgroundDrawing

public void setBackgroundDrawing(Boolean drawing)
Setter for the BackgroundDrawing property

Parameters:
drawing - use background drawing or not

isCombineGlyphs

public Boolean isCombineGlyphs()
Getter for CombineGlyphs property

Returns:
whether the combination annotation types are used or not

setCombineGlyphs

public void setCombineGlyphs(Boolean combine)
Setter for the CombineGlyphs property

Parameters:
combine - combine annotation types

getBackgroundGlyphAlpha

public Integer getBackgroundGlyphAlpha()
Getter for BackgroundGlyphAlpha property

Returns:
percentage of alpha (0..100)

setBackgroundGlyphAlpha

public void setBackgroundGlyphAlpha(int alpha)
Setter for the BackgroundGlyphAlpha property

Parameters:
alpha - alpha value in percentage (0..100)

isGlyphsOverLineNumbers

public Boolean isGlyphsOverLineNumbers()
Getter for GlyphsOverLineNumbers property

Returns:
whether the glyph should be drawn over the line numbers

setGlyphsOverLineNumbers

public void setGlyphsOverLineNumbers(Boolean over)
Setter for the GlyphsOverLineNumbers property

Parameters:
over - draw the glyphd over the line numbers

isShowGlyphGutter

public Boolean isShowGlyphGutter()
Getter for ShowGlyphGutter property

Returns:
whether the glyph should be shown after opening editor or not

setShowGlyphGutter

public void setShowGlyphGutter(Boolean gutter)
Setter for the ShowGlyphGutter property

Parameters:
gutter - show gutter

addPropertyChangeListener

public final void addPropertyChangeListener(PropertyChangeListener l)
Add listeners on changes of annotation type properties

Parameters:
l - change listener

removePropertyChangeListener

public final void removePropertyChangeListener(PropertyChangeListener l)
Remove listeners on changes of annotation type properties

Parameters:
l - change listener

firePropertyChange

protected final void firePropertyChange(String propertyName,
                                        Object oldValue,
                                        Object newValue)
Fire property change to registered listeners.


setTypes

public final void setTypes(Map map)
Initialize the map of all annotation types

Parameters:
map - map containing all annotation types

removeType

public final void removeType(String name)

getType

public final AnnotationType getType(String name)
Returns AnnotationType instance for the given name of the type

Parameters:
name - annotation type name
Returns:
instance describing annotation type

getAnnotationTypeNames

public Iterator<String> getAnnotationTypeNames()
Iterator of all annotation type names in the system


getAnnotationTypeNamesCount

public int getAnnotationTypeNamesCount()
Gets count of all annotation type names


getVisibleAnnotationTypeNamesCount

public int getVisibleAnnotationTypeNamesCount()
Gets count of all visible annotation type names


registerLoader

public void registerLoader(AnnotationTypes.Loader l)
Register loader for loading of annotation types


saveType

public void saveType(AnnotationType type)
Save changes in one annotation type


saveSetting

public void saveSetting(String settingName,
                        Object value)
Save change of property


org.netbeans.modules.editor.lib/1 1.44.0 9

Built on November 22 2009.  |  Portions Copyright 1997-2009 Sun Microsystems, Inc. All rights reserved.