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

📄 tooltipbean.java

📁 GridSphere 门户 提供一个基于 portlet 的高级开放源代码门户。GridSphere 是在欧盟提供基金的 GridLab 项目下开发的
💻 JAVA
字号:
package org.gridsphere.provider.portletui.beans;import org.gridsphere.portlet.impl.SportletProperties;import org.gridsphere.portlet.service.spi.PortletServiceFactory;import org.gridsphere.services.core.portal.PortalConfigService;import javax.portlet.RenderResponse;public class TooltipBean extends BaseComponentBean {    public String name = null;    public String key = null;    public String value = "";    public String id = null;    /**     * Constructs a default table row bean     */    public TooltipBean() {        super();    }    public String getName() {        return name;    }    public void setName(String name) {        this.name = name;    }    public String getKey() {        return key;    }    public void setKey(String key) {        this.key = key;    }    public String getValue() {        return value;    }    public void setValue(String value) {        this.value = value;    }    public String getId() {        return id;    }    public void setId(String id) {        this.id = id;    }    public String toStartString() {        StringBuffer sb = new StringBuffer();        if (key != null) value = getLocalizedText(key);        value = value.replaceAll("\n", "<br>");        PortalConfigService configService = (PortalConfigService) PortletServiceFactory.createPortletService(PortalConfigService.class, true);        String contextPath = "/" + configService.getProperty("gridsphere.deploy");        renderResponse.setProperty("CSS_HREF", contextPath + "/css/yahoo/container.css");        renderResponse.addProperty("JAVASCRIPT_SRC", contextPath + "/javascript/yahoo/dom.js");        renderResponse.addProperty("JAVASCRIPT_SRC", contextPath + "/javascript/yahoo/event.js");        renderResponse.addProperty("JAVASCRIPT_SRC", contextPath + "/javascript/yahoo/container.js");        sb.append("<script type=\"text/javascript\">");        sb.append("var " + id + " = new YAHOO.widget.Tooltip(\"" + id + "\", { context:\"" + name + "\", text:\"" + value + "\" } );");        sb.append("</script>");        return sb.toString();    }    public String toEndString() {        return "";    }}

⌨️ 快捷键说明

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