コード例 #1
0
  protected View createChild(String name) {
    View view = null;
    if (name.equals(PGTITLE)) {
      view = new CCPageTitle(this, ptModel, name);
    } else if (ptModel.isChildSupported(name)) {
      view = ptModel.createChild(this, name);
    } else if (name.equals(PROPERTY_ATTRIBUTE)) {
      view = new AMPropertySheet(this, propertySheetModel, name);
    } else if ((propertySheetModel != null) && propertySheetModel.isChildSupported(name)) {
      view = propertySheetModel.createChild(this, name, getModel());
    } else {
      view = super.createChild(name);
    }

    return view;
  }
コード例 #2
0
  protected View createChild(String name) {
    View view = null;

    if (name.equals(PGTITLE_THREE_BTNS)) {
      view = new CCPageTitle(this, ptModel, name);
    } else if (name.equals(PROPERTIES)) {
      view = new CCTextField(this, name, "");
    } else if (ptModel.isChildSupported(name)) {
      view = ptModel.createChild(this, name);
    } else if (tblModel.isChildSupported(name)) {
      view = tblModel.createChild(this, name);
    } else if (name.equals(TBL_PROPERTIES)) {
      view = new CCActionTable(this, tblModel, name);
    } else {
      view = super.createChild(name);
    }
    return view;
  }
コード例 #3
0
  /** createChild */
  public View createChild(String name) {
    TraceUtil.trace3("Entering");

    View child = null;

    if (name.equals(PAGE_TITLE)) {
      child = new CCPageTitle(this, pageTitleModel, name);
    } else if (pageTitleModel.isChildSupported(name)) {
      // Create child from page title model.
      child = pageTitleModel.createChild(this, name);
    } else if (name.equals(RADIO) || name.equals(SUB_RADIO)) {
      return new CCRadioButton(this, name, null);
    } else if (name.equals(PARTIAL_RELEASE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), false);
    } else if (name.equals(PARTIAL_RELEASE_SIZE)) {
      return new CCTextField(this, name, Integer.toString(8));
    } else if (name.equals(LABEL)) {
      return new CCLabel(this, name, null);
    } else if (name.equals(ALERT)) {
      return new CCAlertInline(this, name, null);
    } else if (name.equals(SUBMIT)) {
      return new CCButton(this, name, null);
    } else if (name.equals(HELP_TEXT)) {
      return new CCStaticTextField(this, name, null);
    } else if (name.equals(RECURSIVE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), true);
    } else if (name.equals(OVERRIDE)) {
      return new CCCheckBox(this, name, Boolean.toString(true), Boolean.toString(false), false);
    } else {
      // Error if get here
      throw new IllegalArgumentException("Invalid Child '" + name + "'");
    }

    TraceUtil.trace3("Exiting");
    return (View) child;
  }