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


Java InlineLabel类代码示例

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


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

示例1: renderImage

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/** Redraw the icon. */
private void renderImage() {
  panel.clear();

  if (presentation.getImageElement() != null) {
    ElementWidget image = new ElementWidget(presentation.getImageElement());
    image.getElement().setAttribute("class", toolbarResources.toolbar().popupButtonIcon());
    panel.add(image);

  } else if (presentation.getHTMLResource() != null) {
    FlowPanel icon = new FlowPanel();
    icon.setStyleName(toolbarResources.toolbar().iconButtonIcon());

    FlowPanel inner = new FlowPanel();
    inner.setStyleName(toolbarResources.toolbar().popupButtonIconInner());
    inner.getElement().setInnerHTML(presentation.getHTMLResource());
    icon.add(inner);

    panel.add(inner);
  }

  InlineLabel caret = new InlineLabel("");
  caret.setStyleName(toolbarResources.toolbar().caret());
  panel.add(caret);
}
 
开发者ID:eclipse,项目名称:che,代码行数:26,代码来源:ActionPopupButton.java

示例2: setupWidgets

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
private void setupWidgets() {
  if (!urls.isEmpty()) {
    urls.select(Gerrit.getUserPreferences().downloadScheme());

    FlowPanel p = new FlowPanel();
    p.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeader());
    p.add(commands);
    final InlineLabel glue = new InlineLabel();
    glue.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeaderGap());
    p.add(glue);
    p.add(urls);

    add(p);
    add(copyLabel);
  }
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:17,代码来源:DownloadPanel.java

示例3: addOneKey

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
private void addOneKey(GpgKeyInfo k) {
  int row = table.getRowCount();
  table.insertRow(row);
  applyDataRowStyle(row);

  CheckBox sel = new CheckBox();
  sel.addValueChangeHandler(updateDeleteHandler);
  table.setWidget(row, 0, sel);
  table.setWidget(row, 1, new CopyableLabel(k.id()));
  table.setText(row, 2, k.fingerprint());

  VerticalPanel userIds = new VerticalPanel();
  for (int i = 0; i < k.userIds().length(); i++) {
    userIds.add(new InlineLabel(k.userIds().get(i)));
  }
  table.setWidget(row, 3, userIds);

  FlexCellFormatter fmt = table.getFlexCellFormatter();
  fmt.addStyleName(row, 0, Gerrit.RESOURCES.css().iconCell());
  fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().dataCell());
  fmt.addStyleName(row, 2, Gerrit.RESOURCES.css().dataCell());
  fmt.addStyleName(row, 3, Gerrit.RESOURCES.css().dataCell());

  setRowItem(row, k);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:26,代码来源:MyGpgKeysScreen.java

