public class DefaultAnnotationManager extends 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(String fontStyle)
It adds a new value for the font style field.
|
void |
addFontType(String fontType)
It adds a new value for the font type field.
|
AnnotationCreationService |
getAnnotationCreationService(FeatureStore featureStore)
Create an instance of a
AnnotationCreationService . |
AnnotationPositionCalculator |
getAnnotationPositionCalculator(String name)
It returns an object that can be used to create the point
where the annotation is displayed.
|
List<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.
|
String |
getDefaultFontStyle()
Value used like the default value for the font style field.
|
String |
getDefaultFontType()
Value used like the default value for the font type field.
|
String |
getDefaultTextValue()
Value used like the default value for the text field.
|
List<String> |
getFontStyles() |
List<String> |
getFontTypes() |
void |
registerAnnotationPositionCalculator(String name,
Class annotationPositionCalculatorClass)
It registers a class that can be used to caclulate the position of an
annotation.
|
void |
registerDefaultAnnotationPositionCalculator(Class annotationPositionCalculatorClass)
It registers the default implementation of an
AnnotationPositionCalculator
class. |
void |
setDefaultFontColor(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(String fontStyle)
Set the default value for the font style field.
|
void |
setDefaultFontType(String fontType)
Set the default value for the font type field.
|
void |
setDefaultTextValue(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(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 List<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(String name, 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(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(String fontStyle)
AnnotationManager
addFontStyle
in interface AnnotationManager
fontStyle
- the new font style.public void addFontType(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 String getDefaultFontStyle()
AnnotationManager
getDefaultFontStyle
in interface AnnotationManager
public String getDefaultFontType()
AnnotationManager
getDefaultFontType
in interface AnnotationManager
public String getDefaultTextValue()
AnnotationManager
getDefaultTextValue
in interface AnnotationManager
public List<String> getFontStyles()
getFontStyles
in interface AnnotationManager
public List<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(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(String fontStyle)
AnnotationManager
setDefaultFontStyle
in interface AnnotationManager
fontStyle
- the default font style value.public void setDefaultFontType(String fontType)
AnnotationManager
setDefaultFontType
in interface AnnotationManager
fontType
- the default font type value.public void setDefaultTextValue(String textValue)
AnnotationManager
setDefaultTextValue
in interface AnnotationManager
textValue
- the default text value.