當前位置: 首頁>>代碼示例>>Java>>正文


Java Html類代碼示例

本文整理匯總了Java中org.zkoss.zul.Html的典型用法代碼示例。如果您正苦於以下問題:Java Html類的具體用法?Java Html怎麽用?Java Html使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Html類屬於org.zkoss.zul包,在下文中一共展示了Html類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: afterCompose

import org.zkoss.zul.Html; //導入依賴的package包/類
@Override
public void afterCompose() {
    //Get HTML for announcement
    String text = new String();
    String announcementPath = ConfigLoader.getProperty(CommonConstants.ANNOUNCEMENT_LOCATION);
    try {
        byte[] encoded = Files.readAllBytes(Paths.get(announcementPath));
        text = Charset.defaultCharset().decode(ByteBuffer.wrap(encoded)).toString().trim();
    }
    catch (IOException e){
        Logger.getLogger(TopBarController.class.getName()).log(Level.SEVERE, "ERROR READING ANNOUNCEMENT FILE ON " + announcementPath, e);
    }
    
    if (!text.isEmpty()) {
        Html announcement = (Html) getFellow("announcement");
        announcement.setContent(text);
        ((Div) getFellow("announcementDiv")).setVisible(true);
    }
}
 
開發者ID:cerndb,項目名稱:dbod-webapp,代碼行數:20,代碼來源:TopBarController.java

示例2: explainScore

import org.zkoss.zul.Html; //導入依賴的package包/類
@Command
public void explainScore(@BindingParam("document") Document document)
		throws SearchLibException, InterruptedException, IOException,
		ParseException, SyntaxError {
	Client client = getClient();
	if (client == null)
		return;
	ResultDocumentsInterface<?> result = getResultDocuments();
	if (result == null)
		return;
	int docId = document.getDocId();
	String explanation = client.explain(result.getRequest(), docId, true);
	Window win = (Window) Executions.createComponents(
			"/WEB-INF/zul/query/result/explanation.zul", null, null);
	Html html = (Html) win.getFellow("htmlExplain", true);
	html.setContent(explanation);
	win.doModal();
}
 
開發者ID:jaeksoft,項目名稱:opensearchserver,代碼行數:19,代碼來源:ResultDocumentController.java

示例3: CloseExpandBoxEventListener

import org.zkoss.zul.Html; //導入依賴的package包/類
public CloseExpandBoxEventListener(Html html, Textbox txt) {
	this.html = html;
	this.txt = txt;
}
 
開發者ID:sinnlabs,項目名稱:dbvim,代碼行數:5,代碼來源:HtmlRules.java


注:本文中的org.zkoss.zul.Html類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。