// 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);
  }
예제 #2
0
  private ListBox loadPatterns() {
    Set<String> vars = new HashSet<String>();
    ListBox patterns = new ListBox();

    for (Object o : model.getActionCols()) {
      ActionCol52 col = (ActionCol52) o;
      if (col instanceof ActionInsertFactCol52) {
        ActionInsertFactCol52 c = (ActionInsertFactCol52) col;
        if (!vars.contains(c.getBoundName())) {
          patterns.addItem(
              c.getFactType() + " [" + c.getBoundName() + "]",
              c.getFactType() + " " + c.getBoundName());
          vars.add(c.getBoundName());
        }
      }
    }

    return patterns;
  }
예제 #3
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;
 }