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

📄 rowhelper.java

📁 一个很好的开源项目管理系统源代码
💻 JAVA
字号:
package net.java.workeffort.infrastructure.view;import java.io.Serializable;import net.java.workeffort.infrastructure.Constants;import org.apache.commons.lang.builder.ToStringBuilder;/** * A row helper used in multi row processing. * @author Antony Joseph */public class RowHelper implements Serializable {    private String processTypePath;    private String processType;    private boolean insert = false;    private boolean viewonly = false;    private boolean odd = true;    public void setProcessType(String processType) {        this.processType = processType;        if (processType == null || processType.length() == 0) {            insert = false;            viewonly = true;        }        else if (Constants.PROCESS_TYPE_INSERT.equals(processType)) {            insert = true;            viewonly = false;        }        else if (Constants.PROCESS_TYPE_UPDATE.equals(processType)) {            insert = false;            viewonly = false;        }        else if (Constants.PROCESS_TYPE_DELETE.equals(processType)) {            insert = false;            viewonly = false;        }        else {            insert = false;            viewonly = true;        }    }    public String getProcessType() {        return this.processType;    }        /**     * @return Returns the processTypePath.     */    public String getProcessTypePath() {        return processTypePath;    }    /**     * @param processTypePath The processTypePath to set.     */    public void setProcessTypePath(String processTypePath) {        this.processTypePath = processTypePath;    }    public String getKeyReadonly() {        if (insert)            return "false";        else            return "true";    }    public String getFldReadonly() {        if (viewonly)            return "true";        else             return "false";    }    public String getKeyCss() {        if (insert)            return "";        else            return "readonlyField";    }    public String getFldCss() {        if (viewonly)            return "readonlyField";        else            return "";    }    public String getRowCss() {        if (odd) {            odd = false;            return "odd";        }        else {            odd = true;            return "even";        }    }    /** @return string representation */    public String toString() {        return ToStringBuilder.reflectionToString(this);    }}

⌨️ 快捷键说明

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