示例4: onInitUI

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
protected void onInitUI() {
  final FlowPanel me = (FlowPanel) getWidget();
  me.add(header = new Grid(1, Cols.values().length));
  me.add(body);

  headerText = new InlineLabel();
  if (titleWidget == null) {
    titleWidget = headerText;
  }
  FlowPanel title = new FlowPanel();
  title.add(titleWidget);
  title.setStyleName(Gerrit.RESOURCES.css().screenHeader());
  header.setWidget(0, Cols.Title.ordinal(), title);

  header.setStyleName(Gerrit.RESOURCES.css().screenHeader());
  header
      .getCellFormatter()
      .setHorizontalAlignment(0, Cols.FarEast.ordinal(), HasHorizontalAlignment.ALIGN_RIGHT);
  // force FarEast all the way to the right
  header.getCellFormatter().setWidth(0, Cols.FarEast.ordinal(), "100%");
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:22,代码来源:Screen.java

示例5: DropDownImageListEditorView

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
@UiConstructor
public DropDownImageListEditorView() {
    initWidget(Binder.BINDER.createAndBindUi(this));
    currentTypeImage = new Image();
    caret = new InlineLabel();
    caret.addStyleName( "caret" );
    caret.setVisible( true);

    dropDownAnchor.add( currentTypeImage );
    dropDownAnchor.add( caret );
    dropDownAnchor.setEnabled( true );

    currentTypeImageTooltip = new Tooltip(dropDown);
    currentTypeImageTooltip.setContainer("body");
    currentTypeImageTooltip.setShowDelayMs(100);
    currentTypeImage.addClickHandler(e -> currentTypeImageTooltip.hide());
    caret.addClickHandler(e -> currentTypeImageTooltip.hide());
    helpPanel.add(currentTypeImageTooltip);
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:20,代码来源:DropDownImageListEditorView.java

示例6: render

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
@Override
public Widget render(Schema property) {
  HTMLPanel panel = new HTMLPanel("");
  panel.getElement().getStyle().setDisplay(Display.INLINE);

  panel.add(new InlineLabel("\""));
  if (property.locked()) {
    InlineLabel label = new InlineLabel();
    panel.add(label);
    hasText = label;
  } else {
    TextArea editor = new TextArea();
    panel.add(editor);
    hasText = editor;
  }
  panel.add(new InlineLabel("\""));

  if (property.getDefault() != null) {
    hasText.setText(property.getDefault());
  }

  return panel;
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:24,代码来源:SchemaForm.java

示例7: complete

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * Complete the partially filled history item with the response data.
 *
 * @param response Response data.
 * @param timeMillis Time that execution took in milliseconds.
 * @param linkFactory Link factory that is used to generate hyperlink and menu links in the
 *        response view.
 */
public void complete(ApiResponse response, long timeMillis, PrettifierLinkFactory linkFactory) {
  executing.setVisible(false);
  wireContent.addStyleName(style.fadeIn());
  time.setInnerText("time to execute: " + timeMillis + " ms");
  statusDiv.setInnerText(response.getStatus() + " " + response.getStatusText());

  // Headers are hidden by default.
  UIObject.setVisible(responseHeadersDiv, false);
  responseHeadersDiv.setInnerText(getResponseHeadersString(response));
  try {
    JsonPrettifier.prettify(
        request.getService(), requestBodyDiv, request.getRequestBody(), linkFactory);
  } catch (JsonFormatException e) {
    // We should only be generating valid requests
    requestBodyDiv.add(new InlineLabel(request.getRequestBody()));
  }

  setResponseContent(request, response, realPathFragment, linkFactory);
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:28,代码来源:EmbeddedHistoryItemView.java

示例8: inlineWidget

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
private static Widget inlineWidget(
    String title, List<Widget> inlineWidgets, int depth, boolean hasSeparator) {

  FlowPanel inlinePanel = new FlowPanel();

  StringBuilder keyText = new StringBuilder(indentation(depth)).append(title);
  InlineLabel keyLabel = new InlineLabel(keyText.toString());
  keyLabel.addStyleName(style.jsonKey());
  inlinePanel.add(keyLabel);

  for (Widget child : inlineWidgets) {
    inlinePanel.add(child);
  }

  if (hasSeparator) {
    inlinePanel.add(new InlineLabel(SEPARATOR_TEXT));
  }

  return inlinePanel;
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:21,代码来源:JsonPrettifier.java

示例9: generateBreadcrumbs

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * Generate breadcrumbs into the specified container using the format link > link > text where the
 * last breadcrumb is always plain text.
 */
private void generateBreadcrumbs(Panel container, List<Title> titles) {
  container.clear();

  // For all of the titles previous to the last, add a link and a separator.
  for (Title notLast : titles.subList(0, titles.size() - 1)) {
    container.add(new InlineHyperlink(notLast.getTitle(), notLast.getFragment()));
    container.add(new InlineLabel(" > "));
  }

  // Append only the text for the last title.
  Title lastTitle = Iterables.getLast(titles);
  container.add(new InlineLabel(lastTitle.getTitle()));
  if (lastTitle.getSubtitle() != null) {
    Label subtitle = new InlineLabel(" - " + lastTitle.getSubtitle());
    subtitle.addStyleName(style.methodSubtitle());
    container.add(subtitle);
  }
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:23,代码来源:FullView.java

示例10: setValue

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean)
 *
 *      <div class="sitwatch-event">
 *        <div class="icon icon-severity-critical"></div>
 *        <a class="title" href="#">Rate Limit Exceeded</a>
 *        <span class="timestamp">9:16 AM</span>
 *        <span class="subject">{urn:namespace}ImportantService|VeryImportantOperation</span>
 *      </div>
 */
@Override
public void setValue(SituationEventBean value, boolean fireEvents) {
    clear();
    FlowPanel icon = new FlowPanel();
    icon.setStyleName("icon"); //$NON-NLS-1$
    icon.addStyleName("icon-severity-" + value.getSeverity()); //$NON-NLS-1$
    Anchor type = toDetailsPageLinkFactory.get("id", value.getSituationId()); //$NON-NLS-1$
    type.setText(value.getType());
    type.setStyleName("title"); //$NON-NLS-1$
    InlineLabel timestamp = new InlineLabel(ClientMessages.getTimeFormat().format(value.getTimestamp()));
    timestamp.setStyleName("timestamp"); //$NON-NLS-1$
    InlineLabel subject = new InlineLabel(value.getSubject());
    subject.setStyleName("subject"); //$NON-NLS-1$

    add(icon);
    add(type);
    add(timestamp);
    add(subject);
}
 
开发者ID:Governance,项目名称:rtgov-ui,代码行数:30,代码来源:SituationWatcherEvent.java

示例11: addRow

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * Adds a single row to the table.
 * @param situationSummaryBean
 */
public void addRow(final SituationSummaryBean situationSummaryBean) {
    int rowIdx = this.rowElements.size();
    DateTimeFormat format = DateTimeFormat.getFormat(i18n.format("dateTime-format")); //$NON-NLS-1$

    FlowPanel icon = new FlowPanel();
    icon.getElement().setClassName("icon"); //$NON-NLS-1$
    icon.getElement().addClassName("icon-severity-" + situationSummaryBean.getSeverity()); //$NON-NLS-1$
    Anchor type = toDetailsPageLinkFactory.get("id", situationSummaryBean.getSituationId()); //$NON-NLS-1$
    type.setText(situationSummaryBean.getType());
    InlineLabel resolutionState = new InlineLabel(situationSummaryBean.getResolutionState());
    InlineLabel subject = new InlineLabel(situationSummaryBean.getSubject());
    InlineLabel description = new InlineLabel(situationSummaryBean.getDescription());
    InlineLabel timestamp = new InlineLabel(format.format(situationSummaryBean.getTimestamp()));
    Widget infoIcons = createInfoPanel(situationSummaryBean);

    add(rowIdx, 0, icon);
    add(rowIdx, 1, type);
    add(rowIdx, 2, resolutionState);
    add(rowIdx, 3, subject);
    add(rowIdx, 4, timestamp);
    add(rowIdx, 5, description);
    add(rowIdx, 6, infoIcons);
}
 
开发者ID:Governance,项目名称:rtgov-ui,代码行数:28,代码来源:SituationTable.java

示例12: initialize

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void initialize() {

	usernamePanel = new FlowPanel();
	usernamePanel.getElement().setId("username");

	usernameLabel = new HTML();
	usernamePanel.add(usernameLabel);
	
	changePasswordHandler = new InlineLabel(I18N.CONSTANTS.changePassword());
	changePasswordHandler.setVisible(false);
	usernamePanel.add(changePasswordHandler);

	logoutPanel = new SimplePanel();
	logoutPanel.getElement().setId("userlogout");

	logoutHandler = new Anchor(I18N.CONSTANTS.logout());
	logoutPanel.add(logoutHandler);

	// initWidget(); Useless.

}
 
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:26,代码来源:AuthenticationBannerView.java

示例13: PhoneFW

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
public PhoneFW(FDesc fielddescriptor) {
    super(fielddescriptor);
    mainPanel.add(new InlineLabel("(+"));
    mainPanel.add(country);
    mainPanel.add(new InlineLabel(") - "));
    mainPanel.add(area);
    mainPanel.add(new InlineLabel(" - "));
    mainPanel.add(local);
    initWidget(mainPanel);

    country.setWidth(COUNTRY_WIDTH);
    country.getElement().getStyle().setMarginLeft(5, Unit.PX);
    country.getElement().getStyle().setMarginRight(5, Unit.PX);

    area.setWidth(AREA_WIDTH);
    area.getElement().getStyle().setMarginLeft(5, Unit.PX);
    area.getElement().getStyle().setMarginRight(5, Unit.PX);

    local.setWidth(LOCAL_WIDTH);
    local.getElement().getStyle().setMarginLeft(5, Unit.PX);
    local.getElement().getStyle().setMarginRight(5, Unit.PX);

    country.setMaxLength(PhoneNumberLogic.MAX_COUNTRY_LENGTH);
    area.setMaxLength(PhoneNumberLogic.MAX_AREA_LENGTH);
    local.setMaxLength(PhoneNumberLogic.MAX_LOCAL_LENGTH);
}
 
开发者ID:inepex,项目名称:ineform,代码行数:27,代码来源:PhoneFW.java

示例14: ButtonCaption

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
public ButtonCaption(String label)
{
    super();
    setWidth("100%");
    setStyleName("Caption");
    closeImage = new Image(images.closeIconImageData().getSafeUri());
    closeImage.setSize("16px","16px");
    closeDialog = new PushButton(closeImage);
    
    closeDialog.setStyleName(css.closeIconStyle());
    
    add(text = new InlineLabel(label));
    add(closeDialog);
    setCellHorizontalAlignment(getElement(),ALIGN_RIGHT);
    setCellWidth(closeDialog,"1px");
    setCellHeight(closeDialog,"1px");
}
 
开发者ID:muquit,项目名称:gwtoauthlogindemo,代码行数:18,代码来源:ButtonCaption.java

示例15: addRow

import com.google.gwt.user.client.ui.InlineLabel; //导入依赖的package包/类
/**
 * Adds a single row to the table.
 * @param taskSummaryBean
 */
public void addRow(final TaskSummaryBean taskSummaryBean) {
    int rowIdx = this.rowElements.size();
    DateTimeFormat format = DateTimeFormat.getFormat(i18n.format("date-format")); //$NON-NLS-1$

    Anchor name = toDetailsPageLinkFactory.get("id", taskSummaryBean.getId()); //$NON-NLS-1$
    name.setText(taskSummaryBean.getName());
    InlineLabel priority = new InlineLabel(String.valueOf(taskSummaryBean.getPriority()));
    InlineLabel owner = new InlineLabel(taskSummaryBean.getOwner());
    InlineLabel status = new InlineLabel(taskSummaryBean.getStatus());
    InlineLabel dueOn = new InlineLabel(taskSummaryBean.getDueDate() != null ? format.format(taskSummaryBean.getDueDate()) : ""); //$NON-NLS-1$

    add(rowIdx, 0, name);
    add(rowIdx, 1, priority);
    add(rowIdx, 2, owner);
    add(rowIdx, 3, status);
    add(rowIdx, 4, dueOn);
}
 
开发者ID:Governance,项目名称:dtgov,代码行数:22,代码来源:TasksTable.java


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