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.RegisterPersistenceFLyrDefault.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, metadataContainerMETADATA_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, updateactivationChanged, 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, wakeUpdispose, disposeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddError, 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, visibleRequiredgetProjection, reProjectgetMetadataNameclear, delegate, getDynClass, getDynValue, hasDynValue, implement, invokeDynMethod, invokeDynMethod, setDynValuedisposegetExtendedProperties, getProperty, setPropertyaddLegendListener, removeLegendListenerpublic 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 IMapSheetsIdentifiedpublic Feature addSheet(RotatedEnvelope re, String id_label, Feature fields) throws SheetInsertException
SheetInsertExceptionpublic boolean isWritable()
FLayerReturns the writing status of this layer.
One layer is writable if there is a writing driver for this layer.
isWritable in interface FLayerisWritable in class FLyrVecttrue if there is a writing driver for this layer; false otherwisepublic FLayer cloneLayer()
FLayerThis 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 FLayercloneLayer in class FLyrVectpublic String createNewCode() throws DataException
DataExceptionpublic List<RotatedEnvelope> getGeometries(boolean cloned) throws DataException
DataExceptionpublic boolean isActiveAsGrid()
public Feature removeGraphicContaining(Point map_p) throws Exception
Exceptionpublic Feature[] removeSelected() throws DataException
DataExceptionpublic void draw(BufferedImage bi, Graphics2D g, ViewPort vp, Cancellable ca, double sca) throws ReadException
draw in interface FLayerdraw in class FLyrVectbi - 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
DataExceptionpublic List getSelectedCodes() throws DataException
DataExceptionpublic double getScale()
public double getDimCmX()
public double getDimCmY()
public double getOverlap()
protected void bindToDataStore(DataStore dataStore) throws LoadLayerException
FLyrVectbindToDataStore in class FLyrVectLoadLayerExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class FLyrVectPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class FLyrVectPersistenceExceptionpublic static void registerPersistent()