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


Java HTMLPanel.createUniqueId方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.HTMLPanel.createUniqueId方法的典型用法代碼示例。如果您正苦於以下問題:Java HTMLPanel.createUniqueId方法的具體用法?Java HTMLPanel.createUniqueId怎麽用?Java HTMLPanel.createUniqueId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.HTMLPanel的用法示例。


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

示例1: emit

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void emit (StringBuilder out, final List<String> lines,
		final Map<String, String> params) {

	final String id = HTMLPanel.createUniqueId();
	out.append("<div id=\"");
	out.append(id);
	out.append("\"> Loading form...</div>");

	Scheduler.get().scheduleDeferred( () -> {
		if (manager != null) {
			manager.fireEvent(new PluginContentReadyEvent(FormPlugin.this,
					lines, params, id, "None"));
		}
	});
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:17,代碼來源:FormPlugin.java

示例2: emit

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void emit (StringBuilder out, final List<String> lines,
		final Map<String, String> params) {
	final String id = HTMLPanel.createUniqueId();
	out.append("<div id=\"");
	out.append(id);
	out.append("\"> Loading gallery...</div>");

	Scheduler.get().scheduleDeferred(new ScheduledCommand() {

		@Override
		public void execute () {
			if (manager != null) {
				manager.fireEvent(new PluginContentReadyEvent(
						GalleryPlugin.this, lines, params, id, "None"));
			}
		}
	});
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:20,代碼來源:GalleryPlugin.java

示例3: emit

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void emit (StringBuilder out, List<String> lines,
		Map<String, String> params) {
	String src = params.get("src");
	try {
		if (src != null && src.length() > 0) {
			String id = HTMLPanel.createUniqueId();
			out.append(CachedIncludePluginTemplates.INSTANCE.loadingButton(
					id, Resources.RES.defaultLoader().getSafeUri(), src)
					.asString());

			getContent(src, id, lines, params);
		}
	} catch (Exception e) {
		throw new RuntimeException("Error while rendering "
				+ this.getClass().getName(), e);
	}
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:19,代碼來源:CachedIncludePlugin.java

示例4: switchResultView

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void switchResultView(boolean showResultView) {
	this.isResultView = showResultView;
	if (!isResultView)
	{		
		if (answerCheckbox.getElement().getId() == null || answerCheckbox.getElement().getId() == "")
		{
			String id = HTMLPanel.createUniqueId();		
			// link them together
			answerCheckbox.getElement().setId(id); // works because we use a SimpleCheckBox
			answerLabel.setHtmlFor(id);
		}
		oldCheckboxValue = answerCheckbox.getValue();
		
		answerCheckbox.setEnabled(true);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "1");
		resultBar.addClassName("hidden");
	}
	else	// in case this is a result display, just show results and hide form stuff
	{
		answerCheckbox.setEnabled(false);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "0");
		resultBar.removeClassName("hidden");
	}
}
 
開發者ID:jkonert,項目名稱:socom,代碼行數:26,代碼來源:InfluenceAnswerTextView.java

示例5: switchResultView

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void switchResultView(boolean showResultView) {
	this.isResultView = showResultView;
	if (!isResultView)
	{		
		if (answerCheckbox.getElement().getId() == null || answerCheckbox.getElement().getId() == "")
		{
			String id = HTMLPanel.createUniqueId();		
			// link them together
			answerCheckbox.getElement().setId(id); // works because we use a SimpleCheckBox
			answerLabel.setHtmlFor(id);				
		}
		oldCheckboxValue = answerCheckbox.getValue();
		answerCheckbox.setEnabled(true);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "1");
		resultBar.addClassName("hidden");
	}
	else	// in case this is a result display, just show results and hide form stuff
	{
		answerCheckbox.setEnabled(false);
		answerCheckbox.getElement().getStyle().setProperty("opacity", "0");
		resultBar.removeClassName("hidden");
	}
	
}
 
開發者ID:jkonert,項目名稱:socom,代碼行數:26,代碼來源:InfluenceAnswerAudioView.java

