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, zSort
LEGEND_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, 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
draw
addDrawingObserver, deleteDrawingObserver, deleteDrawingObservers
addLegendListener, cloneLegend, fireDefaultSymbolChangedEvent, getListeners, removeLegendListener
public 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 VectorComplexLegend
public List<ComplexLegendItem> getEditedLegends()
public boolean isOverlapped(ComplexLegendItem legend)
isOverlapped
in interface VectorComplexLegend
public boolean add(ComplexLegendItem legend)
add
in interface VectorComplexLegend
public boolean remove(ComplexLegendItem legend)
remove
in interface VectorComplexLegend
public ComplexLegendItem getLegend(double scale)
getLegend
in interface VectorComplexLegend
public 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 IVectorLegend
print
in class AbstractVectorialLegend
LegendException
public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, PrintAttributes properties) throws LegendException
print
in interface IVectorLegend
print
in class AbstractVectorialLegend
LegendException
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore) throws LegendException
IVectorLegend
FeatureStore
data using this legend simbology.draw
in interface IVectorLegend
draw
in class AbstractVectorialLegend
image
- 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 fromLegendException
protected void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, FeatureQuery featureQuery, double dpi) throws LegendException
AbstractVectorialLegend
FeatureStore
, filtered with the scale
and the query parameters, with the symbols of the legend.draw
in class AbstractVectorialLegend
LegendException
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
public ISymbol getSymbolByFeature(Feature feat) throws MapContextException
IVectorLegend
getSymbolByFeature
in interface IVectorLegend
feat
- IFeature.MapContextException
public int getShapeType()
IVectorLegend
getShapeType
in interface IVectorLegend
public void setShapeType(int shapeType)
IVectorLegend
setShapeType
in interface IVectorLegend
shapeType
- type of the shape.public void setDefaultSymbol(ISymbol s)
IVectorLegend
setDefaultSymbol
in interface IVectorLegend
s
- default symbol.public boolean isUseDefaultSymbol()
IVectorLegend
isUseDefaultSymbol
in interface IVectorLegend
public void useDefaultSymbol(boolean b)
useDefaultSymbol
in interface IVectorLegend
public boolean isSuitableForShapeType(int shapeType)
isSuitableForShapeType
in interface IVectorLegend
public ISymbol getDefaultSymbol()
ILegend
getDefaultSymbol
in interface ILegend
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 String[] getDescriptions()
IClassifiedLegend
getDescriptions
in interface IClassifiedLegend
public ISymbol[] getSymbols()
IClassifiedLegend
getSymbols
in interface IClassifiedLegend
public Object[] getValues()
IClassifiedLegend
getValues
in interface IClassifiedLegend