org.netbeans.modules.editor.lib/3 3.23.0 19

org.netbeans.editor
Class AnnotationType

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

public class AnnotationType
extends Object

Definition of the annotation type. Annotation type is defined by attributes like highlight color, foreground color, glyph icon, etc. Each annotation added to document has reference to the name of the annotation type which defines how the annotation will be drawn.

Since:
07/2001

Nested Class Summary
static class AnnotationType.CombinationMember
          Hepler class describing annotation type and whether all occurences of this type should be absorbed by combination or not.
static class AnnotationType.Severity
           
 
Field Summary
static String PROP_ACTIONS
          Property name for Actions (Action[])
static String PROP_ACTIONS_FOLDER
           
static String PROP_BROWSEABLE
           
static String PROP_COMBINATION_MINIMUM_OPTIONALS
           
static String PROP_COMBINATION_ORDER
           
static String PROP_COMBINATION_TOOLTIP_TEXT_KEY
           
static String PROP_COMBINATIONS
          Property name for Combinations (AnnotationType.CombinationMember[]).
static String PROP_CONTENT_TYPE
          Property name for ContentType (String)
static String PROP_CUSTOM_SIDEBAR_COLOR
           
static String PROP_DESCRIPTION
          Property name for Description (String)
static String PROP_DESCRIPTION_KEY
           
static String PROP_FILE
          Property holding the object which represent the source of this annotation type.
static String PROP_FOREGROUND_COLOR
          Property name for Foreground (Color)
static String PROP_GLYPH_URL
          Property name for Glyph (URL)
static String PROP_HIGHLIGHT_COLOR
          Property name for Highlight (Color)
static String PROP_INHERIT_FOREGROUND_COLOR
          Property name for InheritForegroundColor (Boolean)
static String PROP_LOCALIZING_BUNDLE
           
static String PROP_NAME
          Property name for Name (String)
static String PROP_PRIORITY
           
static String PROP_SEVERITY
           
static String PROP_TOOLTIP_TEXT
          Property name for TooltipText (String)
static String PROP_USE_CUSTOM_SIDEBAR_COLOR
           
static String PROP_USE_HIGHLIGHT_COLOR
          Property name for UseHighlightColor (Boolean)
static String PROP_USE_WAVEUNDERLINE_COLOR
          Property name for UseWaveUnderlineColor (Boolean)
static String PROP_VISIBLE
          Property name for Visible (boolean)
static String PROP_WAVEUNDERLINE_COLOR
          Property name for WaveUnderline (Color)
static String PROP_WHOLE_LINE
          Property name for WholeLine (boolean)
 
