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 java.lang.String |
COMPLEX_LEGEND_FIELD |
static java.lang.String |
COMPLEX_LEGEND_NAME |
static java.lang.String |
COMPLEX_LEGEND_PERSISTENCE_DEFINITION_NAME |
LOG, VECTORIAL_LEGEND_PERSISTENCE_DEFINITION_NAME, zSort
LEGEND_PERSISTENCE_DEFINITION_NAME
Constructor and Description |
---|
DefaultVectorComplexLegend() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(ComplexLegendItem legend) |
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
draw(java.awt.image.BufferedImage image,
java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
java.util.Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore)
Draws the
FeatureStore data using this legend simbology. |
protected void |
draw(java.awt.image.BufferedImage image,
java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
java.util.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. |
boolean |
getAllowOverlap() |
ISymbol |
getDefaultSymbol()
Obtains the default symbol of the legend.
|
java.lang.String[] |
getDescriptions()
Obtains the descriptions of the classes that are in the classification
|
java.util.List<ComplexLegendItem> |
getEditedLegends() |
ComplexLegendItem |
getLegend(double scale) |
java.util.List<ComplexLegendItem> |
getLegends() |
java.util.List<ComplexLegendItem> |
getLegendsInScale(double scale) |
protected java.lang.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.
|
java.lang.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(java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
java.util.Map queryParameters,
ICoordTrans coordTrans,
FeatureStore featureStore,
FeatureQuery fquery,
PrintAttributes properties) |
void |
print(java.awt.Graphics2D g,
ViewPort viewPort,
Cancellable cancel,
double scale,
java.util.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 |
setAllowOverlap(boolean allowOverlap) |
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) |
draw, drawFeatures, getZSort, internalDraw, isDrawSymbolInEeachPrimitive, setDrawSymbolInEeachPrimitive, 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
cloneQuietly, cloneQuietly
public static final java.lang.String COMPLEX_LEGEND_PERSISTENCE_DEFINITION_NAME
public static final java.lang.String COMPLEX_LEGEND_NAME
public static final java.lang.String COMPLEX_LEGEND_FIELD
public java.util.List<ComplexLegendItem> getLegends()
getLegends
in interface VectorComplexLegend
public java.util.List<ComplexLegendItem> getEditedLegends()
public boolean isOverlapped(ComplexLegendItem legend)
isOverlapped
in interface VectorComplexLegend
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Cloneable
clone
in class AbstractVectorialLegend
java.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 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 java.util.List<ComplexLegendItem> getLegendsInScale(double scale)
public void print(java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, java.util.Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, FeatureQuery fquery, PrintAttributes properties) throws LegendException
print
in interface IVectorLegend
print
in class AbstractVectorialLegend
LegendException
public void print(java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, java.util.Map queryParameters, ICoordTrans coordTrans, FeatureStore featureStore, PrintAttributes properties) throws LegendException
print
in interface IVectorLegend
print
in class AbstractVectorialLegend
LegendException
public void draw(java.awt.image.BufferedImage image, java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, java.util.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(java.awt.image.BufferedImage image, java.awt.Graphics2D g, ViewPort viewPort, Cancellable cancel, double scale, java.util.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 boolean getAllowOverlap()
getAllowOverlap
in interface VectorComplexLegend
public void setAllowOverlap(boolean allowOverlap)
setAllowOverlap
in interface VectorComplexLegend
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()
IVectorLegend
getDefaultSymbol
in interface ILegend
getDefaultSymbol
in interface IVectorLegend
protected java.lang.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 java.lang.String[] getDescriptions()
IClassifiedLegend
getDescriptions
in interface IClassifiedLegend
public ISymbol[] getSymbols()
IClassifiedLegend
getSymbols
in interface IClassifiedLegend
public java.lang.Object[] getValues()
IClassifiedLegend
getValues
in interface IClassifiedLegend