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

📄 attributebean.java

📁 动画素材图像语义标注系统:该系统实现对图片的语义标注
💻 JAVA
字号:
/*
 *  AttributeBean.java  - java bean containing attribute for map tag
 *  Mark Bryan Yu
 *  jimagemapper.sourceforge.net
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
package cn.dxm.client;

public class AttributeBean {
    private String href;
    private String alt;
    private String title;
    private String onMouseOver;
    private String onMouseOut;
    private String onClick;

    public String getHref() {
        return href;
    }

    public String getAlt() {
        return alt;
    }

    public String getTitle() {
        return title;
    }

    public String getOnMouseOver() {
        return onMouseOver;
    }

    public String getOnMouseOut() {
        return onMouseOut;
    }

    public String getOnClick() {
        return onClick;
    }

    public void setHref(String href) {
        this.href = href.replaceAll("\"", """);
    }

    public void setAlt(String alt) {
        this.alt = alt.replaceAll("\"", """);
    }

    public void setTitle(String title) {
        this.title = title.replaceAll("\"", """);
    }

    public void setOnMouseOver(String onMouseOver) {
        this.onMouseOver = onMouseOver.replaceAll("\"", """);
    }

    public void setOnMouseOut(String onMouseOut) {
        this.onMouseOut = onMouseOut.replaceAll("\"", """);
    }

    public void setOnClick(String onClick) {
        this.onClick = onClick.replaceAll("\"", """);
    }

    public String generateHtmlCode() {
        StringBuffer buffer = new StringBuffer();
        if(href != null && href.trim().length() > 0) {
			buffer.append(href).append(";");
        }
        if(alt != null && alt.trim().length() > 0) {
            buffer.append("alt=\"").append(alt).append("\"").append(";");
        }
        return buffer.toString().trim();
    }
}

⌨️ 快捷键说明

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