org.apache.wicket.markup.html.basic.Label.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中org.apache.wicket.markup.html.basic.Label.<init>()方法的一些代码示例,展示了Label.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.<init>()方法的具体详情如下:
包路径:org.apache.wicket.markup.html.basic.Label
类名称:Label
方法名:<init>

Label.<init>介绍

[英]Constructor
[中]建造师

代码示例

代码示例来源:origin: apache/wicket

/**
 * Constructor for if you want to set all the properties yourself.
 * 
 * @param allowHtml
 *            If true, any html of the content will be rendered as is. Otherwise, it will be
 *            escaped.
 */
public StaticContentStep(final boolean allowHtml)
{
  this.allowHtml = allowHtml;
  add(new Label("content", ""));
}

代码示例来源:origin: apache/wicket

@Override
public Component getHeader(final String componentId)
{
  return new Label(componentId, getDisplayModel());
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
protected Component getViewer(String id, Node node) throws RepositoryException {
  String value = getValue(node);
  return new Label(id, value);
}

代码示例来源:origin: org.geoserver.web/gs-web-core

@Override
  protected void populateItem(ListItem<CatalogInfo> item) {
    CatalogInfo object = (CatalogInfo) item.getModelObject();
    StringResourceModel reason = notRemoved.get(object);
    item.add(new Label("name", name(object)));
    item.add(new Label("reason", reason));
  }
};

代码示例来源:origin: apache/wicket

@Override
public void populateItem(Item<ICellPopulator<T>> item, String componentId, IModel<T> rowModel)
{
  item.add(new Label(componentId, getDataModel(rowModel)));
}

代码示例来源:origin: apache/wicket

/**
 * Implementation of populateItem which adds a label to the cell whose model is the provided
 * property expression evaluated against rowModelObject
 * 
 * @see ICellPopulator#populateItem(Item, String, IModel)
 */
@Override
public void populateItem(final Item<ICellPopulator<T>> item, final String componentId,
  final IModel<T> rowModel)
{
  item.add(new Label(componentId, getDataModel(rowModel)));
}

代码示例来源:origin: apache/wicket

/**
 * factory method for the available items header
 * 
 * @param componentId
 *            component id of the returned header component
 * 
 * @return available items component
 */
protected Component newAvailableHeader(final String componentId)
{
  return new Label(componentId, new ResourceModel("palette.available", "Available"));
}

代码示例来源:origin: apache/wicket

/**
 * factory method for the selected items header
 * 
 * @param componentId
 *            component id of the returned header component
 * 
 * @return header component
 */
protected Component newSelectedHeader(final String componentId)
{
  return new Label(componentId, new ResourceModel("palette.selected", "Selected"));
}

代码示例来源:origin: org.geoserver.web/gs-web-core

/** Override otherwise the header is not i18n'ized */
  @Override
  public Component newAvailableHeader(final String componentId) {
    return new Label(
        componentId, new ResourceModel("JAIEXTPanel.availableHeader"));
  }
};

代码示例来源:origin: org.geoserver.web/gs-web-core

public ServerBusyPage() {
    IModel model = new ResourceModel("ServerBusyPage.serverBusyMessage");
    add(new Label("serverBusyMessage", model));
  }
}

代码示例来源:origin: apache/wicket

@Override
public void populateItem(Item<ICellPopulator<TreeNode>> item, String componentId,
  IModel<TreeNode> rowModel)
{
  item.add(new Label(componentId, Bytes.bytes(rowModel.getObject().getSize())
    .toString()));
}

代码示例来源:origin: apache/wicket

/**
   * @see org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator#populateItem(org.apache.wicket.markup.repeater.Item,
   *      java.lang.String, org.apache.wicket.model.IModel)
   */
  @Override
  public void populateItem(final Item<ICellPopulator<T>> cellItem, final String componentId,
    final IModel<T> rowModel)
  {
    cellItem.add(new Label(componentId, new PropertyModel<>(rowModel, property)));
  }
}

代码示例来源:origin: org.geoserver.web/gs-web-core

Component editAttributeLink(final IModel<AttributeDescription> itemModel) {
  GeoServerAjaxFormLink link =
      new GeoServerAjaxFormLink("link") {
        @Override
        protected void onClick(AjaxRequestTarget target, Form<?> form) {
          AttributeDescription attribute = itemModel.getObject();
          setResponsePage(new AttributeEditPage(attribute, NewFeatureTypePage.this));
        }
      };
  link.add(new Label("name", new PropertyModel<String>(itemModel, "name")));
  return link;
}

代码示例来源:origin: org.geoserver.web/gs-web-core

/** Constructs the panel with a link containing an image and a label. */
public IconWithLabel(
    final String id,
    final PackageResourceReference imageRef,
    final IModel<String> labelModel) {
  super(id);
  add(image = new Image("image", imageRef));
  add(label = new Label("label", labelModel));
}

代码示例来源:origin: org.geoserver.web/gs-web-core

@Override
  protected void populateItem(ListItem<IModel<String>> item) {
    item.add(
        new Label("message", item.getModelObject())
            .setEscapeModelStrings(false));
  }
});

代码示例来源:origin: org.geoserver.web/gs-web-core

/** Constructs the panel with a link containing an image and a label. */
public ImageExternalLink(
    final String id,
    final String href,
    final PackageResourceReference imageRef,
    final IModel<String> label) {
  super(id);
  add(this.link = new ExternalLink("link", href));
  link.add(this.image = new Image("image", imageRef));
  link.add(this.label = new Label("label", label));
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
  protected void initialize() {
    IModel<String> title = getTitle();
    Label titleLabel = new Label("text", title);
    titleLabel.add(TitleAttribute.set(getTooltip()));
    add(titleLabel);
  }
});

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

protected Component createHint(final IModel<String> hintModel) {
  final WebMarkupContainer hintContainer = new WebMarkupContainer("hint-visual");
  if (hintModel == null) {
    hintContainer.setVisible(false);
  } else {
    hintContainer.add(new Label("hint-text", hintModel));
    hintContainer.add(HippoIcon.fromSprite("hint-image", Icon.INFO_CIRCLE));
  }
  return hintContainer;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

public FileUploadBar(final String id, final FileUploadWidgetSettings settings) {
    super(id);
    setOutputMarkupId(true);

    add(new GalleryFileUploadBehavior(settings));

    add(new Label("select-files-message", new StringResourceModel("select.files.caption",
        this, Model.of(settings))));
  }
}

代码示例来源:origin: org.geoserver.web/gs-web-core

public UnauthorizedPage() {
    IModel model = null;
    if (getSession().getAuthentication() == null
        || !getSession().getAuthentication().isAuthenticated())
      model = new ResourceModel("UnauthorizedPage.loginRequired");
    else model = new ResourceModel("UnauthorizedPage.insufficientPrivileges");
    add(new Label("unauthorizedMessage", model));
  }
}

相关文章