org.fujion.component.Label.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(125)

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

Label.<init>介绍

暂无

代码示例

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-patientheader

private void addHeader(String text) {
  Label header = new Label(text);
  header.addClass("cwf-patientheader-header");
  pnlDetail.addChild(header);
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-patientheader

private void addDetail(String text, String label) {
  if (StringUtils.isEmpty(text)) {
    return;
  }
  Div div = new Div();
  pnlDetail.addChild(div);
  if (label != null) {
    Label lbl = new Label(label);
    lbl.addClass("cwf-patientheader-label");
    div.addChild(lbl);
  }
  div.addChild(new Label(text));
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

/**
 * Add a row containing the specified header (left column) and value (right column). If
 * log.isDebugEnabled() is false then don't add row for empty or null values
 *
 * @param header Text for header column
 * @param value Text for value column
 */
protected void addRow(String header, String value) {
  if ((value == null || value.length() == 0) && !debug) {
    return;
  }
  
  Label lbl = new Label();
  lbl.setLabel(value);
  lbl.setHint(value);
  addRow(header, lbl);
}

代码示例来源:origin: org.carewebframework/org.carewebframework.plugin.chat

/**
 * Adds a text entry to the dialog panel.
 *
 * @param text Text to add.
 * @param sclass SClass of the added text.
 */
private void newLabel(String text, String sclass) {
  Label lbl = new Label(text);
  lbl.addClass(sclass);
  //lbl.setMultiline(true);
  //lbl.setPre(true);
  pnlDialog.addChild(lbl);
  lbl.scrollIntoView();
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

addRow("-------DEBUG--------", clazz.getName());
row = getLastRow();
row.addChild(new Label());
row.addClass(Constants.SCLASS_DRILLDOWN_GRID);

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

/**
 * Creates a label for a string value.
 *
 * @param parent BaseComponent that will be the parent of the label.
 * @param value Value to be used as label text.
 * @param prefix Value to be used as a prefix for the label text.
 * @param style Style to be applied to the label.
 * @param asFirst If true, the label is prepended to the parent. If false, it is appended.
 * @return The newly created label.
 */
public Label createLabel(BaseComponent parent, Object value, String prefix, String style, boolean asFirst) {
  Label label = new Label(createLabelText(value, prefix));
  label.setStyles(style);
  parent.addChild(label, asFirst ? 0 : -1);
  return label;
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-patientselection-core

/**
 * Adds a demographic element to the demographic panel.
 *
 * @param root Root component.
 * @param labelId The id of the label to use.
 * @param object The element to be added.
 * @param style CSS styling to apply to element (may be null).
 */
protected void addDemographic(BaseUIComponent root, String labelId, Object object, String style) {
  object = object instanceof PrimitiveType ? ((PrimitiveType<?>) object).getValue() : object;
  String value = object == null ? null
      : object instanceof Date ? DateUtil.formatDate((Date) object) : object.toString().trim();
  if (!StringUtils.isEmpty(value)) {
    Label lbl = new Label((labelId == null ? "" : getDemographicLabel(labelId) + ": ") + value);
    root.addChild(lbl);
    if (style != null) {
      lbl.addStyles(style);
    }
  }
}

代码示例来源:origin: org.carewebframework/org.carewebframework.plugin.infopanel

/**
 * Called by the info panel to rendered the dropped UI component.
 * 
 * @param droppedItem The dropped UI component (a list item in this case).
 * @return The top level component of the rendering.
 */
@Override
public BaseComponent renderDroppedItem(BaseComponent droppedItem) {
  DroppedItem item = getDroppedItem(droppedItem);
  return new Label(item.getItemDetail());
}

代码示例来源:origin: org.carewebframework/org.carewebframework.plugin.infopanel

/**
 * Creates and returns a test alert item.
 * 
 * @param associateEvents If true, associate events with this item.
 * @return Test alert item.
 */
private BaseComponent newAlertitem(boolean associateEvents) {
  Div root = new Div(); // was vbox
  
  if (associateEvents) {
    associateEvents(root);
  }
  
  root.addChild(new Label("This is test alert #" + ++alertCount + (associateEvents ? " *" : "") + "."));
  
  for (int i = 0; i < 10; i++) {
    root.addChild(new Label("This is line #" + i));
  }
  
  return root;
}

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

/**
 * Aborts any shutdown in progress.
 *
 * @param message Optional message to send to user.
 */
public void abortShutdown(String message) {
  if (shutdown) {
    updateShutdown(0);
    message = StringUtils.isEmpty(message) ? StrUtil.getLabel("cwf.sessionmonitor.shutdown.abort.message") : message;
    MessageWindow mw = page.getChild(MessageWindow.class);
    
    if (mw != null) {
      MessagePane mp = new MessagePane();
      mp.setTitle(StrUtil.getLabel("cwf.sessionmonitor.shutdown.abort.title"));
      mp.addClass("flavor:alert-success");
      mp.addChild(new Label(message));
      mw.addChild(mp);
    } else {
      DialogUtil.showInfo(message);
    }
  }
}

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

/**
 * Add a row containing the specified header (left column) and value container (right column).
 *
 * @param header Text for header column
 * @param container Object containing text value(s)
 */
protected void addRow(String header, BaseComponent container) {
  Row row = new Row();
  grid.getRows().addChild(row);
  Div div = new Div();
  Label label = new Label(header + ":");
  label.addStyle("font-weight", "bold");
  label.addStyle("word-wrap", "word-break");
  row.addChild(div);
  row.addChild(label);
  row.addChild(container);
}

相关文章