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

📄 pdapane.java

📁 一个简单的java邮件系统
💻 JAVA
字号:
/*
 * @(#)PdaPane.java
 *
 * Copyright (C) 2006 Sergey Bredikhin
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library 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
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package olivax.webmail;

import oliva.common.OlivaUtils;

public class PdaPane {

	public PdaPane() {
	}

	private String height = "";
	
	private int color = 0;
	
	private String content = "";
	
	public static final int COLOR_0099CC = 0;
	
	public static final int COLOR_9999CC = 1;
	
	public static final int COLOR_CCCC99 = 2;
	
	public static final int COLOR_CCCCCC = 3;
	
	public static final int COLOR_CCFF99 = 4;
	
	public static final int COLOR_FFFFFF = 5;
	
	private final String colors[] = { "0099cc", "9999cc", "cccc99", "cccccc",
			"ccff99", "ffffff" };

	public void setColor(int color) {
		this.color = color;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}
	
	public String show() {
		String height = this.height;		
		if(OlivaUtils.nvl(height).equals(""))
			height = "10";
		StringBuffer sb = new StringBuffer();
		//width=\"225\"
		sb.append("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"  bgcolor=\"#").append(colors[color]).append("\" width=\"100%\">");
		sb.append("<tr>\r\n");
		sb.append("<td bgcolor=\"#").append(colors[color]).append("\"  height=\"").append(height).append("\" align=\"center\" valign=\"center\">\r\n");
		sb.append(OlivaUtils.nvl(content)).append("\r\n");
		sb.append("</td>\r\n");
		sb.append("</tr>\r\n");
		sb.append("</table>\r\n");
		return sb.toString();
	}

	public void setContent(String content) {
		this.content = content;
	}
	
}

⌨️ 快捷键说明

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