⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rpfcoverage.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
                    + ShowCGProperty, showCG);            showTLM = PropUtils.booleanFromProperties(properties, prefix                    + ShowTLMProperty, showTLM);            showJOG = PropUtils.booleanFromProperties(properties, prefix                    + ShowJOGProperty, showJOG);            showTPC = PropUtils.booleanFromProperties(properties, prefix                    + ShowTPCProperty, showTPC);            showONC = PropUtils.booleanFromProperties(properties, prefix                    + ShowONCProperty, showONC);            showJNC = PropUtils.booleanFromProperties(properties, prefix                    + ShowJNCProperty, showJNC);            showGNC = PropUtils.booleanFromProperties(properties, prefix                    + ShowGNCProperty, showGNC);            showCIB10 = PropUtils.booleanFromProperties(properties, prefix                    + ShowCIB10Property, showCIB10);            showCIB5 = PropUtils.booleanFromProperties(properties, prefix                    + ShowCIB5Property, showCIB5);            showMISC = PropUtils.booleanFromProperties(properties, prefix                    + ShowMISCProperty, showMISC);        }    }    /**     * PropertyConsumer method, to fill in a Properties object,     * reflecting the current values of the layer. If the layer has a     * propertyPrefix set, the property keys should have that prefix     * plus a separating '.' prepended to each propery key it uses for     * configuration.     *      * @param props a Properties object to load the PropertyConsumer     *        properties into. If props equals null, then a new     *        Properties object should be created.     * @return Properties object containing PropertyConsumer property     *         values. If getList was not null, this should equal     *         getList. Otherwise, it should be the Properties object     *         created by the PropertyConsumer.     */    public Properties getProperties(Properties props) {        if (props == null) {            props = new Properties();        }        String prefix = PropUtils.getScopedPropertyPrefix(propertyPrefix);        props.put(prefix + FillProperty, new Boolean(fillRects).toString());        props.put(prefix + CoverageProperty,                new Boolean(showPalette).toString());        props.put(prefix + CoverageOpaquenessProperty,                Integer.toString(opaqueness));        props.put(prefix + CGColorProperty,                Integer.toHexString(CGColor.getRGB()));        props.put(prefix + TLMColorProperty,                Integer.toHexString(TLMColor.getRGB()));        props.put(prefix + JOGColorProperty,                Integer.toHexString(JOGColor.getRGB()));        props.put(prefix + TPCColorProperty,                Integer.toHexString(TPCColor.getRGB()));        props.put(prefix + ONCColorProperty,                Integer.toHexString(ONCColor.getRGB()));        props.put(prefix + JNCColorProperty,                Integer.toHexString(JNCColor.getRGB()));        props.put(prefix + GNCColorProperty,                Integer.toHexString(GNCColor.getRGB()));        props.put(prefix + CIB10ColorProperty,                Integer.toHexString(CIB10Color.getRGB()));        props.put(prefix + CIB5ColorProperty,                Integer.toHexString(CIB5Color.getRGB()));        props.put(prefix + MISCColorProperty,                Integer.toHexString(MISCColor.getRGB()));        return props;    }    /**     * Method to fill in a Properties object with values reflecting     * the properties able to be set on this PropertyConsumer. The key     * for each property should be the raw property name (without a     * prefix) with a value that is a String that describes what the     * property key represents, along with any other information about     * the property that would be helpful (range, default value,     * etc.). For Layer, this method should at least return the     * 'prettyName' property.     *      * @param list a Properties object to load the PropertyConsumer     *        properties into. If getList equals null, then a new     *        Properties object should be created.     * @return Properties object containing PropertyConsumer property     *         values. If getList was not null, this should equal     *         getList. Otherwise, it should be the Properties object     *         created by the PropertyConsumer.     */    public Properties getPropertyInfo(Properties list) {        if (list == null) {            list = new Properties();        }        String interString;        interString = i18n.get(RpfLayer.class,                FillProperty,                I18n.TOOLTIP,                "Flag to set if the coverage rectangles should be filled.");        list.put(FillProperty, interString);        list.put(FillProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.OnOffPropertyEditor");        interString = i18n.get(RpfLayer.class,                FillProperty,                "Fill Coverage Rectangles");        list.put(FillProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                CoverageProperty,                I18n.TOOLTIP,                "Flag to set the coverage palette should be shown.");        list.put(CoverageProperty, interString);        list.put(CoverageProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.OnOffPropertyEditor");        interString = i18n.get(RpfLayer.class,                CoverageProperty,                "Show Coverage Palette");        list.put(CoverageProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                CoverageOpaquenessProperty,                I18n.TOOLTIP,                "Integer representing opaqueness level (0-255, 0 is clear) of coverage rectangles.");        list.put(CoverageOpaquenessProperty, interString);        interString = i18n.get(RpfLayer.class,                CoverageOpaquenessProperty,                "Coverage Opaqueness");        list.put(CoverageOpaquenessProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                CGColorProperty,                I18n.TOOLTIP,                "Color for City Graphics chart coverage.");        list.put(CGColorProperty, interString);        list.put(CGColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                CGColorProperty,                "CG Coverage Color");        list.put(CGColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                TLMColorProperty,                I18n.TOOLTIP,                "Color for TLM chart coverage.");        list.put(TLMColorProperty, interString);        list.put(TLMColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                TLMColorProperty,                "TLM Coverage Color");        list.put(TLMColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                JOGColorProperty,                I18n.TOOLTIP,                "Color for JOG chart coverage.");        list.put(JOGColorProperty, interString);        list.put(JOGColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                JOGColorProperty,                "JOG Coverage Color");        list.put(JOGColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                TPCColorProperty,                I18n.TOOLTIP,                "Color for TPC chart coverage.");        list.put(TPCColorProperty, interString);        list.put(TPCColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                TPCColorProperty,                "TPC Coverage Color");        list.put(TPCColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                ONCColorProperty,                I18n.TOOLTIP,                "Color for ONC chart coverage.");        list.put(ONCColorProperty, interString);        list.put(ONCColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                ONCColorProperty,                "ONC Coverage Color");        list.put(ONCColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                JNCColorProperty,                I18n.TOOLTIP,                "Color for JNC chart coverage.");        list.put(JNCColorProperty, interString);        list.put(JNCColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                JNCColorProperty,                "JNC Coverage Color");        list.put(JNCColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                GNCColorProperty,                I18n.TOOLTIP,                "Color for GNC chart coverage.");        list.put(GNCColorProperty, interString);        list.put(GNCColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                GNCColorProperty,                "GNC Coverage Color");        list.put(GNCColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                CIB10ColorProperty,                I18n.TOOLTIP,                "Color for CIB 10 meter image coverage.");        list.put(CIB10ColorProperty, interString);        list.put(CIB10ColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                CIB10ColorProperty,                "CIB10 Coverage Color");        list.put(CIB10ColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                CIB5ColorProperty,                I18n.TOOLTIP,                "Color for CIB 5 meter image coverage.");        list.put(CIB5ColorProperty, interString);        list.put(CIB5ColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                CIB5ColorProperty,                "CIB5 Coverage Color");        list.put(CIB5ColorProperty + LabelEditorProperty, interString);        interString = i18n.get(RpfLayer.class,                MISCColorProperty,                I18n.TOOLTIP,                "Color for all other chart/image coverage.");        list.put(MISCColorProperty, interString);        list.put(MISCColorProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.ColorPropertyEditor");        interString = i18n.get(RpfLayer.class,                MISCColorProperty,                "Misc Coverage Color");        list.put(MISCColorProperty + LabelEditorProperty, interString);        return list;    }    /**     * Specify what order properties should be presented in an editor.     */    public String getInitPropertiesOrder() {        return " " + FillProperty + " " + CoverageOpaquenessProperty + " "                + GNCColorProperty + " " + JNCColorProperty + " "                + ONCColorProperty + " " + TPCColorProperty + " "                + JOGColorProperty + " " + TLMColorProperty + " "                + CIB10ColorProperty + " " + CIB5ColorProperty + " "                + MISCColorProperty;    }    /**     * Set the property key prefix that should be used by the     * PropertyConsumer. The prefix, along with a '.', should be     * prepended to the property keys known by the PropertyConsumer.     *      * @param prefix the prefix String.     */    public void setPropertyPrefix(String prefix) {        propertyPrefix = prefix;    }    /**     * Get the property key prefix that is being used to prepend to     * the property keys for Properties lookups.     *      * @return the property prefix     */    public String getPropertyPrefix() {        return propertyPrefix;    }    /**     * Prepares the graphics for the layer. This is where the     * getRectangle() method call is made on the rpfcov.     * <p>     * Occasionally it is necessary to abort a prepare call. When this     * happens, the map will set the cancel bit in the LayerThread,     * (the thread that is running the prepare). If this Layer needs     * to do any cleanups during the abort, it should do so, but     * return out of the prepare asap.     *      * @return OMGraphicList of rectangles showing coverages.     */    public void prepare(RpfFrameProvider frameProvider, Projection projection,                        String chartSeries) {        float ullat = 90f;        float ullon = -180f;        float lrlat = -90f;        float lrlon = 180f;        if (projection != null) {            ullat = projection.getUpperLeft().getLatitude();            ullon = projection.getUpperLeft().getLongitude();            lrlat = projection.getLowerRight().getLatitude();            lrlon = projection.getLowerRight().getLongitude();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -