public class DefaultAnnotationManager extends java.lang.Object implements AnnotationManager
AnnotationManager
implementation.FONTCOLOR_ATTRIBUTE_NAME, FONTHEGTH_ATTRIBUTE_NAME, FONTROTATION_ATTRIBUTE_NAME, FONTSTYLE_ATTRIBUTE_NAME, FONTTYPE_ATTRIBUTE_NAME, TEXTVALUE_ATTRIBUTE_NAME
Constructor and Description |
---|
DefaultAnnotationManager() |
Modifier and Type | Method and Description |
---|---|
void |
addFontStyle(java.lang.String fontStyle)
It adds a new value for the font style field.
|
void |
addFontType(java.lang.String fontType)
It adds a new value for the font type field.
|
AnnotationCreationService |
getAnnotationCreationService(FeatureStore featureStore)
Create an instance of a
AnnotationCreationService . |
AnnotationPositionCalculator |
getAnnotationPositionCalculator(java.lang.String name)
It returns an object that can be used to create the point
where the annotation is displayed.
|
java.util.List<java.lang.String> |
getAnnotationPositionCalculatorList() |
AnnotationPositionCalculator |
getDefaultAnnotationPositionCalculator()
It returns the default
AnnotationPositionCalculator . |
int |
getDefaultFontColor()
Value used like the default value for the font color field.
|
double |
getDefaultFontHeight()
Value used like the default value for the font height field.
|
double |
getDefaultFontRotation()
Value used like the default value for the font rotation field.
|
java.lang.String |
getDefaultFontStyle()
Value used like the default value for the font style field.
|
java.lang.String |
getDefaultFontType()
Value used like the default value for the font type field.
|
java.lang.String |
getDefaultTextValue()
Value used like the default value for the text field.
|
java.util.List<java.lang.String> |
getFontStyles() |
java.util.List<java.lang.String> |
getFontTypes() |
void |
registerAnnotationPositionCalculator(java.lang.String name,
java.lang.Class annotationPositionCalculatorClass)
It registers a class that can be used to caclulate the position of an
annotation.
|
void |
registerDefaultAnnotationPositionCalculator(java.lang.Class annotationPositionCalculatorClass)
It registers the default implementation of an
AnnotationPositionCalculator
class. |
void |
setDefaultFontColor(java.awt.Color fontColor)
Set the default value for the font color field.
|
void |
setDefaultFontColor(int fontColor)
Set the default value for the font color field.
|
void |
setDefaultFontHeight(double fontHeight)
Set the default value for the font height field.
|
void |
setDefaultFontRotation(double fontRotation)
Set the default value for the font rotation field.
|
void |
setDefaultFontStyle(java.lang.String fontStyle)
Set the default value for the font style field.
|
void |
setDefaultFontType(java.lang.String fontType)
Set the default value for the font type field.
|
void |
setDefaultTextValue(java.lang.String textValue)
Set the default value for the text field.
|
public AnnotationCreationService getAnnotationCreationService(FeatureStore featureStore) throws ServiceException
AnnotationManager
AnnotationCreationService
.getAnnotationCreationService
in interface AnnotationManager
AnnotationCreationService
ServiceException
- if there is an error getting the servicepublic AnnotationPositionCalculator getAnnotationPositionCalculator(java.lang.String name) throws AnnotationPositionCalculatorCreationException
AnnotationManager
getAnnotationPositionCalculator
in interface AnnotationManager
name
- the name used to register the class.AnnotationPositionCalculatorCreationException
- if is not possible to create the object.public java.util.List<java.lang.String> getAnnotationPositionCalculatorList()
getAnnotationPositionCalculatorList
in interface AnnotationManager
AnnotationPositionCalculator
classes.public AnnotationPositionCalculator getDefaultAnnotationPositionCalculator() throws AnnotationPositionCalculatorCreationException
AnnotationManager
AnnotationPositionCalculator
.getDefaultAnnotationPositionCalculator
in interface AnnotationManager
AnnotationPositionCalculator
.AnnotationPositionCalculatorCreationException
- if is not possible to create the object.public void registerAnnotationPositionCalculator(java.lang.String name, java.lang.Class annotationPositionCalculatorClass)
AnnotationManager
registerAnnotationPositionCalculator
in interface AnnotationManager
name
- The name used to register the class.annotationPositionCalculatorClass
- The class that is able to calculate an annotation point.public void registerDefaultAnnotationPositionCalculator(java.lang.Class annotationPositionCalculatorClass)
AnnotationManager
AnnotationPositionCalculator
class. It will be used by default if the user don't specify any of them.registerDefaultAnnotationPositionCalculator
in interface AnnotationManager
annotationPositionCalculatorClass
- A class that is able to calculate an annotation point.public void addFontStyle(java.lang.String fontStyle)
AnnotationManager
addFontStyle
in interface AnnotationManager
fontStyle
- the new font style.public void addFontType(java.lang.String fontType)
AnnotationManager
addFontType
in interface AnnotationManager
fontType
- the new font type.public int getDefaultFontColor()
AnnotationManager
getDefaultFontColor
in interface AnnotationManager
public double getDefaultFontHeight()
AnnotationManager
getDefaultFontHeight
in interface AnnotationManager
public double getDefaultFontRotation()
AnnotationManager
getDefaultFontRotation
in interface AnnotationManager
public java.lang.String getDefaultFontStyle()
AnnotationManager
getDefaultFontStyle
in interface AnnotationManager
public java.lang.String getDefaultFontType()
AnnotationManager
getDefaultFontType
in interface AnnotationManager
public java.lang.String getDefaultTextValue()
AnnotationManager
getDefaultTextValue
in interface AnnotationManager
public java.util.List<java.lang.String> getFontStyles()
getFontStyles
in interface AnnotationManager
public java.util.List<java.lang.String> getFontTypes()
getFontTypes
in interface AnnotationManager
public void setDefaultFontColor(int fontColor)
AnnotationManager
setDefaultFontColor
in interface AnnotationManager
fontColor
- the default font color value.public void setDefaultFontColor(java.awt.Color fontColor)
AnnotationManager
setDefaultFontColor
in interface AnnotationManager
fontColor
- the default font color value.public void setDefaultFontHeight(double fontHeight)
AnnotationManager
setDefaultFontHeight
in interface AnnotationManager
fontHeight
- the default font height value.public void setDefaultFontRotation(double fontRotation)
AnnotationManager
setDefaultFontRotation
in interface AnnotationManager
fontRotation
- the default font rotation value.public void setDefaultFontStyle(java.lang.String fontStyle)
AnnotationManager
setDefaultFontStyle
in interface AnnotationManager
fontStyle
- the default font style value.public void setDefaultFontType(java.lang.String fontType)
AnnotationManager
setDefaultFontType
in interface AnnotationManager
fontType
- the default font type value.public void setDefaultTextValue(java.lang.String textValue)
AnnotationManager
setDefaultTextValue
in interface AnnotationManager
textValue
- the default text value.