Constructor Summary
AnnotationType()
           
 
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.
 Action[] getActions()
          Getter for Actions property
 Coloring getColoring()
          Gets all the colors composed as Coloring
 int getCombinationOrder()
          Getter for CombinationOrder property
 AnnotationType.CombinationMember[] getCombinations()
          Getter for Combinations property
 String getContentType()
          Getter for ContentType property
 Color getCustomSidebarColor()
           
 String getDescription()
          Getter for Description property
 Color getForegroundColor()
          Getter for Foreground property
 URL getGlyph()
          Getter for Glyph property
 Image getGlyphImage()
          Gets Image which represent the glyph.
 Color getHighlight()
          Getter for Highlight property
 int getMinimumOptionals()
          Getter for MinimumOptionals property
 String getName()
          Getter for Name property
 int getPriority()
           
 Object getProp(String prop)
          Gets property for appropriate string value
 AnnotationType.Severity getSeverity()
           
 String getTooltipText()
          Getter for TooltipText property
 Color getWaveUnderlineColor()
          Getter for WaveUnderline property
 boolean isBrowseable()
           
 boolean isDefaultGlyph()
          Whether the annotation type has its own glyph icon or not
 boolean isInheritForegroundColor()
          Getter for InheritForegroundColor property
 boolean isUseCustomSidebarColor()
           
 boolean isUseHighlightColor()
          Getter for UseHighlightColor property
 boolean isUseWaveUnderlineColor()
          Getter for UseWaveUnderlineColor property
 boolean isVisible()
          Getter for Visible property
 boolean isWholeLine()
          Getter for WholeLine property
 void putProp(Object key, Object value)
          Puts property to Map
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove listeners on changes of annotation type properties
 void setActions(Action[] actions)
          Setter for Actions property
 void setBrowseable(boolean browseable)
           
 void setCombinationOrder(int order)
          Setter for the CombinationOrder property
 void setCombinationOrder(String ord)
          Setter for the CombinationOrder property
 void setCombinations(AnnotationType.CombinationMember[] combs)
          Setter for Combinations property
 void setContentType(String ct)
          Setter for the ContentType property
 void setCustomSidebarColor(Color customSidebarColor)
           
 void setDescription(String name)
          Setter for the Description property
 void setForegroundColor(Color foregroundColor)
          Setter for the Foreground property
 void setGlyph(URL glyph)
          Setter for the Glyph property
 void setHighlight(Color highlight)
          Setter for the Highlight property
 void setInheritForegroundColor(boolean inherit)
          Setter for the InheritfForegroundColor property
 void setMinimumOptionals(int min)
           
 void setMinimumOptionals(String m)
           
 void setName(String name)
          Setter for the Name property
 void setPriority(int priority)
           
 void setSeverity(AnnotationType.Severity severity)
           
 void setTooltipText(String text)
          Setter for the TooltipText property
 void setUseCustomSidebarColor(boolean value)
           
 void setUseHighlightColor(boolean use)
          Setter for the UseHighlightColor property
 void setUseWaveUnderlineColor(boolean use)
          Setter for the UseWaveUnderlineColor property
 void setVisible(boolean vis)
          Setter for the Visible property
 void setVisible(String vis)
          Setter for the Visible property
 void setWaveUnderlineColor(Color waveunderline)
          Setter for the WaveUnderline property
 void setWholeLine(boolean wl)
          Setter for the WholeLine property
 void setWholeLine(String wl)
          Setter for the WholeLine property
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_NAME

public static final String PROP_NAME
Property name for Name (String)

See Also:
Constant Field Values

PROP_DESCRIPTION

public static final String PROP_DESCRIPTION
Property name for Description (String)

See Also:
Constant Field Values

PROP_VISIBLE

public static final String PROP_VISIBLE
Property name for Visible (boolean)

See Also:
Constant Field Values

PROP_GLYPH_URL

public static final String PROP_GLYPH_URL
Property name for Glyph (URL)

See Also:
Constant Field Values

PROP_HIGHLIGHT_COLOR

public static final String PROP_HIGHLIGHT_COLOR
Property name for Highlight (Color)

See Also:
Constant Field Values

PROP_FOREGROUND_COLOR

public static final String PROP_FOREGROUND_COLOR
Property name for Foreground (Color)

See Also:
Constant Field Values

PROP_WAVEUNDERLINE_COLOR

public static final String PROP_WAVEUNDERLINE_COLOR
Property name for WaveUnderline (Color)

See Also:
Constant Field Values

PROP_WHOLE_LINE

public static final String PROP_WHOLE_LINE
Property name for WholeLine (boolean)

See Also:
Constant Field Values

PROP_CONTENT_TYPE

public static final String PROP_CONTENT_TYPE
Property name for ContentType (String)

See Also:
Constant Field Values

PROP_ACTIONS

public static final String PROP_ACTIONS
Property name for Actions (Action[])

See Also:
Constant Field Values

PROP_TOOLTIP_TEXT

public static final String PROP_TOOLTIP_TEXT
Property name for TooltipText (String)

See Also:
Constant Field Values

PROP_INHERIT_FOREGROUND_COLOR

public static final String PROP_INHERIT_FOREGROUND_COLOR
Property name for InheritForegroundColor (Boolean)

See Also:
Constant Field Values

PROP_USE_HIGHLIGHT_COLOR

public static final String PROP_USE_HIGHLIGHT_COLOR
Property name for UseHighlightColor (Boolean)

See Also:
Constant Field Values

PROP_USE_WAVEUNDERLINE_COLOR

