org.fujion.component.Button.setDisabled()方法的使用及代码示例

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

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

Button.setDisabled介绍

暂无

代码示例

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

/**
 * Change button enable states to reflect whether or not pending changes exist.
 *
 * @param disable The disable status.
 */
private void disableButtons(boolean disable) {
  btnRestore.setDisabled(disable);
  btnApply.setDisabled(disable);
  pendingChanges = !disable;
  propertiesModified |= pendingChanges;
}

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

/**
 * Update control states.
 */
private void updateControls() {
  boolean disable = getSelectedLayout() == null;
  btnDelete.setDisabled(disable);
  btnOK.setDisabled(disable);
  btnRename.setDisabled(disable);
  btnClone.setDisabled(disable);
  btnExport.setDisabled(disable);
}

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

/**
 * Update control states.
 */
private void updateControls() {
  btnSave.setDisabled(!modified);
  btnRestore.setDisabled(!modified);
  txtData.setBalloon(null);
}

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

/**
 * Registers a component as changed.
 *
 * @param target The component whose input state changed.
 */
protected void changed(BaseComponent target) {
  changeSet.add(target);
  wrongValue(null, null);
  btnOK.setDisabled(false);
}

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

/**
 * Updates controls to reflect the current selection state.
 */
private void updateControls() {
  btnInvite.setDisabled(lstSessions.getSelectedCount() == 0);
}

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

@EventHandler(value = "change", target = "cboxChannels")
private void onChange$cboxChannels(ChangeEvent event) {
  btnSendMessage.setDisabled(false);
}

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

/**
 * Updates control status.
 *
 * @param disableSend If true, disable the send button.
 */
private void updateControls(boolean disableSend) {
  btnSendMessage.setDisabled(disableSend);
  txtMessage.setFocus(true);
}

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

private void updateState() {
  btnOK.setDisabled(StringUtils.isEmpty(textbox.getValue()));
}

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

private void disableButton(Button btn, boolean disabled) {
  btn.setDisabled(disabled);
  btn.addStyle("opacity", disabled ? ".4" : "1");
}

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

/**
 * Update buttons based on current selection.
 */
@EventHandler(value = "change", target = "@tree")
private void onChange$tree() {
  btnOK.setDisabled(selectedPluginDefinition() == null);
}

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

/**
 * Invoked by the view history whenever the selected topic changes.
 */
@Override
public void onTopicSelected(HelpTopic topic) {
  URL url = null;
  
  try {
    String src = topic == null ? null : HelpUtil.getUrl(topic.getURL().toString());
    iframe.setSrc(src);
  } catch (Exception e) {
    iframe.setSrc("about:" + e);
  }
  
  lastURL = iframe.getSrc();
  btnPrevious.setDisabled(!history.hasPrevious());
  btnNext.setDisabled(!history.hasNext());
  btnPrint.setDisabled(url == null);
  btnOpen.setDisabled(url == null);
  
  for (HelpViewBase view : views) {
    view.onTopicSelected(topic);
  }
}

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

/**
 * Populates the goal types and initializes the input elements with values from the step or
 * goal. Also, wires change events for all input elements.
 */
@SuppressWarnings("unchecked")
@Override
public void afterInitialized(BaseComponent comp) {
  super.afterInitialized(comp);
  domainObject = (T) comp.getAttribute("domainObject");
  btnOK.setDisabled(true);
  initControls();
  EventUtil.post(new Event("deferredInit", root, null));
}

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

/**
 * Update control states for current selection.
 */
private void updateControls() {
  Treenode selectedNode = tree.getSelectedNode();
  ElementUI selectedElement = getElement(selectedNode);
  contextMenu.updateStates(selectedElement, btnAdd, btnDelete, btnCopy, btnCut, btnPaste, btnProperties, btnAbout);
  BaseComponent parent = selectedNode == null ? null : selectedNode.getParent();
  //parent = parent == null ? null : parent.getParent();
  Treenode target = parent instanceof Treenode ? (Treenode) parent : null;
  btnLeft.setDisabled(movementType(selectedNode, target, false) == MovementType.INVALID);
  target = selectedNode == null ? null : (Treenode) selectedNode.getPreviousSibling();
  btnRight.setDisabled(movementType(selectedNode, target, false) == MovementType.INVALID);
  btnUp.setDisabled(movementType(selectedNode, target, true) == MovementType.INVALID);
  target = selectedNode == null ? null : (Treenode) selectedNode.getNextSibling();
  btnDown.setDisabled(movementType(selectedNode, target, true) == MovementType.INVALID);
  btnToFront.addStyle("opacity", bringToFront ? null : "0.5");
  
  if (selectedElement != null) {
    window.setContext(contextMenu.getMenupopup());
    contextMenu.setOwner(selectedElement);
  }
  
  if (selectedNode != null) {
    selectedNode.setSelected(false);
    selectedNode.setSelected(true);
  }
}

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

private void displayResource() {
  IBaseResource resource = getSelectedResource();
  if (resource == null) {
    txtResource.setValue(null);
    btnDelete.setDisabled(true);
  } else {
    FhirContext ctx = fhirService.getClient().getFhirContext();
    IParser parser = rbJSON.isChecked() ? ctx.newJsonParser() : ctx.newXmlParser();
    parser.setPrettyPrint(true);
    txtResource.setValue(parser.encodeResourceToString(resource));
    txtResource.selectRange(0, 0);
    btnDelete.setDisabled(false);
  }
}

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

private void setPatient(Patient patient) {
  this.patient = patient;
  hideLabels();
  needsDetail = true;
  pnlDetail.destroyChildren();
  if (log.isDebugEnabled()) {
    log.debug("patient: " + patient);
  }
  if (patient == null) {
    lblName.setLabel(noSelection);
    btnDetail.setDisabled(true);
    return;
  }
  btnDetail.setDisabled(false);
  patientName = FhirUtil.formatName(patient.getName());
  String mrn = FhirUtil.getMRNString(patient);
  lblName.setLabel(patientName + (mrn.isEmpty() ? "" : "  (" + mrn + ")"));
  setLabel(lblDOB, formatDateAndAge(patient.getBirthDate()), lblDOBLabel);
  setLabel(lblDOD, formatDOD(patient.getDeceased()), lblDODLabel);
  setLabel(lblGender, patient.hasGender() ? patient.getGender().getDisplay() : null, null);
}

相关文章