public class DefaultVectorComplexLegend extends AbstractVectorialLegend implements VectorComplexLegend, Persistent
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultVectorComplexLegend.RegisterLegend |
static class |
DefaultVectorComplexLegend.RegisterPersistence |
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPLEX_LEGEND_FIELD |
static String |
COMPLEX_LEGEND_NAME |
static String |
COMPLEX_LEGEND_PERSISTENCE_DEFINITION_NAME |
VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSortLEGEND_PERSISTENCE_DEFINITION_NAME| Constructor and Description |
|---|
DefaultVectorComplexLegend() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ComplexLegendItem legend) |
void |
draw(BufferedImage image,
Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore)
Draws the
FeatureStore data using this legend simbology. |
protected void |
draw(BufferedImage image,
Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore,
FeatureQuery featureQuery,
double dpi)
Draws the features from the
FeatureStore, filtered with the scale
and the query parameters, with the symbols of the legend. |
ISymbol |
getDefaultSymbol()
Obtains the default symbol of the legend.
|
String[] |
getDescriptions()
Obtains the descriptions of the classes that are in the classification
|
List<ComplexLegendItem> |
getEditedLegends() |
ComplexLegendItem |
getLegend(double scale) |
List<ComplexLegendItem> |
getLegends() |
protected String[] |
getRequiredFeatureAttributeNames(FeatureStore featureStore)
|
int |
getShapeType()
Returns the type of the shape.
|
ISymbol |
getSymbolByFeature(Feature feat)
Returns a symbol starting from an IFeature.
|
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 |
isOverlapped(ComplexLegendItem legend) |
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 |
print(Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore,
FeatureQuery fquery,
PrintAttributes properties) |
void |
print(Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore,
PrintAttributes properties) |
boolean |
remove(ComplexLegendItem legend) |
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 |
setShapeType(int shapeType)
Defines the type of the shape.
|
void |
useDefaultSymbol(boolean b) |
clone, draw, getZSort, internalDraw, 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, waitdrawaddDrawingObserver, deleteDrawingObserver, deleteDrawingObserversaddLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListenerpublic static final String COMPLEX_LEGEND_PERSISTENCE_DEFINITION_NAME
public static final String COMPLEX_LEGEND_NAME
public static final String COMPLEX_LEGEND_FIELD
public List<ComplexLegendItem> getLegends()
getLegends in interface VectorComplexLegendpublic List<ComplexLegendItem> getEditedLegends()
public boolean isOverlapped(ComplexLegendItem legend)
isOverlapped in interface VectorComplexLegendpublic boolean add(ComplexLegendItem legend)
add in interface VectorComplexLegendpublic boolean remove(ComplexLegendItem legend)
remove in interface VectorComplexLegendpublic ComplexLegendItem getLegend(double scale)
getLegend in interface VectorComplexLegendpublic void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, FeatureQuery fquery, PrintAttributes properties) throws LegendException
print in interface IVectorLegendprint in class AbstractVectorialLegendLegendExceptionpublic void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, PrintAttributes properties) throws LegendException
print in interface IVectorLegendprint in class AbstractVectorialLegendLegendExceptionpublic void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore) throws LegendException
IVectorLegendFeatureStore data using this legend simbology.draw in interface IVectorLegenddraw in class AbstractVectorialLegendimage - the base image to draw overg - the Graphics2D to draw toviewPort - the ViewPort to usecancel - the Cancellable delegate objectscale - the scale of the viewqueryParameters - the query parameterscoordTrans - the transformation coordinates to use for reprojectionfeatureStore - FeatureStore to load the data to draw fromLegendExceptionprotected void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, FeatureQuery featureQuery, double dpi) throws LegendException
AbstractVectorialLegendFeatureStore, filtered with the scale
and the query parameters, with the symbols of the legend.draw in class AbstractVectorialLegendLegendExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractVectorialLegendPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractVectorialLegendPersistenceExceptionpublic ISymbol getSymbolByFeature(Feature feat) throws MapContextException
IVectorLegendgetSymbolByFeature in interface IVectorLegendfeat - IFeature.MapContextExceptionpublic int getShapeType()
IVectorLegendgetShapeType in interface IVectorLegendpublic void setShapeType(int shapeType)
IVectorLegendsetShapeType in interface IVectorLegendshapeType - type of the shape.public void setDefaultSymbol(ISymbol s)
IVectorLegendsetDefaultSymbol in interface IVectorLegends - default symbol.public boolean isUseDefaultSymbol()
IVectorLegendisUseDefaultSymbol in interface IVectorLegendpublic void useDefaultSymbol(boolean b)
useDefaultSymbol in interface IVectorLegendpublic boolean isSuitableForShapeType(int shapeType)
isSuitableForShapeType in interface IVectorLegendpublic ISymbol getDefaultSymbol()
ILegendgetDefaultSymbol in interface ILegendprotected String[] getRequiredFeatureAttributeNames(FeatureStore featureStore) throws DataException
AbstractVectorialLegendgetRequiredFeatureAttributeNames in class AbstractVectorialLegendfeatureStore - the store where the Features belong toFeature attribute namesDataException - if there is an error getting the attribute namespublic String[] getDescriptions()
IClassifiedLegendgetDescriptions in interface IClassifiedLegendpublic ISymbol[] getSymbols()
IClassifiedLegendgetSymbols in interface IClassifiedLegendpublic Object[] getValues()
IClassifiedLegendgetValues in interface IClassifiedLegend