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

📄 legendurl.java

📁 电子地图服务器,搭建自己的地图服务
💻 JAVA
字号:
/*
 * This code is licensed under the GPL 2.0 license, available at the root
 * application directory.
 */
package org.vfny.geoserver.global;

import org.vfny.geoserver.global.dto.LegendURLDTO;


/**
 * This class represents legend icon parameters.
 *
 * @author Charles Kolbowicz
 * @version $Id: LegendURL.java 6177 2007-02-19 10:11:27Z aaime $
 */
public class LegendURL extends GlobalLayerSupertype {
    /** Holds value of legend icon width. */
    private int width;

    /** Holds value of legend icon height. */
    private int height;

    /** Holds value of legend icon format. */
    private String format;

    /** Holds value of legend icon onlineResource. */
    private String onlineResource;

    /**
     * Legend constructor.
     *
     * <p>
     * Stores the new LegendURLDTO data for this LegendURL.
     * </p>
     *
     * @param dto
     *
     * @throws NullPointerException when the param is null
     */
    public LegendURL(LegendURLDTO dto) {
        if (dto == null) {
            throw new NullPointerException();
        }

        onlineResource = dto.getOnlineResource();
        format = dto.getFormat();
        width = dto.getWidth();
        height = dto.getHeight();
    }

    /**
     * load purpose.
     *
     * <p>
     * loads a new copy of data into this object.
     * </p>
     *
     * @param dto
     *
     * @throws NullPointerException DOCUMENT ME!
     */
    public void load(LegendURLDTO dto) {
        if (dto == null) {
            throw new NullPointerException();
        }

        onlineResource = dto.getOnlineResource();
        format = dto.getFormat();
        width = dto.getWidth();
        height = dto.getHeight();
    }

    Object toDTO() {
        LegendURLDTO dto = new LegendURLDTO();
        dto.setOnlineResource(onlineResource);
        dto.setFormat(format);
        dto.setWidth(width);
        dto.setHeight(height);

        return dto;
    }

    /**
     * Getter for legend icon width.
     *
     * @return Value of property width.
     */
    public int getWidth() {
        return this.width;
    }

    /**
     * Getter for  legend icon height.
     *
     * @return Value of  legend icon height.
     */
    public int getHeight() {
        return this.height;
    }

    /**
     * Getter for legend icon format.
     *
     * @return Value of  legend icon format.
     */
    public String getFormat() {
        return this.format;
    }

    /**
     * Getter for  legend icon onlineResource.
     *
     * @return Value of  legend icon onlineResource.
     */
    public String getOnlineResource() {
        return this.onlineResource;
    }
}

⌨️ 快捷键说明

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