当前位置: 首页>>代码示例>>Java>>正文


Java HTML.addClickListener方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.HTML.addClickListener方法的典型用法代码示例。如果您正苦于以下问题:Java HTML.addClickListener方法的具体用法?Java HTML.addClickListener怎么用?Java HTML.addClickListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.ui.HTML的用法示例。


在下文中一共展示了HTML.addClickListener方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FooterScreen

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public FooterScreen() {
	HorizontalPanel panel = new HorizontalPanel();
	HTML label = new HTML("OneCMDB 1.4.0 Beta &copy; Lokomo Systems <<a href='javascript:;'>about</a>>");
	label.setTitle("Show about screen");
	label.setStyleName("onecmdb-footer-label");
	panel.add(label);
	panel.setCellHorizontalAlignment(label, HorizontalPanel.ALIGN_RIGHT);
	panel.setStyleName("onecmdb-footer");
	label.addClickListener(new ClickListener() {

		public void onClick(Widget sender) {
			getBaseEntryScreen().showScreen(OneCMDBApplication.SHOW_STATIC_CONTENT, 
					"about.html", 
					new Long(0));
		}
		
	});
	initWidget(panel);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:20,代码来源:FooterScreen.java

示例2: load

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public void load() {
	if (this.currentTemplate == null) {
		setErrorText("No Template to show!");
		return;
	}
	setErrorText("");
	setTitleText("Attributes for ");
	setTitleWidget(new CIIconDisplayNameWidget(this.currentTemplate));
	vPanel.clear();
	
	HTML add = new HTML("[<a href='javascript:;'>new</a>]");
	add.setTitle("Add a new attribute to this template");
	add.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			OneCMDBModelCreator.get().showScreen(OneCMDBModelCreator.ADD_ATTRIBUTE_SCREEN, currentTemplate.getAlias(), new Long(0));
		}
		
	});
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.add(add);
	hPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
	hPanel.setWidth("100%");
	vPanel.add(hPanel);
	vPanel.add(getAttributeTable());
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:27,代码来源:ListAttributeScreen.java

示例3: drawCalendar

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
private void drawCalendar() {
	int year = getYear();
	int month = getMonth();
	// int day = getDay();
	setHeaderText(year, month);
	grid.getRowFormatter().setStyleName(0, "weekheader");
	for (int i = 0; i < days.length; i++) {
		grid.getCellFormatter().setStyleName(0, i, "days");
		grid.setText(0, i, days[i].substring(0, 3));
	}

	Date now = new Date();
	int sameDay = now.getDate();
	int today = (now.getMonth() == month && now.getYear() + 1900 == year) ? sameDay : 0;

	int firstDay = new Date(year - 1900, month, 1).getDay();
	int numOfDays = getDaysInMonth(year, month);

	int colCount = 0;
	for (int rowCount = 1; rowCount < 6; rowCount++) {
		for (int colIterator = 0; colIterator < 7; colIterator++, colCount++) {
			int displayNum = (colCount - firstDay + 1);
			if (colCount < firstDay || displayNum > numOfDays) {
				grid.getCellFormatter().setStyleName(rowCount, colIterator, "empty");
				grid.setHTML(rowCount, colIterator, "&nbsp;");
			} else {
				HTML html = new CellHTML("<span>" + displayNum + "</span>", displayNum);
				html.addClickListener(this);
				grid.getCellFormatter().setStyleName(rowCount, colIterator, "cell");
				if (displayNum == today) {
					grid.getCellFormatter().addStyleName(rowCount, colIterator, "today");
				} else if (displayNum == sameDay) {
					grid.getCellFormatter().addStyleName(rowCount, colIterator, "day");
				}
				grid.setWidget(rowCount, colIterator, html);
			}
		}
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:40,代码来源:CalendarWidget.java

示例4: getCheckUpdateWidget

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public Widget getCheckUpdateWidget() {
HTML html = new HTML("<a href='javascript:;'>[Check for updates]</a>");
html.addClickListener(new ClickListener() {

	public void onClick(Widget sender) {
		Window.open("http://sourceforge.net/project/showfiles.php?group_id=176340", 
				"_blank", "");
	}
	
});
return(html);
 }
 
开发者ID:luox12,项目名称:onecmdb,代码行数:13,代码来源:HeaderScreen.java

示例5: load

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public void load(GWT_CiBean bean) {
	vPanel.clear();
	if (bean != null) {
		String displayName = bean.getDisplayName();
		if ((displayName == null || displayName.length() == 0)) {
			displayName = "[" + bean.getAlias() + "]";
		}
		Widget l = null;
		if (this.listener != null) {
			HTML h = new HTML("<a href='javascript:;'>" + displayName +"</a>", false);
			// Replace sender....
			h.addClickListener(new ClickListener() {

				public void onClick(Widget sender) {
					listener.onClick(CIDisplayNameWidget.this);
				}
				
			});
			l = h;
		} else {
			l = new Label(displayName, false);
		}
		vPanel.add(l);
		// Add title.
		new TooltipPopup(l, getTitle(bean));
		
		vPanel.setCellHorizontalAlignment(l, HorizontalPanel.ALIGN_LEFT);
	} else {
		// Add null value...
		vPanel.add(new Label(""));
	}
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:33,代码来源:CIDisplayNameWidget.java

示例6: NewURIFieldWidget

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
public NewURIFieldWidget(AttributeValue v) {
	super(v.getLabel());
	this.value = v;
	if (value.getCtrl().isReadonly()) {
		HTML html = new HTML();
		if (!this.value.isNullValue()) {
			html.setHTML("<a href='javascript:;'>" + this.value.getStringValue() +"</a>");
		}
		html.addClickListener(new ClickListener() {

			public void onClick(Widget sender) {
				Window.open(value.getStringValue(), "_blank", "");
				
			}
			
		});
		
		html.setWordWrap(true);
		html.setTitle(this.value.getStringValue());
		addField(html);
		html.setStyleName("mdv-form-input-readonly");			
		setRequired(false);
		
	} else {
		box = new TextBox();
		box.setText(value.getStringValue());
		box.addKeyboardListener(this);
		setRequired(value.getCtrl().isRequiered());
		addField(box);
	}
	
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:33,代码来源:NewURIFieldWidget.java

示例7: getButtonPanel

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected Widget getButtonPanel() {
	HTML back = new HTML("<a href='javascript:;'>[back]</a>");
	back.addClickListener(new ClickListener() {
		public void onClick(Widget sender) {
			History.back();
		}
	});
	return(back);
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:10,代码来源:ViewProblemScreen.java

示例8: setupTable

import com.google.gwt.user.client.ui.HTML; //导入方法依赖的package包/类
protected void setupTable() {
	if (this.template == null) {
		return;
	}
	setTitleText("Instances of ");
	setTitleWidget(new CIIconDisplayNameWidget(this.template));
	
	
	vPanel.clear();
	table = null;
	if (isNewSupport()) {
		HorizontalPanel actionPanel = new HorizontalPanel();
		HTML add = new HTML("[<a href='javascript:;'>new</a>]");
		add.setTitle("Create a new instance");
		actionPanel.add(add);
		add.addClickListener(new ClickListener() {

			public void onClick(Widget sender) {
				getBaseEntryScreen().showScreen(OneCMDBApplication.NEW_CI_SCREEN, template.getAlias(), new Long(0));
			}
		
		});
		actionPanel.add(add);
		actionPanel.setCellHorizontalAlignment(add, HorizontalPanel.ALIGN_RIGHT);
		actionPanel.setWidth("100%");
		vPanel.add(actionPanel);
	}
	VerticalPanel tablePanel = new VerticalPanel();
	tablePanel.setStyleName("onecmdb-table-panel");

	if (table == null) {
		table = new CITablePanel();
		table.addTableListener(ListCIScreen.this);
		table.addLoadListener(ListCIScreen.this);
		CITablePageControlPanel tablePageControl = new CITablePageControlPanel(table);
		tablePanel.add(tablePageControl);
		tablePanel.add(table);
		tablePanel.setCellVerticalAlignment(tablePageControl, VerticalPanel.ALIGN_TOP);
		tablePanel.setCellVerticalAlignment(table, VerticalPanel.ALIGN_TOP);
	}
	vPanel.add(tablePanel);
	table.setAttributeRender(getAttributeRender());
	
	table.setTabelControl(getTableControl(this.template));
	table.load();
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:47,代码来源:ListCIScreen.java


注:本文中的com.google.gwt.user.client.ui.HTML.addClickListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。