public static final String PROP_USE_WAVEUNDERLINE_COLOR
Property name for UseWaveUnderlineColor (Boolean)

See Also:
Constant Field Values

PROP_USE_CUSTOM_SIDEBAR_COLOR

public static final String PROP_USE_CUSTOM_SIDEBAR_COLOR
See Also:
Constant Field Values

PROP_CUSTOM_SIDEBAR_COLOR

public static final String PROP_CUSTOM_SIDEBAR_COLOR
See Also:
Constant Field Values

PROP_SEVERITY

public static final String PROP_SEVERITY
See Also:
Constant Field Values

PROP_BROWSEABLE

public static final String PROP_BROWSEABLE
See Also:
Constant Field Values

PROP_PRIORITY

public static final String PROP_PRIORITY
See Also:
Constant Field Values

PROP_COMBINATIONS

public static final String PROP_COMBINATIONS
Property name for Combinations (AnnotationType.CombinationMember[]). If some annotation type has set this property, it means that editor must check if line contains all types which are defined in this array. If it contains, then all this annotation types become hidden and this type is shown instead of them.

See Also:
Constant Field Values

PROP_COMBINATION_ORDER

public static final String PROP_COMBINATION_ORDER
See Also:
Constant Field Values

PROP_COMBINATION_MINIMUM_OPTIONALS

public static final String PROP_COMBINATION_MINIMUM_OPTIONALS
See Also:
Constant Field Values

PROP_FILE

public static final String PROP_FILE
Property holding the object which represent the source of this annotation type. This property is used during the saving of the changes in annotation type.

See Also:
Constant Field Values

PROP_LOCALIZING_BUNDLE

public static final String PROP_LOCALIZING_BUNDLE
See Also:
Constant Field Values

PROP_DESCRIPTION_KEY

public static final String PROP_DESCRIPTION_KEY
See Also:
Constant Field Values

PROP_ACTIONS_FOLDER

public static final String PROP_ACTIONS_FOLDER
See Also:
Constant Field Values

PROP_COMBINATION_TOOLTIP_TEXT_KEY

public static final String PROP_COMBINATION_TOOLTIP_TEXT_KEY
See Also:
Constant Field Values
Constructor Detail

AnnotationType

public AnnotationType()
Method Detail

getGlyph

public URL getGlyph()
Getter for Glyph property

Returns:
URL of the glyph icon

setGlyph

public void setGlyph(URL glyph)
Setter for the Glyph property

Parameters:
glyph - URL to gpylh icon

getGlyphImage

public Image getGlyphImage()
Gets Image which represent the glyph. This method is called only from AWT thead and so it is not necessary to synchronize it.


isDefaultGlyph

public boolean isDefaultGlyph()
Whether the annotation type has its own glyph icon or not


getHighlight

public Color getHighlight()
Getter for Highlight property

Returns:
highlight color

setHighlight

public void setHighlight(Color highlight)
Setter for the Highlight property

Parameters:
highlight - highlight color

isUseHighlightColor

public boolean isUseHighlightColor()
Getter for UseHighlightColor property

Returns:
whether the highlight color should be used or not

setUseHighlightColor

public void setUseHighlightColor(boolean use)
Setter for the UseHighlightColor property

Parameters:
use - use highlight color

getForegroundColor

public Color getForegroundColor()
Getter for Foreground property

Returns:
foreground color

setForegroundColor

public void setForegroundColor(Color foregroundColor)
Setter for the Foreground property

Parameters:
foregroundColor - foreground color

isInheritForegroundColor

public boolean isInheritForegroundColor()
Getter for InheritForegroundColor property

Returns:
whether the foreground color should be inherit or not

setInheritForegroundColor

public void setInheritForegroundColor(boolean inherit)
Setter for the InheritfForegroundColor property

Parameters:
inherit - inherit foreground color

getWaveUnderlineColor

public Color getWaveUnderlineColor()
Getter for WaveUnderline property

Returns:
waveunderline color

setWaveUnderlineColor

public void setWaveUnderlineColor(Color waveunderline)
Setter for the WaveUnderline property

