public class VectorialUniqueValueLegend extends AbstractClassifiedVectorLegend implements IVectorialUniqueValueLegend
Modifier and Type | Class and Description |
---|---|
static class |
VectorialUniqueValueLegend.RegisterLegend |
static class |
VectorialUniqueValueLegend.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME |
CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAME
VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSort
LEGEND_PERSISTENCE_DEFINITION_NAME
LEGEND_NAME
Constructor and Description |
---|
VectorialUniqueValueLegend() |
VectorialUniqueValueLegend(int shapeType)
Constructor method
|
Modifier and Type | Method and Description |
---|---|
void |
addSymbol(Object key,
ISymbol symbol)
Inserts a symbol.
|
void |
clear()
Deletes all the information of classification:
intervals, values, or other classifying elements
|
Object |
clone()
Creates a copy of the object.
|
void |
delSymbol(Object key)
Deletes a symbol using for that its key which is the parameter of the
method.
|
String |
getClassName() |
Color[] |
getColorScheme() |
ISymbol |
getDefaultSymbol()
Obtains the default symbol of the legend.
|
String[] |
getDescriptions()
Obtains the descriptions of the classes that are in the classification
|
int |
getShapeType()
Returns the type of the shape.
|
ISymbol |
getSymbolByFeature(Feature feat)
Devuelve un símbolo a partir de una IFeature.
|
ISymbol |
getSymbolByValue(Object key)
Returns the symbols starting from its key.
|
Object |
getSymbolKey(ISymbol symbol)
Returns the key related to a registered
ISymbol or null if it is
not registered. |
ISymbol[] |
getSymbols()
Obtains the symbols of each class of the classification for the user.
|
Object[] |
getValues()
Obtains the values in relation with each class of the classification
|
boolean |
isUseDefaultSymbol()
Devuelve si se utiliza o no el resto de valores para representarse.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
replace(ISymbol oldSymbol,
ISymbol newSymbol)
Removes oldSymbol from the Legend and substitutes it with the newSymbol
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setClassifyingFieldNames(String[] fNames)
Inserts the name of the field
|
void |
setColorScheme(Color[] cc) |
void |
setDefaultSymbol(ISymbol s)
Establishes the default symbol of a legend.
|
void |
setShapeType(int shapeType)
Defines the type of the shape.
|
void |
setValueSymbolByID(int id,
ISymbol symbol)
Establishes the symbol for the value which is the argument of the function.
|
void |
useDefaultSymbol(boolean b) |
fireClassifiedSymbolChangeEvent, fireLegendClearEvent, getClassifyingFieldNames, getClassifyingFieldTypes, getRequiredFeatureAttributeNames, isSuitableForShapeType, setClassifyingFieldTypes
draw, draw, draw, drawFeatures, getZSort, internalDraw, print, print, setZSort
addDrawingObserver, addLegendListener, addObserver, beginComplexNotification, cloneLegend, countObservers, deleteDrawingObserver, deleteDrawingObservers, deleteObserver, disableNotifications, enableNotifications, endComplexNotification, fireDefaultSymbolChangedEvent, getListeners, getManager, getSymbolManager, inComplex, isEnabledNotifications, notifyObservers, notifyObservers, removeLegendListener
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getZSort, setZSort
getClassifyingFieldNames, getClassifyingFieldTypes, setClassifyingFieldTypes
draw, draw, isSuitableForShapeType, print, print
addLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListener
addDrawingObserver, deleteDrawingObserver, deleteDrawingObservers
public static final String VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME
public VectorialUniqueValueLegend()
public VectorialUniqueValueLegend(int shapeType)
shapeType
- Type of the shape.public void setShapeType(int shapeType)
IVectorLegend
setShapeType
in interface IVectorLegend
shapeType
- type of the shape.public void setValueSymbolByID(int id, ISymbol symbol)
IVectorialUniqueValueLegend
setValueSymbolByID
in interface IVectorialUniqueValueLegend
id
- index.symbol
- symbol.public Object[] getValues()
IClassifiedLegend
getValues
in interface IClassifiedLegend
public void addSymbol(Object key, ISymbol symbol)
IClassifiedVectorLegend
addSymbol
in interface IClassifiedVectorLegend
public void clear()
IClassifiedVectorLegend
clear
in interface IClassifiedVectorLegend
public String[] getDescriptions()
IClassifiedLegend
getDescriptions
in interface IClassifiedLegend
public ISymbol[] getSymbols()
IClassifiedLegend
getSymbols
in interface IClassifiedLegend
public void setClassifyingFieldNames(String[] fNames)
IClassifiedVectorLegend
setClassifyingFieldNames
in interface IClassifiedVectorLegend
setClassifyingFieldNames
in class AbstractClassifiedVectorLegend
fNames
- Names of the fields.
TODO refactor to allow more than one field namepublic ISymbol getSymbolByFeature(Feature feat) throws MapContextException
getSymbolByFeature
in interface IVectorLegend
feat
- IFeatureMapContextException
public ISymbol getDefaultSymbol()
ILegend
getDefaultSymbol
in interface ILegend
getDefaultSymbol
in interface IVectorLegend
public void setDefaultSymbol(ISymbol s)
IVectorLegend
setDefaultSymbol
in interface IVectorLegend
s
- default symbol.public ISymbol getSymbolByValue(Object key)
IVectorialUniqueValueLegend
getSymbolByValue
in interface IVectorialUniqueValueLegend
key
- ID.public Object getSymbolKey(ISymbol symbol)
IVectorialUniqueValueLegend
ISymbol
or null if it is
not registered.getSymbolKey
in interface IVectorialUniqueValueLegend
symbol
- to look forpublic int getShapeType()
IVectorLegend
getShapeType
in interface IVectorLegend
public void useDefaultSymbol(boolean b)
useDefaultSymbol
in interface IVectorLegend
public boolean isUseDefaultSymbol()
isUseDefaultSymbol
in interface IVectorLegend
public void delSymbol(Object key)
IClassifiedVectorLegend
delSymbol
in interface IClassifiedVectorLegend
key
- clave.public String getClassName()
public void replace(ISymbol oldSymbol, ISymbol newSymbol)
IClassifiedVectorLegend
replace
in interface IClassifiedVectorLegend
public Color[] getColorScheme()
getColorScheme
in interface IVectorialUniqueValueLegend
public void setColorScheme(Color[] cc)
setColorScheme
in interface IVectorialUniqueValueLegend
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractClassifiedVectorLegend
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractClassifiedVectorLegend
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractClassifiedVectorLegend
PersistenceException