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

📄 abstractplugin.java

📁 openmap java写的开源数字地图程序. 用applet实现,可以像google map 那样放大缩小地图.
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
     *      * @param prefix a String used by the PropertyConsumer to prepend to each     *        property value it wants to look up -     *        setList.getProperty(prefix.propertyKey). If the prefix had already     *        been set, then the prefix passed in should replace that previous     *        value.     * @param setList a Properties object that the PropertyConsumer can use to     *        retrieve expected properties it can use for configuration.     */    public void setProperties(String prefix, Properties setList) {        setPropertyPrefix(prefix);        String realPrefix = PropUtils.getScopedPropertyPrefix(prefix);        name = setList.getProperty(realPrefix + Layer.PrettyNameProperty);        setAddToBeanContext(PropUtils.booleanFromProperties(setList, realPrefix                + Layer.AddToBeanContextProperty, addToBeanContext));        setRemovable(PropUtils.booleanFromProperties(setList, realPrefix                + RemovableProperty, removable));    }    /**     * Method to fill in a Properties object, reflecting the current values of     * the PropertyConsumer. If the PropertyConsumer has a prefix set, the     * property keys should have that prefix plus a separating '.' prepended to     * each propery key it uses for configuration.     *      * @param getList 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 getProperties(Properties getList) {        if (getList == null) {            getList = new Properties();        }        String realPrefix = PropUtils.getScopedPropertyPrefix(this);        getList.put(realPrefix + Layer.AddToBeanContextProperty,                new Boolean(addToBeanContext).toString());        getList.put(prefix + RemovableProperty,                new Boolean(removable).toString());        return getList;    }    /**     * 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.).     *      * @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 internString = i18n.get(Layer.class,                Layer.AddToBeanContextProperty,                I18n.TOOLTIP,                "Flag to give access to all of the other application components.");        list.put(Layer.AddToBeanContextProperty, internString);        internString = i18n.get(Layer.class,                Layer.AddToBeanContextProperty,                "Add to MapHandler");        list.put(Layer.AddToBeanContextProperty + LabelEditorProperty, internString);        list.put(Layer.AddToBeanContextProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.YesNoPropertyEditor");        internString = i18n.get(AbstractPlugIn.class,                RemovableProperty,                I18n.TOOLTIP,                "Flag to allow layer to be deleted.");        list.put(RemovableProperty, internString);        internString = i18n.get(Layer.class, RemovableProperty, "Removable");        list.put(RemovableProperty + LabelEditorProperty, internString);        list.put(RemovableProperty + ScopedEditorProperty,                "com.bbn.openmap.util.propertyEditor.YesNoPropertyEditor");        return list;    }    /**     * 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) {        this.prefix = prefix;    }    /**     * Get the property key prefix that is being used to prepend to the property     * keys for Properties lookups.     *      * @return the property prefix for the plugin.     */    public String getPropertyPrefix() {        return prefix;    }    // /////// MapMouseListener interface methods    /**     * Return a list of the modes that are interesting to the MapMouseListener.     * The source MouseEvents will only get sent to the MapMouseListener if the     * mode is set to one that the listener is interested in. Layers interested     * in receiving events should register for receiving events in "select"     * mode: <code>     * <pre>     * return new String[] { SelectMouseMode.modeID };     * </pre>     * <code>     * @return String[] of modeID's     * @see com.bbn.openmap.event.NavMouseMode#modeID     * @see com.bbn.openmap.event.SelectMouseMode#modeID     * @see com.bbn.openmap.event.NullMouseMode#modeID     */    public String[] getMouseModeServiceList() {        return new String[] { SelectMouseMode.modeID };    }    // Mouse Listener events    // //////////////////////    /**     * Invoked when a mouse button has been pressed on a component.     *      * @param e MouseEvent     * @return true if the listener was able to process the event.     */    public boolean mousePressed(MouseEvent e) {        return false;    }    /**     * Invoked when a mouse button has been released on a component.     *      * @param e MouseEvent     * @return true if the listener was able to process the event.     */    public boolean mouseReleased(MouseEvent e) {        return false;    }    /**     * Invoked when the mouse has been clicked on a component. The listener will     * receive this event if it successfully processed     * <code>mousePressed()</code>, or if no other listener processes the     * event. If the listener successfully processes <code>mouseClicked()</code>,     * then it will receive the next <code>mouseClicked()</code> notifications     * that have a click count greater than one.     * <p>     * NOTE: We have noticed that this method can sometimes be erroneously     * invoked. It seems to occur when a light-weight AWT component (like an     * internal window or menu) closes (removes itself from the window     * hierarchy). A specific OpenMap example is when you make a menu selection     * when the MenuItem you select is above the MapBean canvas. After making     * the selection, the mouseClicked() gets invoked on the MouseDelegator,     * which passes it to the appropriate listeners depending on the MouseMode.     * The best way to avoid this problem is to not implement anything crucial     * in this method. Use a combination of <code>mousePressed()</code> and     * <code>mouseReleased()</code> instead.     *      * @param e MouseEvent     * @return true if the listener was able to process the event.     */    public boolean mouseClicked(MouseEvent e) {        return false;    }    /**     * Invoked when the mouse enters a component.     *      * @param e MouseEvent     */    public void mouseEntered(MouseEvent e) {}    /**     * Invoked when the mouse exits a component.     *      * @param e MouseEvent     */    public void mouseExited(MouseEvent e) {}    // Mouse Motion Listener events    // /////////////////////////////    /**     * Invoked when a mouse button is pressed on a component and then dragged.     * The listener will receive these events if it successfully processes     * mousePressed(), or if no other listener processes the event.     *      * @param e MouseEvent     * @return true if the listener was able to process the event.     */    public boolean mouseDragged(MouseEvent e) {        return false;    }    /**     * Invoked when the mouse button has been moved on a component (with no     * buttons down).     *      * @param e MouseEvent     * @return true if the listener was able to process the event.     */    public boolean mouseMoved(MouseEvent e) {        return false;    }    /**     * Handle a mouse cursor moving without the button being pressed. This event     * is intended to tell the listener that there was a mouse movement, but     * that the event was consumed by another layer. This will allow a mouse     * listener to clean up actions that might have happened because of another     * motion event response.     */    public void mouseMoved() {}    /**     * Method that gets called when the PlugInLayer has been removed from the     * map, so the PlugIn can free up resources.     */    public void removed() {}}

⌨️ 快捷键说明

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