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 java.lang.String |
VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME |
CLASSIFIED_VECTOR_LEGEND_PERSISTENCE_DEFINITION_NAMEVECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSortLEGEND_PERSISTENCE_DEFINITION_NAMELEGEND_NAME| Constructor and Description |
|---|
VectorialUniqueValueLegend() |
VectorialUniqueValueLegend(int shapeType)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSymbol(java.lang.Object key,
ISymbol symbol)
Inserts a symbol.
|
void |
clear()
Deletes all the information of classification:
intervals, values, or other classifying elements
|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
delAllSymbols() |
void |
delSymbol(java.lang.Object key)
Deletes a symbol using for that its key which is the parameter of the
method.
|
java.lang.String |
getClassName() |
java.awt.Color[] |
getColorScheme() |
ISymbol |
getDefaultSymbol()
Obtains the default symbol of the legend.
|
java.lang.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(java.lang.Object key)
Returns the symbols starting from its key.
|
java.lang.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.
|
java.lang.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(java.lang.String[] fNames)
Inserts the name of the field
|
void |
setClassifyingFieldTypes(int[] fieldTypes) |
void |
setColorScheme(java.awt.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, isSuitableForShapeTypedraw, draw, draw, drawFeatures, getZSort, internalDraw, isDrawSymbolInEeachPrimitive, print, print, setDrawSymbolInEeachPrimitive, setZSortaddDrawingObserver, addLegendListener, addObserver, beginComplexNotification, cloneLegend, countObservers, deleteDrawingObserver, deleteDrawingObservers, deleteObserver, disableNotifications, enableNotifications, endComplexNotification, fireDefaultSymbolChangedEvent, getListeners, getManager, getSymbolManager, inComplex, isEnabledNotifications, notifyObservers, notifyObservers, removeLegendListenerequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetZSort, setZSortgetClassifyingFieldNames, getClassifyingFieldTypesdraw, draw, isSuitableForShapeType, print, printaddLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListenercloneQuietly, cloneQuietlyaddDrawingObserver, deleteDrawingObserver, deleteDrawingObserverspublic static final java.lang.String VECTORIAL_UNIQUE_VALUE_LEGEND_PERSISTENCE_DEFINITION_NAME
public VectorialUniqueValueLegend()
public VectorialUniqueValueLegend(int shapeType)
shapeType - Type of the shape.public void setShapeType(int shapeType)
IVectorLegendsetShapeType in interface IVectorLegendshapeType - type of the shape.public void setValueSymbolByID(int id,
ISymbol symbol)
IVectorialUniqueValueLegendsetValueSymbolByID in interface IVectorialUniqueValueLegendid - index.symbol - symbol.public java.lang.Object[] getValues()
IClassifiedLegendgetValues in interface IClassifiedLegendpublic void addSymbol(java.lang.Object key,
ISymbol symbol)
IClassifiedVectorLegendaddSymbol in interface IClassifiedVectorLegendpublic void delAllSymbols()
public void clear()
IClassifiedVectorLegendclear in interface IClassifiedVectorLegendpublic java.lang.String[] getDescriptions()
IClassifiedLegendgetDescriptions in interface IClassifiedLegendpublic ISymbol[] getSymbols()
IClassifiedLegendgetSymbols in interface IClassifiedLegendpublic void setClassifyingFieldNames(java.lang.String[] fNames)
IClassifiedVectorLegendsetClassifyingFieldNames in interface IClassifiedVectorLegendsetClassifyingFieldNames in class AbstractClassifiedVectorLegendfNames - Names of the fields.
TODO refactor to allow more than one field namepublic ISymbol getSymbolByFeature(Feature feat) throws MapContextException
getSymbolByFeature in interface IVectorLegendfeat - IFeatureMapContextExceptionpublic ISymbol getDefaultSymbol()
ILegendgetDefaultSymbol in interface ILegendgetDefaultSymbol in interface IVectorLegendpublic void setDefaultSymbol(ISymbol s)
IVectorLegendsetDefaultSymbol in interface IVectorLegends - default symbol.public ISymbol getSymbolByValue(java.lang.Object key)
IVectorialUniqueValueLegendgetSymbolByValue in interface IVectorialUniqueValueLegendkey - ID.public java.lang.Object getSymbolKey(ISymbol symbol)
IVectorialUniqueValueLegendISymbol or null if it is
not registered.getSymbolKey in interface IVectorialUniqueValueLegendsymbol - to look forpublic int getShapeType()
IVectorLegendgetShapeType in interface IVectorLegendpublic void useDefaultSymbol(boolean b)
useDefaultSymbol in interface IVectorLegendpublic boolean isUseDefaultSymbol()
isUseDefaultSymbol in interface IVectorLegendpublic void delSymbol(java.lang.Object key)
IClassifiedVectorLegenddelSymbol in interface IClassifiedVectorLegendkey - clave.public java.lang.String getClassName()
public void replace(ISymbol oldSymbol, ISymbol newSymbol)
IClassifiedVectorLegendreplace in interface IClassifiedVectorLegendpublic java.awt.Color[] getColorScheme()
getColorScheme in interface IVectorialUniqueValueLegendpublic void setColorScheme(java.awt.Color[] cc)
setColorScheme in interface IVectorialUniqueValueLegendpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class AbstractClassifiedVectorLegendjava.lang.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 setClassifyingFieldTypes(int[] fieldTypes)
setClassifyingFieldTypes in interface IClassifiedVectorLegendsetClassifyingFieldTypes in class AbstractClassifiedVectorLegendpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractClassifiedVectorLegendPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractClassifiedVectorLegendPersistenceException