org.zkoss.zul.Label.getValue()方法的使用及代码示例

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

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

Label.getValue介绍

[英]Returns the value.

Default: "".

Deriving class can override it to return whatever it wants other than null.
[中]返回值。
默认值:“”。
派生类可以重写它以返回除null以外的任何内容。

代码示例

代码示例来源:origin: org.zkoss.zk/zul

public String getValue(Component cmp) {
    return ((Label) cmp).getValue();
  }
});

代码示例来源:origin: org.zkoss.zk/zul

private Object handleCase(Object c) {
  if (c instanceof Label)
    c = ((Label) c).getValue();
  if (_igcase) {
    if (c instanceof String)
      return ((String) c).toUpperCase();
    if (c instanceof Character)
      return new Character(Character.toUpperCase(((Character) c).charValue()));
  }
  return c;
}

代码示例来源:origin: org.zkoss.zk/zul

/** Returns the value of the {@link Label} it contains, or null
 * if no such cell.
 */
public String getLabel() {
  final Component cell = getFirstChild();
  return cell != null && cell instanceof Label ? ((Label) cell).getValue() : null;
}

代码示例来源:origin: org.zkoss.zk/zul

/** Returns the value of the {@link Label} it contains, or null
 * if no such cell.
 */
public String getLabel() {
  final Component cell = getFirstChild();
  return cell != null && cell instanceof Label ? ((Label) cell).getValue() : null;
}

代码示例来源:origin: org.zkoss.zk/zul

/** Returns the value of the {@link Label} it contains, or null
 * if no such cell.
 */
public String getLabel() {
  final Component cell = getFirstChild();
  return cell != null && cell instanceof Label ? ((Label) cell).getValue() : null;
}

代码示例来源:origin: org.zkoss.zk/zul

/** Sets the value.
 */
public void setValue(String value) {
  if (value == null)
    value = "";
  if (!Objects.equals(_value, value)) {
    _value = value;
    smartUpdate("value", getValue());
    //allow deriving to override getValue()
  }
}

代码示例来源:origin: org.zkoss.zk/zul

/**
 * Internal use only
 * @since 6.5.0
 */
public void onCreate(Event evt) {
  if (_tmpLabel != null) {
    setLabel(_tmpLabel.getValue());
    removeChild(_tmpLabel);
  }
  _tmpLabel = null;
}

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

/**
 * Initialize controller.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  root = comp;
  noSelectionMessage = locationHeader.getValue();
  committed();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.context.encounter

/**
 * Initialize controller.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  root = comp;
  noSelectionMessage = locationHeader.getValue();
  committed();
}

代码示例来源:origin: org.carewebframework/org.carewebframework.vista.ui.context.encounter

/**
 * Initialize controller.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  noSelectionMessage = lblLocation.getValue();
  imgLocked.setSrc(Constants.ICON_LOCKED);
  committed();
}

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

private String getValue(int col, int row) {
  Component cmp = getCell(col, row).getFirstChild();
  return cmp instanceof Label ? ((Label) cmp).getValue() : ((Textbox) cmp).getValue();
}

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

/**
 * Initialize controller.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  getAppFramework().registerObject(patientContextListener);
  noSelectionMessage = lblLocation.getValue();
  patientContextListener.committed();
  committed();
}

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

/**
 * Set the drop id of the root component.
 * 
 * @param comp The root component of the info panel.
 */
@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  ((HtmlBasedComponent) comp).setDroppable(getDropId());
  this.collapsedAlertPanelHeight = this.alertPanel.getHeight();
  this.alertTitlePrefix = this.alertTitle.getValue();
  openAlertPanel(false);
}

代码示例来源:origin: org.zkoss.zk/zul

protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws IOException {
  super.renderProperties(renderer);
  int v = getMaxlength();
  if (v > 0)
    renderer.render("maxlength", v);
  render(renderer, "multiline", isMultiline());
  render(renderer, "pre", isPre());
  final String val = getValue();
  //allow deriving to override getValue()
  render(renderer, "value", val);
  org.zkoss.zul.impl.Utils.renderCrawlableText(val);
}

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

private void test(Component root, String eventName, int eventData, int expectedSize) {
    String labelText = eventName + "." + eventData;
    EventManager.getInstance().fireLocalEvent(eventName, labelText);
    assertEquals(expectedSize, root.getChildren().size());
    Label label = (Label) root.getChildren().get(expectedSize - 1).getFirstChild();
    assertEquals(labelText, label.getValue());
  }
}

代码示例来源:origin: org.zkoss.zk/zul

Component cc = cell.getFirstChild();
if (cc instanceof Label) {
  String val = ((Label) cc).getValue();
  group = new Listgroup(val);
} else {

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

@Override
public void doAfterCompose(Component comp) throws Exception {
  super.doAfterCompose(comp);
  noSelection = lblName.getValue();
  IUser user = SecurityUtil.getAuthenticatedUser();
  setLabel(lblUser, user.getFullName() + " @ " + user.getSecurityDomain().getName(), null);
  lblUser.setVisible(showUser);
  this.getEventManager().subscribe(PATIENT_CHANGE_EVENT, patientChangeListener);
  setPatient(PatientContext.getActivePatient());
}

代码示例来源:origin: org.zkoss.zk/zul

throw new UiException("The model template can only support Label component, not " + items[0]);
items[0].detach(); //remove the label from owner
return ((Label) items[0]).getValue();

代码示例来源:origin: org.zkoss.zk/zkbind

return lbl.getValue();

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

/**
 * Update the scheduled notification with new input values and send to the server, then close
 * the dialog if successful.
 */
public void onClick$btnOK() {
  if (validate()) {
    notification.setDeliveryDate(new FMDate(dtbDelivery.getDate()));
    notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null);
    notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null);
    notification.setSubject(txtSubject.getValue());
    notification.setPriority((Priority) cboPriority.getSelectedItem().getValue());
    List<String> message = StrUtil.toList(txtMessage.getText());
    
    if (service.scheduleNotification(notification, message, recipients)) {
      root.setAttribute("notification", notification);
      root.detach();
    } else {
      PromptDialog.showError("@vistanotification.schedule.save.failure");
    }
  }
}

相关文章