/**
  * Goes through all child fields; removes any fields which match unviewable blocks or otherwise,
  * has the field remove unviewable blocks
  *
  * @see org.kuali.kfs.sys.document.web.TableJoining#removeUnviewableBlocks(java.util.Set)
  */
 public void removeUnviewableBlocks(Set<String> unviewableBlocks) {
   List<AccountingLineViewField> unviewableFields = new ArrayList<AccountingLineViewField>();
   for (AccountingLineViewField field : fields) {
     if (unviewableBlocks.contains(field.getName())) {
       unviewableFields.add(field);
     } else {
       field.removeUnviewableBlocks(unviewableBlocks);
     }
   }
   fields.removeAll(unviewableFields);
 }
 /**
  * Removes any child action blocks; surviving blocks are instructed to remove child blocks they
  * have
  *
  * @see org.kuali.kfs.sys.document.web.TableJoining#removeAllActionBlocks()
  */
 public void removeAllActionBlocks() {
   List<AccountingLineViewField> fieldsToRemove = new ArrayList<AccountingLineViewField>();
   for (AccountingLineViewField field : fields) {
     if (field.isActionBlock()) {
       fieldsToRemove.add(field);
     } else {
       field.removeAllActionBlocks();
     }
   }
   fields.removeAll(fieldsToRemove);
 }
 /**
  * Has fields perform the transformations
  *
  * @see org.kuali.kfs.sys.document.web.TableJoining#performFieldTransformations(java.util.List,
  *     org.kuali.kfs.sys.businessobject.AccountingLine, java.util.Map, java.util.Map)
  */
 public void performFieldTransformations(
     List<AccountingLineFieldRenderingTransformation> fieldTransformations,
     AccountingLine accountingLine,
     Map unconvertedValues) {
   int count = 0;
   for (AccountingLineViewField field : fields) {
     for (AccountingLineFieldRenderingTransformation transformation : fieldTransformations) {
       transformation.transformField(
           accountingLine, field.getField(), field.getDefinition(), unconvertedValues);
     }
   }
 }
 /** @see org.kuali.kfs.sys.document.web.ReadOnlyable#setEditable() */
 public void setEditable() {
   for (AccountingLineViewField field : fields) {
     field.setEditable();
   }
 }
 /** @see org.kuali.kfs.sys.document.web.TableJoining#setEditableBlocks(java.util.Set) */
 public void setEditableBlocks(Set<String> editableBlocks) {
   for (AccountingLineViewField field : fields) {
     field.setEditableBlocks(editableBlocks);
   }
 }
 /** @see org.kuali.kfs.sys.document.web.ReadOnlyable#readOnlyize() */
 public void readOnlyize() {
   for (AccountingLineViewField field : fields) {
     field.readOnlyize();
   }
 }
 /** @see org.kuali.kfs.sys.document.web.ReadOnlyable#isReadOnly() */
 public boolean isReadOnly() {
   for (AccountingLineViewField field : fields) {
     if (!field.isReadOnly()) return false;
   }
   return true;
 }
 /**
  * Has each field readOnlyize
  *
  * @see org.kuali.kfs.sys.document.web.TableJoining#readOnlyizeReadOnlyBlocks(java.util.Set)
  */
 public void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks) {
   for (AccountingLineViewField field : fields) {
     field.readOnlyizeReadOnlyBlocks(readOnlyBlocks);
   }
 }
 /**
  * Creates a header cell for for the given field
  *
  * @param field the field to create a header cell for
  * @return a header cell
  */
 protected AccountingLineTableCell createHeaderCellForField(AccountingLineViewField field) {
   AccountingLineTableCell headerCell = new AccountingLineTableCell();
   headerCell.setRendersAsHeader(true);
   headerCell.addRenderableElement(field.createHeaderLabel());
   return headerCell;
 }