public class MapSheetsUtils extends Object
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_LENGTH_FOR_POINTS |
static File |
lastOutPdfFolder |
static File |
lastOutShpFolder |
static String[] |
LETTERS |
static double |
META_BOX_PLUS_MARGIN |
static MediaTracker |
mt |
static PrinterJob |
printerJob |
static IFillSymbol |
SHEET_GRID_SYMBOL_EDIT |
static IFillSymbol |
SHEET_GRID_SYMBOL_NORMAL |
Constructor and Description |
---|
MapSheetsUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addBackLayer(MapSheetsLayoutTemplate lyt_tem,
FLayer lyr) |
static void |
addFrame(LayoutContext lc,
IFFrame fra,
int lvl) |
static void |
addMapSheetsGrid(File shpfile,
MapControl mco) |
static boolean |
areSameBasicType(int ta,
int tb) |
static Color |
argbToColor(String argb_str) |
static void |
checkFrameListensToViewPort(MapSheetFrameView fra) |
static MapContext |
cloneMapContext(MapContext mco,
Component optional_parent) |
static MapContext |
cloneMapContextRemoveGrids(MapContext mco,
Component optional_parent) |
static ViewDocument |
cloneProjectView(ViewDocument vdoc,
Component parent) |
static boolean |
componentOf(Class cls,
Behavior be) |
static ArrayList[] |
createFrames(boolean cover_view_selected,
boolean selected_only,
Rectangle2D useful_map_cm,
ViewPort vp,
long scale,
int overlap_pc,
IProjection iproj,
FLyrVect ler) |
static String |
createNewName() |
static void |
createPdfMaps(MapSheetsLayoutTemplate lay_template,
boolean all_sheets,
FLayer back_lyr,
File targetFolder,
String base_name,
IProgressListener progListen,
CancellableTask canc) |
static PrintQuality |
dpiToPrintQuality(int dpi) |
static int |
dpiToPrintQualityIndex(int dpi) |
static Object |
findIn(Class wanted_class,
Behavior possibly_compound) |
static ArrayList |
getActiveLayers(FLayers lyrs) |
static MapSheetsGrid |
getActiveMapSheetGrid(MapContext mx) |
static ArrayList |
getAllLayersFrom(FLayers lyrs) |
static Rectangle2D |
getBBForCenterMapSizeScale(double cx,
double cy,
double mapw,
double maph,
int scaleDenom) |
static Behavior |
getBehaviorFrom(Behavior beh,
Class clazz) |
static int |
getDPI(LayoutDocument lyt) |
static ArrayList |
getEnvelopesOfGeometries(ArrayList geoms) |
static String |
getFormattedDouble(double d,
int decs) |
static ISymbol |
getFrameSymbol_editing() |
static ISymbol |
getFrameSymbol_normal() |
static ISymbol |
getFrameSymbol(boolean editing,
boolean sel) |
static Image |
getImage(File data)
Gets an image from a file in a well known format (p ng, j pg, g if)
|
static int |
getIndexOfLayer(FLayer lay,
FLayers play) |
static Rectangle2D |
getItemBB(int x,
int y,
int xc,
int yc,
Rectangle2D bb) |
static ArrayList |
getLayers(FLayers ll,
int[] basic_types,
boolean only_vect) |
static double |
getMetaBoxHeightFromPaperSize(Size psi)
Get meta box (cajetin) height in cm
|
static Project |
getProject() |
static double |
getWHRatio(MapSheetsGrid gri) |
static void |
initViewPort(ViewDocument pv,
double whratio) |
static boolean |
isIn(String str,
List alist) |
static boolean |
isLetter(String str,
boolean casesen) |
static boolean |
isLinear(int ty) |
static boolean |
isPoint(int ty) |
static boolean |
isPolygonal(int ty) |
static void |
joinRadioButtons(ArrayList lis) |
static void |
loadMapSheetsGrid(MapSheetsGrid grid,
File shpfile) |
static void |
loadMapSheetsGrid(MapSheetsGrid grid,
List rotenv_list,
List cod_list,
List added_names,
List added_types,
List added_vals)
Adds sheets using data from lists
|
static String |
nextLetter(String _str) |
static boolean |
printerSettingsSaveRestore(String name,
String fname,
boolean save) |
static void |
printMapSheetsLayout(MapSheetsLayoutTemplate tem,
FLayer background_layer,
boolean user_wants_printer_setts) |
static Geometry |
rectToGeom(Rectangle2D r) |
static String |
rectToStr(Rectangle2D r) |
static void |
removeLayer(MapSheetsLayoutTemplate lyt_tem,
FLayer lyr) |
static void |
removeLayers(FLayers lyrs,
Class clazz) |
static boolean |
reservedName(String name) |
static boolean |
reverseSelection(MapSheetsGrid gr,
String code) |
static Rectangle2D |
scaleRect(Rectangle2D r,
double sc) |
static void |
setFactoryInActiveFrames(LayoutDocument lyt) |
static void |
setGridsToVisible(FLayers lyrs,
boolean b)
Returns null if tag must not be drawn
|
static void |
setOnlyActive(FLayer lyr,
FLayers root) |
static Rectangle2D |
strToRect(String str) |
static boolean |
thereIsWindowOfClass(Class clazz,
boolean must_be_active_window) |
static void |
toSHP(MapSheetsGrid grid,
MapContext mco,
Component parent)
If outf is null, user will be asked to provide one
|
static Envelope |
undetectableChange(Envelope env) |
static boolean |
validCode(MapSheetsGrid gri,
String str) |
static String |
validMapSheetsGridShp(File shpf,
IProjection pro) |
public static final double META_BOX_PLUS_MARGIN
public static double DEFAULT_LENGTH_FOR_POINTS
public static IFillSymbol SHEET_GRID_SYMBOL_NORMAL
public static IFillSymbol SHEET_GRID_SYMBOL_EDIT
public static MediaTracker mt
public static final String[] LETTERS
public static File lastOutShpFolder
public static File lastOutPdfFolder
public static PrinterJob printerJob
public static int getDPI(LayoutDocument lyt)
public static double getMetaBoxHeightFromPaperSize(Size psi)
psi
- paper size in cmpublic static Rectangle2D getBBForCenterMapSizeScale(double cx, double cy, double mapw, double maph, int scaleDenom)
public static Rectangle2D getItemBB(int x, int y, int xc, int yc, Rectangle2D bb)
public static String getFormattedDouble(double d, int decs)
public static void createPdfMaps(MapSheetsLayoutTemplate lay_template, boolean all_sheets, FLayer back_lyr, File targetFolder, String base_name, IProgressListener progListen, CancellableTask canc) throws DataException
DataException
public static void addBackLayer(MapSheetsLayoutTemplate lyt_tem, FLayer lyr)
public static void removeLayer(MapSheetsLayoutTemplate lyt_tem, FLayer lyr)
public static ArrayList[] createFrames(boolean cover_view_selected, boolean selected_only, Rectangle2D useful_map_cm, ViewPort vp, long scale, int overlap_pc, IProjection iproj, FLyrVect ler) throws Exception
Exception
public static Geometry rectToGeom(Rectangle2D r) throws LocatorException, CreateEnvelopeException
public static ISymbol getFrameSymbol(boolean editing, boolean sel)
public static ISymbol getFrameSymbol_normal()
public static ISymbol getFrameSymbol_editing()
public static Image getImage(File data)
data
- the image filepublic static Rectangle2D scaleRect(Rectangle2D r, double sc)
public static ArrayList getLayers(FLayers ll, int[] basic_types, boolean only_vect) throws Exception
Exception
public static void addFrame(LayoutContext lc, IFFrame fra, int lvl)
public static boolean isLetter(String str, boolean casesen)
public static void toSHP(MapSheetsGrid grid, MapContext mco, Component parent) throws Exception
grid
- mco
- parent
- outf
- Exception
public static void addMapSheetsGrid(File shpfile, MapControl mco) throws Exception
Exception
public static void loadMapSheetsGrid(MapSheetsGrid grid, File shpfile) throws Exception
Exception
public static boolean reservedName(String name)
name
- public static String validMapSheetsGridShp(File shpf, IProjection pro) throws Exception
Exception
public static MapSheetsGrid getActiveMapSheetGrid(MapContext mx)
public static Envelope undetectableChange(Envelope env) throws Exception
Exception
public static void setGridsToVisible(FLayers lyrs, boolean b)
g
- _bb
- str
- public static double getWHRatio(MapSheetsGrid gri) throws Exception
Exception
public static void initViewPort(ViewDocument pv, double whratio)
public static void joinRadioButtons(ArrayList lis)
public static void checkFrameListensToViewPort(MapSheetFrameView fra)
public static PrintQuality dpiToPrintQuality(int dpi)
public static int dpiToPrintQualityIndex(int dpi)
public static boolean validCode(MapSheetsGrid gri, String str) throws Exception
Exception
public static String rectToStr(Rectangle2D r)
public static Rectangle2D strToRect(String str)
public static ViewDocument cloneProjectView(ViewDocument vdoc, Component parent)
public static Project getProject()
public static boolean reverseSelection(MapSheetsGrid gr, String code) throws Exception
gr
- iv
- Exception
public static void printMapSheetsLayout(MapSheetsLayoutTemplate tem, FLayer background_layer, boolean user_wants_printer_setts)
public static void setFactoryInActiveFrames(LayoutDocument lyt)
public static boolean printerSettingsSaveRestore(String name, String fname, boolean save)
public static boolean isPolygonal(int ty)
public static boolean isLinear(int ty)
public static boolean isPoint(int ty)
public static boolean areSameBasicType(int ta, int tb)
public static String createNewName()
public static MapContext cloneMapContextRemoveGrids(MapContext mco, Component optional_parent)
public static MapContext cloneMapContext(MapContext mco, Component optional_parent) throws Exception
Exception
public static boolean thereIsWindowOfClass(Class clazz, boolean must_be_active_window)
public static void loadMapSheetsGrid(MapSheetsGrid grid, List rotenv_list, List cod_list, List added_names, List added_types, List added_vals) throws Exception
grid
- rotenv_list
- cod_list
- added_names
- added_types
- added_vals
- Exception