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

📄 tdockpanel.java

📁 gwt 开发 界面控件的封装
💻 JAVA
字号:
/**
 * package com.mc.tables.client;
 */
package com.mc.tables.client;
/**
 * import lib
 */
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.DockPanel;
/**
 * class TDockPanel extends DockPanel
 * @author Administrator
 * 添加背景色 和 背景图片
 */
public class TDockPanel extends DockPanel{

	public TDockPanel(){
		super();
	}
	
	
	public Element getPanelBody(){
		return this.getBody();			
	}
	
	/**
	 * 设置背景图片
	 * @param imageUrl 图片的路径位置
	 */
	public void setBackgroundImage(String imageUrl){
		Element e = this.getTable();
		DOM.setAttribute(e, "background", imageUrl);
	}
	
	/**
	 * 设置背景颜色
	 * @param color 颜色值  "#ffffff"
	 */	
	public void setBackgroundColor(String color){
		Element e = this.getTable();
		DOM.setStyleAttribute(e, "background", color);
	}
	
	
}

⌨️ 快捷键说明

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