gpt4 book ai didi

com.github.bordertech.wcomponents.WText.setVisible()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 17:41:05 29 4
gpt4 key购买 nike

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

WText.setVisible介绍

暂无

代码示例

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples

/**
 * Updates the options present in the region selector, depending on the state selector's value.
 */
private void updateRegion() {
  actMessage.setVisible(false);
  String state = (String) stateSelector.getSelected();
  if (STATE_ACT.equals(state)) {
    actMessage.setVisible(true);
    regionSelector.setOptions(new String[]{null, "Belconnen", "City", "Woden"});
  } else if (STATE_NSW.equals(state)) {
    regionSelector.setOptions(
        new String[]{null, "Hunter", "Riverina", "Southern Tablelands"});
  } else if (STATE_VIC.equals(state)) {
    regionSelector.setOptions(
        new String[]{null, "Gippsland", "Melbourne", "Mornington Peninsula"});
  } else {
    regionSelector.setOptions(new Object[]{null});
  }
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-examples

/**
 * Creates a WDropdownSubmitOnChangeExample.
 */
public WDropdownSubmitOnChangeExample() {
  actMessage.setEncodeText(false);
  add(new ExplanatoryText("Any form control component which is not a WButton will show a visible warning in its label if its "
      + "submitOnChange property is set true."));
  WFieldLayout flay = new WFieldLayout();
  add(flay);
  flay.setLabelWidth(25);
  flay.setMargin(new Margin(null, null, Size.LARGE, null));
  flay.addField("State", stateSelector).getLabel().setHint("Selecting a state will update the available regions.");
  flay.addField("Region", regionSelector);
  // Used to test control of visibility as part of submit on change.
  add(actMessage);
  actMessage.setVisible(false);
  stateSelector.setOptions(new String[]{null, STATE_ACT, STATE_NSW, STATE_VIC});
  //This is the flag which causes accessibility problems. It may be removed completely in future versions of WComponents.
  //you should use AJAX instead
  stateSelector.setSubmitOnChange(true);
  stateSelector.setActionOnChange(new Action() {
    @Override
    public void execute(final ActionEvent event) {
      updateRegion();
      regionSelector.resetData();
    }
  });
  regionSelector.setSubmitOnChange(true);
}

代码示例来源:origin: com.github.bordertech.wcomponents/wcomponents-core

repeatedComponent.setVisible(false);
setActiveContext(uic);

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com