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


Java DivElement类代码示例

本文整理汇总了Java中com.google.gwt.dom.client.DivElement的典型用法代码示例。如果您正苦于以下问题:Java DivElement类的具体用法?Java DivElement怎么用?Java DivElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DivElement类属于com.google.gwt.dom.client包,在下文中一共展示了DivElement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: showEmpty

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
@Override
public void showEmpty(String message) {
    SpanElement span = Document.get().createSpanElement();
    span.setInnerText(message);
    DivElement gi = createItemDiv(new Element[] {span});
    perspectivesDiv.appendChild((Node) gi);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:8,代码来源:PerspectivesExplorerView.java

示例2: appendEntry

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
/**
 * Appends an entry to the log panel.
 * @param formatted
 * @param level
 */
public static void appendEntry(String formatted, Level level) {
  DivElement entry = Document.get().createDivElement();
  entry.setClassName(RESOURCES.css().entry());
  entry.setInnerHTML(formatted);

  // Add the style name associated with the log level.
  switch (level) {
    case ERROR:
      entry.addClassName(RESOURCES.css().error());
      break;
    case FATAL:
      entry.addClassName(RESOURCES.css().fatal());
      break;
    case TRACE:
      entry.addClassName(RESOURCES.css().trace());
      break;
  }

  // Make fatals detectable by WebDriver, so that tests can early out on
  // failure:
  if (level.equals(Level.FATAL)) {
    latestFatalError = formatted;
  }
  writeOrCacheOutput(entry);
}
 
开发者ID:apache,项目名称:incubator-wave,代码行数:31,代码来源:DomLogger.java

示例3: TaskList

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
protected TaskList(PageTransitionPanel parent, Controls controls,
    Controller controller, TaskList.Resources resources) {
  super(parent, controls, resources);
  this.controller = controller;
  this.resources = resources;

  urgentNotImportantTasks = Document.get().createDivElement();
  urgentImportantTasks = Document.get().createDivElement();
  notUrgentNotImportantTasks = Document.get().createDivElement();
  notUrgentImportantTasks = Document.get().createDivElement();
  Element container = getContentContainer();
  container.appendChild(urgentImportantTasks);
  container.appendChild(notUrgentImportantTasks);
  container.appendChild(urgentNotImportantTasks);
  container.appendChild(notUrgentNotImportantTasks);

  userEmail = Document.get().createDivElement();
  userEmail.getStyle().setProperty("display", "inline-block");
  userEmail.setInnerText("Loading...");
  logoutLink = Document.get().createAnchorElement();
  DivElement userInfoContainer = Document.get().createDivElement();
  userInfoContainer.appendChild(userEmail);
  userInfoContainer.appendChild(logoutLink);
  userInfoContainer.setClassName(resources.taskListCss().user());
  container.appendChild(userInfoContainer);
}
 
开发者ID:dougkoellmer,项目名称:swarm,代码行数:27,代码来源:TaskList.java

示例4: createViewerContainer

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
private void createViewerContainer(Document document, DivElement mainContainer) {
	viewerContainer = createChildDiv(document, mainContainer, "viewerContainer");
	viewerContainer.setTabIndex(0); // keyboard scrolling does not work without this tabindex 

	viewer = createChildDiv(document, viewerContainer, "viewer");
	viewer.addClassName("pdfViewer");

	overlayContainer = createChildDiv(document, outerContainer, "overlayContainer");
	overlayContainer.addClassName("hidden");

	passwordOverlay = createChildDiv(document, overlayContainer, "passwordOverlay");
	passwordOverlay.addClassName("container");
	passwordOverlay.addClassName("hidden");

	createDocumentPropertiesOverlay(document, overlayContainer);
	createPrintServiceOverlay(document, overlayContainer);
}
 
开发者ID:WhitesteinTechnologies,项目名称:wt-pdf-viewer,代码行数:18,代码来源:WTPdfViewerWidget.java

示例5: createPrintServiceOverlay

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
private void createPrintServiceOverlay(Document document, DivElement parent) {
	printServiceOverlay = createChildDiv(document, parent, "printServiceOverlay");
	printServiceOverlay.addClassName("container");
	printServiceOverlay.addClassName("hidden");

	DivElement dialog = createChildDiv(document, printServiceOverlay, "dialog");
	DivElement row1 = createChildDiv(document, dialog, "row");
	SpanElement message = createChildSpan(document, row1, "");
	message.setInnerText("Preparing document for printing!");

	DivElement row2 = createChildDiv(document, dialog, "row");
	createChildProgress(document, row2, 0, 100);
	SpanElement relativeProgressSpan = createChildSpan(document, row2, "relative-progress");
	relativeProgressSpan.setInnerText("0%");

	DivElement row3 = createChildDiv(document, dialog, "row");
	printCancel = createChildButton(document, row3, "printCancel");
	printCancel.addClassName("overlayButton");
	SpanElement printCancelMessage = createChildSpan(document, printCancel, "");
	printCancelMessage.setInnerText("Cancel");
}
 
开发者ID:WhitesteinTechnologies,项目名称:wt-pdf-viewer,代码行数:22,代码来源:WTPdfViewerWidget.java

示例6: appendEmbeddedImage

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
public final ItemHandle appendEmbeddedImage(
     HAlignment imageAlignment,
     String embeddedImageText,
     String embeddedImageStyle,
     String description
) {
   FlowPanel outer = new FlowPanel(DivElement.TAG);
   String imageAlignment1 = "text-align:center;";
   if (imageAlignment == HAlignment.LEFT) {
      imageAlignment1 = "text-align:left;";
   } else if (imageAlignment == HAlignment.RIGHT) {
      imageAlignment1 = "text-align:right;";
   }
   outer.getElement().setAttribute("style", "display:block;" + imageAlignment1);
   FlowPanel inner = new FlowPanel(ImageElement.TAG);
   inner.getElement().setAttribute("alt",   description);
   inner.getElement().setAttribute("src",   embeddedImageText);
   inner.getElement().setAttribute("style", embeddedImageStyle);
   outer.add(inner);
   appendAndScrollOrFocusAsAppropriate(outer);
   return new ItemHandle(this, outer);
}
 
开发者ID:ainslec,项目名称:gwt-promptly,代码行数:23,代码来源:PromptlyPanel.java

示例7: appendToDocument

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
private void appendToDocument(HTML target, PluginContext pluginContext, CajolerResponse response) {
  DivElement domitaVdocElement = Document.get().createDivElement();
  domitaVdocElement.setClassName("innerHull");

  target.getElement().setInnerHTML("");
  target.getElement().setClassName("outerHull");
  target.getElement().appendChild(domitaVdocElement);

  initializeDoodadEnvironment(
      cajaFrame, domitaVdocElement, pluginContext.getJSOInterface());

  // Render HTML
  domitaVdocElement.setInnerHTML(response.getHtml());

  // Inject JS
  Document cajaFrameDoc = cajaFrame.getContentDocument();
  cajaFrameDoc.getBody().appendChild(cajaFrameDoc.createScriptElement(response.getJs()));
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:19,代码来源:CajolerFacade.java

示例8: expando

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
protected void expando(final FlowPanel div2, final DivElement[] notes)
{
	Timer t = new Timer()
	{
		int i = 0;
		final int last = notes.length;

		@Override
		public void run()
		{
			if (i >= last)
				this.cancel();
			else
				div2.getElement().appendChild(notes[i++]);
		}
	};
	// Eye candy
	t.scheduleRepeating(10);
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:20,代码来源:ItemsTable.java

示例9: tuneBottomSplitter

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
/**
 * Tunes bottom splitter. Makes it tiny but with a transparent area for easy resizing.
 *
 * @param el element to tune
 */
private void tuneBottomSplitter(Element el) {
  /** Add Z-Index to move the splitter on the top and make content visible */
  el.getParentElement().getStyle().setProperty("zIndex", "1000");
  el.getParentElement().getStyle().setProperty("overflow", "visible");

  el.getStyle().setProperty("height", "4px");
  el.getStyle().setProperty("marginTop", "-2px");
  el.getStyle().setProperty("backgroundColor", "transparent");

  /** Add small border */
  DivElement delimiter = Document.get().createDivElement();
  delimiter.getStyle().setProperty("position", "absolute");
  delimiter.getStyle().setProperty("width", "100%");
  delimiter.getStyle().setProperty("height", "1px");
  delimiter.getStyle().setProperty("left", "0px");
  delimiter.getStyle().setProperty("top", "2px");
  delimiter.getStyle().setProperty("backgroundColor", Style.theme.tabBorderColor());
  el.appendChild(delimiter);
}
 
开发者ID:eclipse,项目名称:che,代码行数:25,代码来源:PerspectiveViewImpl.java

示例10: tuneVerticalSplitter

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
/**
 * Tunes splitter. Makes it wider and adds double border to seem rich.
 *
 * @param el element to tune
 */
private void tuneVerticalSplitter(Element el) {
  /** Add Z-Index to move the splitter on the top and make content visible */
  el.getParentElement().getStyle().setProperty("zIndex", "1000");
  el.getParentElement().getStyle().setProperty("overflow", "visible");

  /** Tune splitter catch panel */
  el.getStyle().setProperty("boxSizing", "border-box");
  el.getStyle().setProperty("width", "5px");
  el.getStyle().setProperty("overflow", "hidden");
  el.getStyle().setProperty("marginLeft", "-3px");
  el.getStyle().setProperty("backgroundColor", "transparent");

  /** Add small border */
  DivElement smallBorder = Document.get().createDivElement();
  smallBorder.getStyle().setProperty("position", "absolute");
  smallBorder.getStyle().setProperty("width", "1px");
  smallBorder.getStyle().setProperty("height", "100%");
  smallBorder.getStyle().setProperty("left", "3px");
  smallBorder.getStyle().setProperty("top", "0px");
  smallBorder.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor());
  el.appendChild(smallBorder);
}
 
开发者ID:eclipse,项目名称:che,代码行数:28,代码来源:SplitEditorPartViewImpl.java

示例11: tuneHorizontalSplitter

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
/**
 * Tunes bottom splitter. Makes it tiny but with a transparent area for easy resizing.
 *
 * @param el element to tune
 */
private void tuneHorizontalSplitter(Element el) {
  /** Add Z-Index to move the splitter on the top and make content visible */
  el.getParentElement().getStyle().setProperty("zIndex", "1000");
  el.getParentElement().getStyle().setProperty("overflow", "visible");

  el.getStyle().setProperty("height", "3px");
  el.getStyle().setProperty("marginTop", "-2px");
  el.getStyle().setProperty("backgroundColor", "transparent");

  /** Add small border */
  DivElement delimiter = Document.get().createDivElement();
  delimiter.getStyle().setProperty("position", "absolute");
  delimiter.getStyle().setProperty("width", "100%");
  delimiter.getStyle().setProperty("height", "1px");
  delimiter.getStyle().setProperty("left", "0px");
  delimiter.getStyle().setProperty("backgroundColor", Style.getSplitterSmallBorderColor());
  delimiter.getStyle().setProperty("top", "2px");
  el.appendChild(delimiter);
}
 
开发者ID:eclipse,项目名称:che,代码行数:25,代码来源:SplitEditorPartViewImpl.java

示例12: wrapHotKey

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
private static Element wrapHotKey(String hotKey, String description, boolean global) {
  final DivElement containerDiv = Document.get().createDivElement();
  final DivElement hotKeyDiv = Document.get().createDivElement();
  final DivElement descriptionDiv = Document.get().createDivElement();

  hotKeyDiv.setInnerText(hotKey);
  descriptionDiv.setInnerText(description);

  containerDiv.setClassName("divRow");
  hotKeyDiv.setClassName("divCell");
  hotKeyDiv.addClassName("hotKey");
  descriptionDiv.setClassName("divCell");
  descriptionDiv.addClassName("description");

  containerDiv.appendChild(hotKeyDiv);
  containerDiv.appendChild(descriptionDiv);

  return containerDiv;
}
 
开发者ID:eclipse,项目名称:che,代码行数:20,代码来源:HotKeysDialogPresenter.java

示例13: ItemWidget

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
ItemWidget(MenuItem item) {
  this.item = item;

  addStyleName(resources.css().popupItem());

  final Element itemLabel = Document.get().createDivElement();
  itemLabel.setInnerText(item.getName());
  itemLabel.getStyle().setFloat(Style.Float.LEFT);

  getElement().appendChild(itemLabel);

  if (dataProvider.isGroup(item)) {
    DivElement arrow = Document.get().createDivElement();
    arrow.setInnerHTML(FontAwesome.PLAY);
    arrow.addClassName(resources.css().arrow());
    getElement().appendChild(arrow);
  }

  attachEventHandlers();
}
 
开发者ID:eclipse,项目名称:che,代码行数:21,代码来源:ItemsList.java

示例14: createInfoTextElement

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
private Element createInfoTextElement(NodePresentation presentation) {
  DivElement textElement = Document.get().createDivElement();

  StringBuilder sb = new StringBuilder();

  if (presentation.getInfoTextWrapper() != null) {
    sb.append(presentation.getInfoTextWrapper().first);
  }

  if (!Strings.isNullOrEmpty(presentation.getInfoText())) {
    sb.append(presentation.getInfoText());
  }

  if (presentation.getInfoTextWrapper() != null) {
    sb.append(presentation.getInfoTextWrapper().second);
  }

  textElement.setInnerText(sb.toString());
  textElement.setAttribute("style", presentation.getInfoTextCss());

  // TODO support text colorization

  return textElement;
}
 
开发者ID:eclipse,项目名称:che,代码行数:25,代码来源:DefaultPresentationRenderer.java

示例15: testSetCursor

import com.google.gwt.dom.client.DivElement; //导入依赖的package包/类
@Test
public void testSetCursor() {

    final Viewport viewport = mock(Viewport.class);
    final DivElement divElement = mock(DivElement.class);
    final Style.Cursor cursor = mock(Style.Cursor.class);
    final Style style = mock(Style.class);

    doReturn(style).when(divElement).getStyle();
    doReturn(divElement).when(viewport).getElement();
    doReturn(viewport).when(mediator).getLayerViewport();

    mediator.setCursor(cursor);

    verify(style).setCursor(cursor);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:17,代码来源:RestrictedMousePanMediatorTest.java


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