Parameters:
waveunderline - wave underline color

isUseWaveUnderlineColor

public boolean isUseWaveUnderlineColor()
Getter for UseWaveUnderlineColor property

Returns:
whether the waveunderline color should be used or not

setUseWaveUnderlineColor

public void setUseWaveUnderlineColor(boolean use)
Setter for the UseWaveUnderlineColor property

Parameters:
use - use wave underline color

getColoring

public Coloring getColoring()
Gets all the colors composed as Coloring

Returns:
coloring containing all colors

getActions

public Action[] getActions()
Getter for Actions property

Returns:
array of actions

setActions

public void setActions(Action[] actions)
Setter for Actions property


getCombinations

public AnnotationType.CombinationMember[] getCombinations()
Getter for Combinations property

Returns:
array of combinations

setCombinations

public void setCombinations(AnnotationType.CombinationMember[] combs)
Setter for Combinations property


getName

public String getName()
Getter for Name property

Returns:
annotation type name

setName

public void setName(String name)
Setter for the Name property

Parameters:
name - name of the annotation type

getDescription

public String getDescription()
Getter for Description property

Returns:
localized description of the annotation type

setDescription

public void setDescription(String name)
Setter for the Description property

Parameters:
name - localized description of the annotation type

getTooltipText

public String getTooltipText()
Getter for TooltipText property

Returns:
localized TooltipText of the annotation type

setTooltipText

public void setTooltipText(String text)
Setter for the TooltipText property

Parameters:
name - localized TooltipText of the annotation type

getCombinationOrder

public int getCombinationOrder()
Getter for CombinationOrder property

Returns:
order of the annotation type

setCombinationOrder

public void setCombinationOrder(int order)
Setter for the CombinationOrder property

Parameters:
order - order of the annotation type combination

setCombinationOrder

public void setCombinationOrder(String ord)
Setter for the CombinationOrder property

Parameters:
ord - order of the annotation type combination

getMinimumOptionals

public int getMinimumOptionals()
Getter for MinimumOptionals property

Returns:
minimum number of the optional annotation types which must be matched

setMinimumOptionals

public void setMinimumOptionals(int min)

setMinimumOptionals

public void setMinimumOptionals(String m)

isVisible

public boolean isVisible()
Getter for Visible property

Returns:
whether the annoation type is visible or not

setVisible

public void setVisible(boolean vis)
Setter for the Visible property

Parameters:
vis - visibility of the annotation type

setVisible

public void setVisible(String vis)
Setter for the Visible property

Parameters:
vis - visibility of the annotation type

isWholeLine

public boolean isWholeLine()
Getter for WholeLine property

Returns:
whether this annotation type is whole line or not

setWholeLine

public void setWholeLine(boolean wl)
Setter for the WholeLine property

Parameters:
wl - whether the annotation type is whole line or not

setWholeLine

public void setWholeLine(String wl)
Setter for the WholeLine property

Parameters:
wl - whether the annotation type is whole line or not

getContentType

public String getContentType()
Getter for ContentType property

Returns:
list of content types separated by commas

setContentType

public void setContentType(String ct)
Setter for the ContentType property

Parameters:
ct - list of content type separeted by commas

isUseCustomSidebarColor

public boolean isUseCustomSidebarColor()

setUseCustomSidebarColor

public void setUseCustomSidebarColor(boolean value)

getCustomSidebarColor

public Color getCustomSidebarColor()

setCustomSidebarColor

public void setCustomSidebarColor(Color customSidebarColor)

getSeverity

public AnnotationType.Severity getSeverity()

setSeverity

public void setSeverity(AnnotationType.Severity severity)

getPriority

public int getPriority()

setPriority

public void setPriority(int priority)

isBrowseable

public boolean isBrowseable()

setBrowseable

public void setBrowseable(boolean browseable)

getProp

public Object getProp(String prop)
Gets property for appropriate string value


putProp

public void putProp(Object key,
                    Object value)
Puts property to Map


toString

public String toString()
Overrides:
toString in class Object

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.


org.netbeans.modules.editor.lib/3 3.23.0 19

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.