public class SingleSymbolLegend extends AbstractVectorialLegend implements ISingleSymbolLegend
Modifier and Type | Class and Description |
---|---|
static class |
SingleSymbolLegend.RegisterLegend |
static class |
SingleSymbolLegend.RegisterPersistence |
Modifier and Type | Field and Description |
---|---|
static String |
SINGLE_SYMBOL_PERSISTENCE_DEFINITION_NAME |
VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSort
LEGEND_PERSISTENCE_DEFINITION_NAME
LEGEND_NAME
Constructor and Description |
---|
SingleSymbolLegend()
Constructor method, needed by persistence.
|
SingleSymbolLegend(ISymbol style)
Convenience fast constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
String |
getClassName() |
ISymbol |
getDefaultSymbol()
Obtains the default symbol of the legend.
|
protected String[] |
getRequiredFeatureAttributeNames(FeatureStore featureStore)
|
int |
getShapeType()
Returns the type of the shape.
|
ISymbol |
getSymbol(int recordIndex) |
ISymbol |
getSymbolByFeature(Feature feat)
Returns a symbol starting from an IFeature.
|
String[] |
getUsedFields() |
boolean |
isSuitableForShapeType(int shapeType) |
boolean |
isUseDefaultSymbol()
Returns true or false depending on if the rest of values are used.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setDefaultSymbol(ISymbol s)
Establishes the default symbol of a legend.
|
void |
setFeatureStore(FeatureStore fs) |
void |
setShapeType(int shapeType)
Defines the type of the shape.
|
void |
useDefaultSymbol(boolean b) |
draw, draw, draw, 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
draw, draw, print, print
addLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListener
addDrawingObserver, deleteDrawingObserver, deleteDrawingObservers
public static final String SINGLE_SYMBOL_PERSISTENCE_DEFINITION_NAME
public SingleSymbolLegend()
public SingleSymbolLegend(ISymbol style)
style
- Símbolo.public void setDefaultSymbol(ISymbol s)
IVectorLegend
setDefaultSymbol
in interface IVectorLegend
s
- default symbol.public ISymbol getSymbol(int recordIndex)
public ISymbol getDefaultSymbol()
ILegend
getDefaultSymbol
in interface ILegend
public int getShapeType()
IVectorLegend
getShapeType
in interface IVectorLegend
public void setShapeType(int shapeType)
IVectorLegend
setShapeType
in interface IVectorLegend
shapeType
- type of the shape.public ISymbol getSymbolByFeature(Feature feat)
IVectorLegend
getSymbolByFeature
in interface IVectorLegend
feat
- IFeature.public void useDefaultSymbol(boolean b)
useDefaultSymbol
in interface IVectorLegend
public String[] getUsedFields()
public boolean isUseDefaultSymbol()
IVectorLegend
isUseDefaultSymbol
in interface IVectorLegend
public String getClassName()
public boolean isSuitableForShapeType(int shapeType)
isSuitableForShapeType
in interface IVectorLegend
public void setFeatureStore(FeatureStore fs) throws DataException
DataException
protected String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) throws DataException
AbstractVectorialLegend
getRequiredFeatureAttributeNames
in class AbstractVectorialLegend
featureStore
- the store where the Feature
s belong toFeature
attribute namesDataException
- if there is an error getting the attribute namespublic Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractVectorialLegend
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 AbstractVectorialLegend
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractVectorialLegend
PersistenceException