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

📄 hintsmapbeanrepaintpolicy.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
字号:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/HintsMapBeanRepaintPolicy.java,v $// $RCSfile: HintsMapBeanRepaintPolicy.java,v $// $Revision: 1.2.2.1 $// $Date: 2004/10/14 18:26:36 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap;import java.awt.Graphics;import java.util.Properties;import com.bbn.openmap.layer.policy.RenderingHintsRenderPolicy;/** * The class lets you set RenderingHints on the MapBean, to set * anti-aliasing, etc. This class can be added to the OpenMap * application via the openmap.components property in the * openmap.properties file. */public class HintsMapBeanRepaintPolicy extends StandardMapBeanRepaintPolicy        implements Cloneable {    protected RenderingHintsRenderPolicy hints;    public HintsMapBeanRepaintPolicy() {        super();        setHints(new RenderingHintsRenderPolicy());    }    public HintsMapBeanRepaintPolicy(MapBean mb) {        super(mb);        setHints(new RenderingHintsRenderPolicy());    }    public void setHints(RenderingHintsRenderPolicy rhrp) {        hints = rhrp;    }    public RenderingHintsRenderPolicy getHints() {        return hints;    }    /**     * A hook for the RepaintPolicy to make any adjustments to the     * java.awt.Graphics object before sending the Graphics object to     * the layers for painting. Gives the policy a chance to make     * rendering hint changes on Graphic2D objects, setting     * anti-aliasing configurations, etc. No modifications are made.     */    public Graphics modifyGraphicsForPainting(Graphics graphics) {        if (hints != null) {            hints.setRenderingHints(graphics);        }        return graphics;    }    public void setProperties(String prefix, Properties props) {        super.setProperties(prefix, props);        if (hints != null) {            hints.setProperties(prefix, props);        }    }    public Properties getProperties(Properties props) {        props = super.getProperties(props);        if (hints != null) {            props = hints.getProperties(props);        }        return props;    }    public Properties getPropertyInfo(Properties props) {        props = super.getPropertyInfo(props);        if (hints != null) {            props = hints.getPropertyInfo(props);        }        return props;    }    public Object clone() {        HintsMapBeanRepaintPolicy bmbrp = new HintsMapBeanRepaintPolicy();        bmbrp.setHints(getHints());        return bmbrp;    }}

⌨️ 快捷键说明

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