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

📄 tablecellbean.java

📁 GridSphere 门户 提供一个基于 portlet 的高级开放源代码门户。GridSphere 是在欧盟提供基金的 GridLab 项目下开发的
💻 JAVA
字号:
/* * @author <a href="mailto:novotny@gridsphere.org">Jason Novotny</a> * @version $Id: TableCellBean.java 4496 2006-02-08 20:27:04Z wehrens $ */package org.gridsphere.provider.portletui.beans;/** * A <code>TableCellBean</code> represents a table cell and is contained by a <code>TableRowBean</code> */public class TableCellBean extends BeanContainer implements TagBean {    protected String width = null;    protected String height = null;    protected String align = null;    protected String valign = null;    protected String colspan = null;    protected String rowspan = null;    //protected String TABLE_CELL_STYLE = "portlet-section-body";    /**     * Constructs a default table cell bean     */    public TableCellBean() {        super();        //this.cssClass = TABLE_CELL_STYLE;    }    public TableCellBean(BaseComponentBean compBean) {        super();        this.addBean(compBean);        //this.cssClass = TABLE_CELL_STYLE;    }    /**     * Constructs a table cell bean from a supplied portlet request and bean identifier     *     * @param beanId the bean identifier     */    public TableCellBean(String beanId) {        super();        this.beanId = beanId;        //this.cssClass = TABLE_CELL_STYLE;    }    /**     * Sets the table alignment e.g. "left", "center" or "right"     *     * @param align the table alignment     */    public void setAlign(String align) {        this.align = align;    }    /**     * Returns the table alignment e.g. "left", "center" or "right"     *     * @return the table alignment     */    public String getAlign() {        return align;    }    /**     * Sets the table vertical alignment e.g. "top", "middle", "bottom" or "baseline"     *     * @param valign the table vertical alignment     */    public void setValign(String valign) {        this.valign = valign;    }    /**     * Returns the table vertical alignment e.g. "top", "middle", "bottom" or "baseline"     *     * @return the table vertical alignment     */    public String getValign() {        return valign;    }    /**     * Sets the table cell width     *     * @param width the table cell width     */    public void setWidth(String width) {        this.width = width;    }    /**     * Returns the table cell width     *     * @return the table cell width     */    public String getWidth() {        return width;    }    /**     * Sets the table cell height     *     * @param height the table cell height     */    public void setHeight(String height) {        this.height = height;    }    /**     * Returns the table cell row span     *     * @return the table cell row span     */    public String getRowspan() {        return rowspan;    }    /**     * Sets the table cell row span     *     * @param rowspan the table cell row span     */    public void setRowspan(String rowspan) {        this.rowspan = rowspan;    }    /**     * Returns the table cell col span     *     * @return the table cell col span     */    public String getColspan() {        return colspan;    }    /**     * Sets the table cell col span     *     * @param colspan the table cell col span     */    public void setColspan(String colspan) {        this.colspan = colspan;    }    /**     * Returns the table cell height     *     * @return the table cell height     */    public String getHeight() {        return height;    }    public String toStartString() {        StringBuffer sb = new StringBuffer();        sb.append("<td ");        sb.append(getFormattedCss());        // Attribute 'width' replaced by 'style="width:"' for XHTML 1.0 Strict compliance                                    if (width != null) sb.append(" style=\"width:" + width + "\"");        if (height != null) sb.append(" height=\"" + height + "\"");        if (align != null) sb.append(" align=\"" + align + "\"");        if (valign != null) {            sb.append(" valign=\"" + valign + "\"");        }        if (rowspan != null) sb.append(" rowspan=\"" + rowspan + "\"");        if (colspan != null) sb.append(" colspan=\"" + colspan + "\"");        sb.append(">");        for (BaseComponentBean bean : container) {            sb.append(bean.toStartString());            sb.append(bean.toEndString());        }        return sb.toString();    }    public String toEndString() {        return "</td>";    }}

⌨️ 快捷键说明

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