当前位置: 首页>>代码示例>>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;未经允许,请勿转载。