예제 #1
0
 private void doFieldLabel() {
   if (nil(this.editingCol.getFactField())) {
     fieldLabel.setText(constants.pleaseChooseFactType());
   } else {
     fieldLabel.setText(editingCol.getFactField());
   }
 }
  // Make a new Cell for ActionInsertFact columns
  private DecoratedGridCellValueAdaptor<? extends Comparable<?>> derieveCellFromAction(
      ActionInsertFactCol52 col) {

    // Check if the column has a "Value List" or an enumeration. Value List takes precedence
    final String factType = col.getFactType();
    final String fieldName = col.getFactField();
    if (model.hasValueList(col)) {
      return makeValueListCell(col);

    } else if (sce.hasEnums(factType, fieldName)) {
      return makeEnumCell(factType, fieldName);
    }

    return derieveCellFromModel(col);
  }
예제 #3
0
 private void makeLimitedValueWidget() {
   if (!(editingCol instanceof LimitedEntryActionInsertFactCol52)) {
     setAttributeVisibility(limitedEntryValueAttributeIndex, false);
     return;
   }
   if (nil(editingCol.getFactField())) {
     setAttributeVisibility(limitedEntryValueAttributeIndex, false);
     return;
   }
   LimitedEntryActionInsertFactCol52 lea = (LimitedEntryActionInsertFactCol52) editingCol;
   setAttributeVisibility(limitedEntryValueAttributeIndex, true);
   if (lea.getValue() == null) {
     lea.setValue(factory.makeNewValue(editingCol));
   }
   limitedEntryValueWidgetContainer.setWidget(factory.getWidget(editingCol, lea.getValue()));
 }
예제 #4
0
 private ActionInsertFactCol52 cloneActionInsertColumn(ActionInsertFactCol52 col) {
   ActionInsertFactCol52 clone = null;
   if (col instanceof LimitedEntryActionInsertFactCol52) {
     clone = new LimitedEntryActionInsertFactCol52();
     DTCellValue52 dcv = cloneLimitedEntryValue(((LimitedEntryCol) col).getValue());
     ((LimitedEntryCol) clone).setValue(dcv);
   } else {
     clone = new ActionInsertFactCol52();
   }
   clone.setBoundName(col.getBoundName());
   clone.setType(col.getType());
   clone.setFactField(col.getFactField());
   clone.setFactType(col.getFactType());
   clone.setHeader(col.getHeader());
   clone.setValueList(col.getValueList());
   clone.setDefaultValue(col.getDefaultValue());
   clone.setHideColumn(col.isHideColumn());
   clone.setInsertLogical(col.isInsertLogical());
   return clone;
 }