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

📄 htmlbody.java

📁 一个日本流行的,功能较全的开源Web办公管理(Groupware)系统。
💻 JAVA
字号:
package jp.co.sjts.gsession.tools;


import java.io.PrintWriter;
import java.util.Vector;

/**
 * <p>HTML 儃僨傿乕娗棟僋儔僗  HtmlDody.java
 * <p>Copyright (C) 1999-2000 Japan Total System Co,LTD
 *
 * @author   Satoru K   &lt;koni@sjts.co.jp&gt;
 */
public class  HtmlBody {

	// 儃僨傿乕僇儔乕
	private String bgcolor=null;
	private String text=null;
	private String link=null;
	private String vlink=null;
	private String alink=null;
	private Vector vecBody = new Vector();
	private String helpUrl=null;
	private String onLoadEvent=null;
	private String onUnloadEvent=null;

	public void HtmlBody() {
	}
	
	public void HtmlBody(String bgcolor,String text,String link,String vlink,String alink) {
		this.bgcolor = bgcolor;
		this.text = text;
		this.link = link;
		this.vlink = vlink;
		this.alink = alink;
	}

	public void setBodyColor(String bgcolor,String text,String link,String vlink,String alink) {
		this.bgcolor = bgcolor;
		this.text = text;
		this.link = link;
		this.vlink = vlink;
		this.alink = alink;
	}

	public void addText(String text) {
		this.vecBody.addElement(text);
	}

	public void setHelpUrl(String helpUrl) {
		this.helpUrl = helpUrl;
	}

	public void write(PrintWriter pw) {

		String buf="";
		if(bgcolor!=null)
			buf += " BGCOLOR=\"" + bgcolor +"\"";
		if(text!=null)
			buf += " TEXT=\"" + text +"\"";
		if(link!=null)
			buf += " LINK=\"" + link + "\"";
		if(vlink!=null)
			buf += " VLINK=\"" + vlink + "\"";
		if(alink!=null)
			buf += " ALINK=\"" + alink + "\"";
		if(onLoadEvent!=null)
			buf += " onLoad=\""+onLoadEvent+"\"";
		if(onUnloadEvent!=null)
			buf += " onUnload=\""+onUnloadEvent+"\"";

		pw.println("<BODY" + buf + ">");
		if(helpUrl!=null) {
			pw.println("<DIV ALIGN=\"right\"><A HREF=\""+helpUrl+"\" TARGET=\"gsessionhelpwindow\">"
					   + "<FONT COLOR=\"#0000ff\">亂傊儖僾亃</FONT></A></DIV>");

		}
		// 儃僨傿乕杮暥
		for(int i=0;vecBody.size()>i;i++) {
			pw.println((String)vecBody.elementAt(i));
		}

		pw.println("</BODY>");
	}

	public void setBgColor(String bgcolor) {
		this.bgcolor = bgcolor;
	}

	public String getBgColor() {
		return this.bgcolor;
	}

	public void setTextColor(String text) {
		this.text = text;
	}

	public String getTextColor() {
		return this.text;
	}

	public void setLinkColor(String link) {
		this.link = link;
	}

	public String getLinkColor() {
		return this.link;
	}

	public void setVlinkColor(String vlink) {
		this.vlink = vlink;
	}

	public String getVlinkColor() {
		return this.vlink;
	}

	public void setAlinkColor(String alink) {
		this.alink = alink;
	}

	public String getAlinkColor() {
		return this.alink;
	}

	public void setOnLoadEvent(String event) {
		onLoadEvent = event;
	}

	public void setOnUnloadEvent(String event) {
		onUnloadEvent = event;
	}
		
}

⌨️ 快捷键说明

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