public interface SymbolManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
LABELINGSTRATEGY_FILE_EXTENSION |
static java.lang.String |
LEGEND_FILE_EXTENSION |
Modifier and Type | Method and Description |
---|---|
IMultiLayerSymbol |
createMultiLayerSymbol(int geomType)
Creates a new
IMultiLayerSymbol which can be used to render the
given Geometry type. |
IMultiLayerSymbol |
createMultiLayerSymbol(java.lang.String symbolName)
Creates a new
IMultiLayerSymbol . |
ISymbol |
createSymbol(int geomType)
|
ISymbol |
createSymbol(int geomType,
java.awt.Color color)
|
ISymbol |
createSymbol(java.lang.String symbolName)
Creates a new
ISymbol . |
ISymbol |
createSymbol(java.lang.String symbolName,
java.awt.Color color)
Creates a new
ISymbol with the given Color . |
ISymbol |
getSymbol(java.lang.String libraryName,
java.lang.String symbolID) |
java.util.List |
getSymbolLibraryNames() |
SymbolPreferences |
getSymbolPreferences()
Returns the current
SymbolPreferences . |
IWarningSymbol |
getWarningSymbol(java.lang.String message,
java.lang.String symbolDesc,
int symbolDrawExceptionType)
Returns an instance of
IWarningSymbol . |
ISymbol |
loadSymbol(java.io.File file) |
ISymbol[] |
loadSymbols(java.io.File folder)
Loads the symbols persisted into a folder.
|
ISymbol[] |
loadSymbols(java.io.File folder,
java.io.FileFilter filter)
Loads the symbols persisted into a folder.
|
CancellableTask |
loadSymbols(java.io.File folder,
java.io.FileFilter filter,
Visitor visitor) |
void |
registerMultiLayerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass)
Registers a
IMultiLayerSymbol implementation class with a name. |
void |
registerMultiLayerSymbol(java.lang.String symbolName,
int[] geomTypes,
java.lang.Class symbolClass)
Registers a
IMultiLayerSymbol implementation class with a name
and a list of geometry types which the symbol is able to render. |
void |
registerSymbol(java.lang.String symbolName,
java.lang.Class symbolClass)
Registers a
ISymbol implementation class with a name. |
void |
registerSymbol(java.lang.String symbolName,
int[] geomTypes,
java.lang.Class symbolClass)
Registers a
ISymbol implementation class with a name and a list
of geometry types which the symbol is able to render. |
void |
saveSymbol(ISymbol symbol,
java.lang.String fileName,
java.io.File folder)
Persists a
ISymbol into the given folder, with the given file
name. |
void |
saveSymbol(ISymbol symbol,
java.lang.String fileName,
java.io.File folder,
boolean overwrite)
Persists a
ISymbol into the given folder, with the given file
name. |
void |
setSymbolPreferences(SymbolPreferences symbolPreferences) |
static final java.lang.String LEGEND_FILE_EXTENSION
static final java.lang.String LABELINGSTRATEGY_FILE_EXTENSION
ISymbol loadSymbol(java.io.File file) throws SymbolException
SymbolException
ISymbol[] loadSymbols(java.io.File folder) throws SymbolException
PersistenceManager
, loading all files
found into the folder.folder
- to load the persisted symbols fromSymbolException
- if there is an error loading the symbolsISymbol[] loadSymbols(java.io.File folder, java.io.FileFilter filter) throws SymbolException
PersistenceManager
, loading the files
found into the folder which apply to the provided filter.folder
- to load the persisted symbols fromfilter
- to apply to know which files to loadSymbolException
- if there is an error loading the symbolsCancellableTask loadSymbols(java.io.File folder, java.io.FileFilter filter, Visitor visitor)
void saveSymbol(ISymbol symbol, java.lang.String fileName, java.io.File folder) throws SymbolException
ISymbol
into the given folder, with the given file
name.symbol
- to persistfileName
- of the file to createfolder
- where to create the fileSymbolException
- if there is an error persisting the symbol, or the file to
create already existsvoid saveSymbol(ISymbol symbol, java.lang.String fileName, java.io.File folder, boolean overwrite) throws SymbolException
ISymbol
into the given folder, with the given file
name.symbol
- to persistfileName
- of the file to createfolder
- where to create the fileoverwrite
- what to do if the file to create already existsSymbolException
- if there is an error persisting the symbol, or the file to
create already exists and overwrite is falseSymbolPreferences getSymbolPreferences()
SymbolPreferences
.SymbolPreferences
ISymbol createSymbol(java.lang.String symbolName) throws MapContextRuntimeException
ISymbol
.symbolName
- the name of the symbol to createISymbol
MapContextRuntimeException
- if there is an error creating the symbolISymbol createSymbol(int geomType) throws MapContextRuntimeException
geomType
- the Geometry
type to renderISymbol
MapContextRuntimeException
- if there is an error creating the symbolISymbol createSymbol(java.lang.String symbolName, java.awt.Color color) throws MapContextRuntimeException
ISymbol
with the given Color
.symbolName
- the name of the symbol to createcolor
- the color for the symbolISymbol
MapContextRuntimeException
- if there is an error creating the symbolISymbol createSymbol(int geomType, java.awt.Color color) throws MapContextRuntimeException
geomType
- the Geometry
type to rendercolor
- the color for the symbolISymbol
MapContextRuntimeException
- if there is an error creating the symbolIMultiLayerSymbol createMultiLayerSymbol(java.lang.String symbolName) throws MapContextRuntimeException
IMultiLayerSymbol
.symbolName
- the name of the symbol to createIMultiLayerSymbol
MapContextRuntimeException
- if there is an error creating the symbolIMultiLayerSymbol createMultiLayerSymbol(int geomType) throws MapContextRuntimeException
IMultiLayerSymbol
which can be used to render the
given Geometry
type.geomType
- the Geometry
type to renderIMultiLayerSymbol
MapContextRuntimeException
- if there is an error creating the symbolvoid registerSymbol(java.lang.String symbolName, java.lang.Class symbolClass) throws MapContextRuntimeException
ISymbol
implementation class with a name. This way
the symbol class is not related to any geometry type, so it can be
created only through the createSymbol(String)
method.symbolName
- the symbol namesymbolClass
- the symbol implementation classMapContextRuntimeException
- if the provided class does not implement the ISymbol
interfacevoid registerSymbol(java.lang.String symbolName, int[] geomTypes, java.lang.Class symbolClass) throws MapContextException
ISymbol
implementation class with a name and a list
of geometry types which the symbol is able to render.symbolName
- the symbol namegeomTypes
- the list of geometry types the symbol is able to rendersymbolClass
- the symbol implementation classMapContextRuntimeException
- if the provided class does not implement the ISymbol
interfaceMapContextException
void registerMultiLayerSymbol(java.lang.String symbolName, java.lang.Class symbolClass) throws MapContextRuntimeException
IMultiLayerSymbol
implementation class with a name.
This way the symbol class is not related to any geometry type, so it can
be created only through the createMultiLayerSymbol(String)
method.symbolName
- the symbol namesymbolClass
- the symbol implementation classMapContextRuntimeException
- if the provided class does not implement the
IMultiLayerSymbol
interfacevoid registerMultiLayerSymbol(java.lang.String symbolName, int[] geomTypes, java.lang.Class symbolClass) throws MapContextRuntimeException
IMultiLayerSymbol
implementation class with a name
and a list of geometry types which the symbol is able to render.symbolName
- the symbol namegeomTypes
- the list of geometry types the symbol is able to rendersymbolClass
- the symbol implementation classMapContextRuntimeException
- if the provided class does not implement the
IMultiLayerSymbol
interfaceIWarningSymbol getWarningSymbol(java.lang.String message, java.lang.String symbolDesc, int symbolDrawExceptionType) throws MapContextRuntimeException
IWarningSymbol
.
TODO: revisar el uso de esto, a ver si es necesario o se puede ocultar
dentro de la implementación.message
- symbolDesc
- symbolDrawExceptionType
- MapContextRuntimeException
void setSymbolPreferences(SymbolPreferences symbolPreferences)
java.util.List getSymbolLibraryNames()
ISymbol getSymbol(java.lang.String libraryName, java.lang.String symbolID) throws SymbolException
SymbolException