示例6: emit

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public void emit (StringBuilder out, final List<String> lines,
		final Map<String, String> params) {

	MapPluginItem item = new MapPluginItem();
	item.mapManager = manager;
	item.instance = this;
	item.id = HTMLPanel.createUniqueId();
	item.lines = lines;
	item.params = params;

	items.put(item.id, item);

	out.append("<div id=\"");
	out.append(item.id);
	out.append("\">Loading maps API...</div>");

	if (!added) {
		added = true;

		ScriptInjector.fromUrl(
				"https://maps.googleapis.com/maps/api/js?callback=mapsInitialised&key="
						+ apiKey)
				.setCallback(EMPTY).inject();
	}

	if (initialised) {
		mapsInitialised();
	}
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:31,代碼來源:MapPlugin.java

示例7: startLoading

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
public void startLoading()
	{
		if (getReadyState().equals(FileState.error))
		{ // on error clear everything and restart
			this.soundManager.destroySound(this.soundID);
			this.sound = null;
			this.soundManager = null;
		}
		if (soundManager == null) 
		{
			soundManager = SoundManager.quickStart();
			soundID = HTMLPanel.createUniqueId();
			soundManager.onReady(new Callback(){
				public void execute() {
					// see Documentation at http://www.schillmania.com/projects/soundmanager2/doc/#sound-object-properties
					// or https://github.com/rcaloras/gwt-soundmanager2
					soundManager.createSound(new Option[] {
					   new Option("id",soundID),
					   new Option("url", filePath),
					   new Option("stream", true),
					   new Option("whileloading", new Callback() {
					   		public void execute() {AudioControl.this.blinkLoading();}
					   		}),
					   new Option("whileplaying",new Callback() {
						    public void execute() {AudioControl.this.updateTimes();}
					   		}),
					   new Option("onfinish",new Callback() {
							    public void execute() {AudioControl.this.stop();}
						   	})
//					   new Option("onstop", new Callback(){
//						   		public void execute() {AudioControl.this.stop();}
//					   		})
					   });
					   AudioControl.this.sound = soundManager.getSoundById(soundID);					  
					};
				});
		}
	}
 
開發者ID:jkonert,項目名稱:socom,代碼行數:39,代碼來源:AudioControl.java

示例8: setContentView

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
public void setContentView(Widget htmlPanel) {
	String id = HTMLPanel.createUniqueId();
	view = new LinearLayout(this);
	DOM.getElementById(ACTIVITY_ID).appendChild(view.getElement());
	view.getElement().setId(id);
	RootPanel.get(id).add(htmlPanel);
}
 
開發者ID:mobialia,項目名稱:gwt-android-emu,代碼行數:8,代碼來源:Activity.java

示例9: setContentView

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
public void setContentView(Widget htmlPanel) {
	String id = HTMLPanel.createUniqueId();
	view = new LinearLayout(this);
	view.addView(actionBar.view);

	DOM.getElementById(ACTIVITY_ID).appendChild(view.getElement());
	view.getElement().setId(id);
	RootPanel.get(id).add(htmlPanel);
}
 
開發者ID:mobialia,項目名稱:gwt-android-emu,代碼行數:10,代碼來源:AppCompatActivity.java

示例10: process

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
@Override
public String process (String markdown) {
	StringBuffer b = new StringBuffer(markdown);

	Map<String, String> replaced = new HashMap<>();

	String id;

	int start = 0, end;
	while ((start = b.indexOf(OPEN, start)) > 0) {
		if ((end = b.indexOf(CLOSE, start)) > 0) {
			id = HTMLPanel.createUniqueId();
			replaced.put(id, b.substring(start + OPEN_LENGTH, end));
			b.replace(start, end + CLOSE_LENGTH, marker(id));
		}
	}

	String processed = super.process(b.toString());

	if (replaced.size() > 0) {
		b.setLength(0);
		b.append(processed);

		String match, content;
		int matchLength;
		start = 0;
		for (String key : replaced.keySet()) {
			match = marker(key);
			matchLength = match.length();

			while ((start = b.indexOf(match, start)) > 0) {
				b.replace(start, start + matchLength,
						content = process(replaced.get(key)));
				start += content.length();
			}
		}

		processed = b.toString();
	}

	return processed;
}
 
開發者ID:billy1380,項目名稱:blogwt,代碼行數:43,代碼來源:Processor.java


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