/** * Get a Map of the supported Tactical Graphic symbols. * @return a Map of SymbolDefs keyed by symbol code. */ public Map<String, SymbolDef> getSupportedTGTypes(int symStd) { Map<String, SymbolDef> types; Map<String,SymbolDef> defs = SymbolDefTable.getInstance().GetAllSymbolDefs(symStd); types = new HashMap<String, SymbolDef>(); Collection<SymbolDef> symbols = defs.values(); Iterator<SymbolDef> itr = symbols.iterator(); SymbolDef item; while(itr.hasNext()) { item = itr.next(); if(!SymbolUtilities.isMCSSpecificTacticalGraphic(item)) types.put(item.getBasicSymbolId(),item); } return types; }
/** * Get a Map of the supported Tactical Graphic symbols. * @return a Map of SymbolDefs keyed by symbol code. */ public Map<String, SymbolDef> getSupportedTGTypes(int symStd) { Map<String, SymbolDef> types; Map<String,SymbolDef> defs = SymbolDefTable.getInstance().GetAllSymbolDefs(symStd); types = new HashMap<String, SymbolDef>(); Collection<SymbolDef> symbols = defs.values(); Iterator<SymbolDef> itr = symbols.iterator(); SymbolDef item; while(itr.hasNext()) { item = itr.next(); if(!SymbolUtilities.isMCSSpecificTacticalGraphic(item)) types.put(item.getBasicSymbolId(),item); } return types; }
/** * Determines in the symbol is a multipoint symbol. This includes circular & * rectangular symbols that may have only 1 actual point but has AM, AN, * width or height defined that's lets the renderer derive the remaining * point. * * @param symbolID * @param symStd * Like RendererSettings.Symbology_2525C * @return */ public Boolean isMultiPointSymbol(String symbolID, int symStd) { return SymbolDefTable.getInstance().isMultiPoint(SymbolUtilities.getBasicSymbolID(symbolID), symStd); }
/** * Determines in the symbol is a multipoint symbol. This includes circular & * rectangular symbols that may have only 1 actual point but has AM, AN, * width or height defined that's lets the renderer derive the remaining * point. * * @param symbolID * @param symStd * Like RendererSettings.Symbology_2525C * @return */ public Boolean isMultiPointSymbol(String symbolID, int symStd) { return SymbolDefTable.getInstance().isMultiPoint(SymbolUtilities.getBasicSymbolID(symbolID), symStd); }
private static Boolean IsOnePointSymbolCode(String symbolCode) { int symStd = RendererSettings.getInstance().getSymbologyStandard(); String basicCode = SymbolUtilities.getBasicSymbolID(symbolCode); SymbolDef sd = null; if (SymbolDefTable.getInstance().HasSymbolDef(basicCode, symStd)) { sd = SymbolDefTable.getInstance().getSymbolDef(basicCode, symStd); if (symbolCode.charAt(0) == 'G' && sd.getMaxPoints() == 1) { return true; } } //some airspaces affected if (symbolCode.equals("CAKE-----------")) { return true; } else if (symbolCode.equals("CYLINDER-------")) { return true; } else if (symbolCode.equals("RADARC---------")) { return true; } return false; }
private static Boolean IsOnePointSymbolCode(String symbolCode) { int symStd = RendererSettings.getInstance().getSymbologyStandard(); String basicCode = SymbolUtilities.getBasicSymbolID(symbolCode); SymbolDef sd = null; if (SymbolDefTable.getInstance().HasSymbolDef(basicCode, symStd)) { sd = SymbolDefTable.getInstance().getSymbolDef(basicCode, symStd); if (symbolCode.charAt(0) == 'G' && sd.getMaxPoints() == 1) { return true; } } //some airspaces affected if (symbolCode.equals("CAKE-----------")) { return true; } else if (symbolCode.equals("CYLINDER-------")) { return true; } else if (symbolCode.equals("RADARC---------")) { return true; } return false; }
/** * returns true if the symbol code * represents a symbol that has control points * @param symStd RendererSettings.Symbology_2525C * @param strSymbolID * @return */ public static boolean isTGWithControlPoints(String strSymbolID, int symStd) { String temp = getBasicSymbolID(strSymbolID); SymbolDef sd = SymbolDefTable.getInstance().getSymbolDef(temp,symStd); if (sd != null && sd.getDrawCategory() == SymbolDef.DRAW_CATEGORY_ROUTE) return true; else return false;//blRetVal; }
public static Boolean hasAMmodifierRadius(String symbolID, int symStd) { SymbolDef sd = null; Boolean returnVal = false; String basic = SymbolUtilities.getBasicSymbolID(symbolID); sd = SymbolDefTable.getInstance().getSymbolDef(basic, symStd); if(sd != null) { int dc = sd.getDrawCategory(); switch(dc) { case SymbolDef.DRAW_CATEGORY_CIRCULAR_PARAMETERED_AUTOSHAPE://radius case SymbolDef.DRAW_CATEGORY_CIRCULAR_RANGEFAN_AUTOSHAPE: returnVal = true; break; default: returnVal = false; } } return returnVal; }
public static Boolean hasANmodifier(String symbolID, int symStd) { SymbolDef sd = null; Boolean returnVal = false; String basic = SymbolUtilities.getBasicSymbolID(symbolID); sd = SymbolDefTable.getInstance().getSymbolDef(basic, symStd); if(sd != null) { int dc = sd.getDrawCategory(); switch(dc) { case SymbolDef.DRAW_CATEGORY_RECTANGULAR_PARAMETERED_AUTOSHAPE://width case SymbolDef.DRAW_CATEGORY_SECTOR_PARAMETERED_AUTOSHAPE: returnVal = true; break; default: returnVal = false; } } return returnVal; }
public static Boolean hasAMmodifierWidth(String symbolID, int symStd) { SymbolDef sd = null; Boolean returnVal = false; String basic = SymbolUtilities.getBasicSymbolID(symbolID); sd = SymbolDefTable.getInstance().getSymbolDef(basic, symStd); if(sd != null) { int dc = sd.getDrawCategory(); switch(dc) { case SymbolDef.DRAW_CATEGORY_RECTANGULAR_PARAMETERED_AUTOSHAPE://width case SymbolDef.DRAW_CATEGORY_SECTOR_PARAMETERED_AUTOSHAPE: case SymbolDef.DRAW_CATEGORY_TWO_POINT_RECT_PARAMETERED_AUTOSHAPE: returnVal = true; break; case SymbolDef.DRAW_CATEGORY_LINE: if(sd.getModifiers().indexOf(ModifiersTG.AM_DISTANCE + ".")>-1) returnVal = true; break; default: returnVal = false; } } return returnVal; }
if (SymbolDefTable.getInstance().HasSymbolDef(basicID, symStd)) { sd = SymbolDefTable.getInstance().getSymbolDef(basicID, symStd);
if(isTacticalGraphic(strSymbolID)) SymbolDefTable symDefTable = SymbolDefTable.getInstance(); SymbolDef sd = symDefTable.getSymbolDef(basicID,symStd); if(sd.getGeometry().equals("point"))
sd = SymbolDefTable.getInstance().getSymbolDef(basic, symStd); if(sd != null)
if(isNBC(symbolID))//just 3 NBCs have DOM temp = SymbolDefTable.getInstance().getSymbolDef(getBasicSymbolID(symbolID),symStd); if(temp != null)
private ArrayList<MilStdDef> getAllMilStdDefs(int symStd) Map<String,SymbolDef> SDs = SymbolDefTable.getInstance().GetAllSymbolDefs(symStd); Map<String,UnitDef> UDs = UnitDefTable.getInstance().GetAllUnitDefs(symStd); ArrayList<SymbolDef> SDDups = SymbolDefTable.getInstance().GetAllSymbolDefDups(symStd); ArrayList<UnitDef> UDDups = UnitDefTable.getInstance().GetUnitDefDups(symStd);
/** * Try to make sure everything is loaded during server creation so later * calls to the renderer don't crap out due to the font files not being * loaded. Sometimes the 'X's appear because of font loading errors. * This is an attempt to fix that. * * @author Spinelli */ private void preloadRenderer() { try { if (_preloadedRenderer == false) { MilStdSymbol foo = null; foo = new MilStdSymbol("SFGPUCDM-------", "", null, null); UnitFontLookup.getInstance(); SinglePointLookup.getInstance(); SymbolDefTable.getInstance(); UnitDefTable.getInstance(); foo = null; SinglePointFont.getInstance().getSPFont(50); SinglePointFont.getInstance().getUnitFont(50); _preloadedRenderer = true; // System.out.println("preloaded"); } } catch (Exception exc) { // System.err.println(exc.getMessage()); // System.err.println(ErrorLogger.getStackTrace(exc)); ErrorLogger.LogException("SinglePointServer", "preloadRenderer", exc, Level.WARNING); } }
/** * Try to make sure everything is loaded during server creation so later * calls to the renderer don't crap out due to the font files not being * loaded. Sometimes the 'X's appear because of font loading errors. * This is an attempt to fix that. * * @author Spinelli */ private void preloadRenderer() { try { if (_preloadedRenderer == false) { MilStdSymbol foo = null; foo = new MilStdSymbol("SFGPUCDM-------", "", null, null); UnitFontLookup.getInstance(); SinglePointLookup.getInstance(); SymbolDefTable.getInstance(); UnitDefTable.getInstance(); foo = null; SinglePointFont.getInstance().getSPFont(50); SinglePointFont.getInstance().getUnitFont(50); _preloadedRenderer = true; // System.out.println("preloaded"); } } catch (Exception exc) { // System.err.println(exc.getMessage()); // System.err.println(ErrorLogger.getStackTrace(exc)); ErrorLogger.LogException("SinglePointServer", "preloadRenderer", exc, Level.WARNING); } }
_SymbolDefTable = SymbolDefTable.getInstance();
sDef = SymbolDefTable.getInstance().getSymbolDef(SymbolUtilities.getBasicSymbolID(symbol.getSymbolID()),symStd); if(sDef != null)
sDef = SymbolDefTable.getInstance().getSymbolDef(SymbolUtilities.getBasicSymbolID(symbol.getSymbolID()),symStd); if(sDef != null)