public class MapSheetsGrid extends FLyrVect implements IMapSheetsIdentified
FLyrVect
is used to handle the map sheets grid
when it's not being adjusted. The draw method only acts when this grid is
not active as grid and being adjusted.FLyrVect.EnvelopeCantBeInitializedException, FLyrVect.RegisterPersistence
FLyrDefault.RegisterMetadata
Modifier and Type | Field and Description |
---|---|
static String |
ATT_NAME_CODE
Constants for essential attribute names
|
static String |
ATT_NAME_DIMX_CM |
static String |
ATT_NAME_DIMY_CM |
static String |
ATT_NAME_GEOMETRY |
static String |
ATT_NAME_OVERLAP |
static String |
ATT_NAME_ROT_RAD |
static String |
ATT_NAME_SCALE |
static long |
COUNTER |
static String |
GRID_FOLDER |
static String |
LABEL_NEW_PREFIX |
static String |
LABEL_SEPARATOR |
layerListeners, metadataContainer
METADATA_CRS, METADATA_DEFINITION_DESCRIPTION, METADATA_DEFINITION_NAME, METADATA_NAME
Constructor and Description |
---|
MapSheetsGrid() |
MapSheetsGrid(String name,
IProjection pro,
double[] scale_cmx_cmy_overlap,
Map<String,Integer> add_fields) |
Modifier and Type | Method and Description |
---|---|
Feature |
addSheet(RotatedEnvelope re,
String id_label,
Feature fields) |
protected void |
bindToDataStore(DataStore dataStore)
Enlaza la capa con el DataStore indicado.
|
FLayer |
cloneLayer()
This method can be used to have a fast cloned layer.
|
String |
createNewCode() |
void |
draw(BufferedImage bi,
Graphics2D g,
ViewPort vp,
Cancellable ca,
double sca)
Draws the layer only if grid is not being adjusted.
|
Map<String,Integer> |
getAdditionalFieldsMap() |
double |
getDimCmX() |
double |
getDimCmY() |
List<RotatedEnvelope> |
getGeometries(boolean cloned) |
long |
getId() |
double |
getOverlap() |
double |
getScale() |
List |
getSelectedCodes() |
static void |
initGridsFolder() |
void |
invalidateRotations() |
boolean |
isActiveAsGrid() |
boolean |
isWritable()
Returns the writing status of this layer.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
static void |
registerPersistent() |
Feature |
removeGraphicContaining(Point map_p) |
Feature[] |
removeSelected() |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAdditionalFields(Map<String,Integer> addf) |
void |
setSelectedCodes(List new_sel) |
void |
updateRotations() |
addBaseFilter, allowLinks, cleanLoadOptions, clearSpatialCache, createFeatureQuery, doDispose, drawLabels, fromViewPortCRSToSourceCRS, fromViewPortCRSToSourceCRS, getBaseQuery, getDataStore, getFeatureStore, getFullEnvelope, getGeometryType, getInfo, getInfo, getInfo, getLabelingStrategy, getLegend, getMetadataChildren, getMetadataID, getShapeType, getSpatialCache, getTocImageIcon, getTypeVectorLayer, isEditing, isLabeled, isOnePoint, isPropertiesMenuVisible, isSpatialCacheEnabled, iterator, legendCleared, load, print, printLabels, putLoadLegend, putLoadSelection, queryByEnvelope, queryByEnvelope, queryByGeometry, queryByPoint, queryByPoint, reload, setBaseQuery, setDataStore, setEditing, setIsLabeled, setLabelingStrategy, setLegend, setLoadLegend, setLoadSelection, setMaxFeaturesInEditionCache, setSpatialCacheEnabled, symbolChanged, toString, transformToSourceCRS, update
activationChanged, addError, addLayerListener, addLegendListener, callEditionChanged, callLegendChanged, clear, delegate, drawValueChanged, editionChanged, getClassName, getCoordTrans, getDrawVersion, getDynClass, getDynValue, getError, getErrors, getExtendedProperties, getFLayerStatus, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMetadataName, getMinScale, getName, getNumErrors, getParentLayer, getProjection, getProperty, getTocStatusImage, getTransparency, hasChangedForDrawing, hasDynValue, hidesThisArea, implement, invokeDynMethod, invokeDynMethod, isActive, isAvailable, isInTOC, isOk, isTemporary, isVisible, isWithinScale, nameChanged, newComposedLayer, removeLayerListener, removeLegendListener, reProject, setActive, setAvailable, setCoordTrans, setDynValue, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setProperty, setTemporary, setTocStatusImage, setTransparency, setVisible, updateDrawVersion, visibilityChanged, visibleRequired, wakeUp
dispose, dispose
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addLayerListener, getCoordTrans, getDrawVersion, getError, getErrors, getFLayerStatus, getInfoString, getLayerListeners, getLink, getLinkProperties, getMapContext, getMaxScale, getMinScale, getName, getNumErrors, getParentLayer, getTocStatusImage, isActive, isAvailable, isInTOC, isOk, isTemporary, isVisible, isWithinScale, newComposedLayer, removeLayerListener, setActive, setAvailable, setCoordTrans, setError, setFLayerStatus, setInTOC, setMaxScale, setMinScale, setName, setParentLayer, setProjection, setTemporary, setVisible, visibleRequired
getProjection, reProject
getMetadataName
clear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValue
dispose
getExtendedProperties, getProperty, setProperty
addLegendListener, removeLegendListener
public static final String LABEL_NEW_PREFIX
public static final String LABEL_SEPARATOR
public static final String ATT_NAME_CODE
public static final String ATT_NAME_SCALE
public static final String ATT_NAME_DIMX_CM
public static final String ATT_NAME_DIMY_CM
public static final String ATT_NAME_OVERLAP
public static final String ATT_NAME_ROT_RAD
public static final String ATT_NAME_GEOMETRY
public static long COUNTER
public static String GRID_FOLDER
public MapSheetsGrid()
public MapSheetsGrid(String name, IProjection pro, double[] scale_cmx_cmy_overlap, Map<String,Integer> add_fields)
public static void initGridsFolder()
public void invalidateRotations()
public void updateRotations()
public long getId()
getId
in interface IMapSheetsIdentified
public Feature addSheet(RotatedEnvelope re, String id_label, Feature fields) throws SheetInsertException
SheetInsertException
public boolean isWritable()
FLayer
Returns the writing status of this layer.
One layer is writable if there is a writing driver for this layer.
isWritable
in interface FLayer
isWritable
in class FLyrVect
true
if there is a writing driver for this layer; false
otherwisepublic FLayer cloneLayer()
FLayer
This method can be used to have a fast cloned layer.
The implementations should take care of not recreate this layer. Instead of this, is better to use the same source (driver) and deepclone the legend. Exception: the labels aren't deepcloned to avoid memory consumption.
Note: Labels are memory consuming to speed up layers like PostGIS and so on.
cloneLayer
in interface FLayer
cloneLayer
in class FLyrVect
public String createNewCode() throws DataException
DataException
public List<RotatedEnvelope> getGeometries(boolean cloned) throws DataException
DataException
public boolean isActiveAsGrid()
public Feature removeGraphicContaining(Point map_p) throws Exception
Exception
public Feature[] removeSelected() throws DataException
DataException
public void draw(BufferedImage bi, Graphics2D g, ViewPort vp, Cancellable ca, double sca) throws ReadException
draw
in interface FLayer
draw
in class FLyrVect
bi
- an image used to accelerate the screen drawg
- for rendering 2-dimensional shapes, text and images on the Java(tm) platformvp
- information for drawing this layerca
- an object thread that implements the Cancellable
interface, and will allow to cancel the drawsca
- value that represents the scaleReadException
- if fails the driver used in this method.FLayer.print(Graphics2D, ViewPort, Cancellable, double, PrintAttributes)
public void setSelectedCodes(List new_sel) throws DataException
DataException
public List getSelectedCodes() throws DataException
DataException
public double getScale()
public double getDimCmX()
public double getDimCmY()
public double getOverlap()
protected void bindToDataStore(DataStore dataStore) throws LoadLayerException
FLyrVect
bindToDataStore
in class FLyrVect
LoadLayerException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class FLyrVect
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
loadFromState
in class FLyrVect
PersistenceException
public static void registerPersistent()