org.kuali.kfs.sys.document.web
Class AccountingLineViewLines

java.lang.Object
  extended by org.kuali.kfs.sys.document.web.AccountingLineViewLines
All Implemented Interfaces:
ElementNamable, ReadOnlyable, TableJoining

public class AccountingLineViewLines
extends Object
implements TableJoining, ReadOnlyable

Represents the rendering for a bunch of elements within the accounting line view


Constructor Summary
AccountingLineViewLines()
           
 
Method Summary
 AccountingLineViewLinesDefinition getDefinition()
          Gets the definition attribute.
 List<AccountingLineViewLineFillingElement> getElements()
          Gets the elements attribute.
 int getMaxExpectedLineWidth()
           
 String getName()
          Returns the name(s) of this table joining element; some table joining elements are compound
 int getRequestedRowCount()
          The interesting implementation...how many does it need? Let's see here...one for each child row...
 boolean isReadOnly()
          Determines whether is element is entirely read only or not
 void joinRow(AccountingLineTableRow headerRow, AccountingLineTableRow row)
          Throws an exception - lines should never be asked to join rows
 void joinTable(List<AccountingLineTableRow> rows)
          Attempts to have each child line join the rows that have been given
protected  void padOutOrStretchCells(AccountingLineViewLineFillingElement line, int maxExpectedLineWidth, AccountingLineTableRow headerRow, AccountingLineTableRow row)
          Either pads out out the given table rows with an empty cell or stretches the cell to fill the whole line
 void performFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations, AccountingLine accountingLine, Map unconvertedValues)
          Performs a transformations on any fields this TableJoining layout element knows about
 void readOnlyize()
          Sets any renderable element within this table joining block to be read only
 void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
          Shuffles the responsibility to the child lines
 void removeAllActionBlocks()
          Removes any action blocks from the given element
 void removeUnviewableBlocks(Set<String> unviewableBlocks)
          Removes any unviewable blocks within this this table joining element
 void setDefinition(AccountingLineViewLinesDefinition definition)
          Sets the definition attribute value.
 void setEditable()
          Sets any renderable element within this table joining block to be editable
 void setEditableBlocks(Set<String> editableBlocks)
          Instructs the element to make any child readOnlyizable blocks named within the given Set to read only
 void setElements(List<AccountingLineViewLineFillingElement> lines)
          Sets the elements attribute value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingLineViewLines

public AccountingLineViewLines()
Method Detail

getDefinition

public AccountingLineViewLinesDefinition getDefinition()
Gets the definition attribute.

Returns:
Returns the definition.

setDefinition

public void setDefinition(AccountingLineViewLinesDefinition definition)
Sets the definition attribute value.

Parameters:
definition - The definition to set.

getName

public String getName()
Description copied from interface: ElementNamable
Returns the name(s) of this table joining element; some table joining elements are compound

Specified by:
getName in interface ElementNamable
Returns:
the names of this table joining element
See Also:
org.kuali.kfs.sys.document.web.AccountingLineViewRenderableElementContainer#getName()

getElements

public List<AccountingLineViewLineFillingElement> getElements()
Gets the elements attribute.

Returns:
Returns the elements.

setElements

public void setElements(List<AccountingLineViewLineFillingElement> lines)
Sets the elements attribute value.

Parameters:
elements - The elements to set.

getRequestedRowCount

public int getRequestedRowCount()
The interesting implementation...how many does it need? Let's see here...one for each child row... yes...that's right, one table row for each child row

Specified by:
getRequestedRowCount in interface TableJoining
Returns:
the minimum number of rows
See Also:
org.kuali.kfs.sys.document.web.AccountingLineViewRenderableElement#getRequestedRowCount()

joinRow

public void joinRow(AccountingLineTableRow headerRow,
                    AccountingLineTableRow row)
Throws an exception - lines should never be asked to join rows

Specified by:
joinRow in interface TableJoining
Parameters:
headerRow - the header row which can be joined
row - the row which can be joined
See Also:
org.kuali.kfs.sys.document.web.TableJoining#joinRow(org.kuali.kfs.sys.document.web.AccountingLineTableRow)

joinTable

public void joinTable(List<AccountingLineTableRow> rows)
Attempts to have each child line join the rows that have been given

Specified by:
joinTable in interface TableJoining
Parameters:
rows - the rows to join
See Also:
TableJoining.joinTable(java.util.List)

padOutOrStretchCells

protected void padOutOrStretchCells(AccountingLineViewLineFillingElement line,
                                    int maxExpectedLineWidth,
                                    AccountingLineTableRow headerRow,
                                    AccountingLineTableRow row)
Either pads out out the given table rows with an empty cell or stretches the cell to fill the whole line

Parameters:
line - the line joining the table
maxExpectedLineWidth - the expected width, in cell count, of the line
headerRow - the first row to add padding out to
row - the second row to add padding out to - if we're only filling one row, this will be null

readOnlyize

public void readOnlyize()
Description copied from interface: ReadOnlyable
Sets any renderable element within this table joining block to be read only

Specified by:
readOnlyize in interface ReadOnlyable
See Also:
ReadOnlyable.readOnlyize()

isReadOnly

public boolean isReadOnly()
Description copied from interface: ReadOnlyable
Determines whether is element is entirely read only or not

Specified by:
isReadOnly in interface ReadOnlyable
Returns:
true if the entire element is read only; false otherwise
See Also:
ReadOnlyable.isReadOnly()

removeAllActionBlocks

public void removeAllActionBlocks()
Description copied from interface: TableJoining
Removes any action blocks from the given element

Specified by:
removeAllActionBlocks in interface TableJoining
See Also:
TableJoining.removeAllActionBlocks()

removeUnviewableBlocks

public void removeUnviewableBlocks(Set<String> unviewableBlocks)
Description copied from interface: TableJoining
Removes any unviewable blocks within this this table joining element

Specified by:
removeUnviewableBlocks in interface TableJoining
Parameters:
unviewableBlocks - a Set of the names of blocks that should not be rendered
See Also:
TableJoining.removeUnviewableBlocks(java.util.Set)

performFieldTransformations

public void performFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations,
                                        AccountingLine accountingLine,
                                        Map unconvertedValues)
Description copied from interface: TableJoining
Performs a transformations on any fields this TableJoining layout element knows about

Specified by:
performFieldTransformations in interface TableJoining
accountingLine - the accounting line which is being rendering during the transformation
unconvertedValues - any unconverted values from the form
See Also:
org.kuali.kfs.sys.document.web.TableJoining#performFieldTransformation(org.kuali.kfs.sys.document.service.AccountingLineFieldRenderingTransformation, org.kuali.kfs.sys.businessobject.AccountingLine, java.util.Map, java.util.Map)

getMaxExpectedLineWidth

public int getMaxExpectedLineWidth()
Returns:
the maximum expected width of any of the child line elements in cells

readOnlyizeReadOnlyBlocks

public void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
Shuffles the responsibility to the child lines

Specified by:
readOnlyizeReadOnlyBlocks in interface TableJoining
Parameters:
readOnlyBlocks - the names of blocks to make read only
See Also:
TableJoining.readOnlyizeReadOnlyBlocks(java.util.Set)

setEditableBlocks

public void setEditableBlocks(Set<String> editableBlocks)
Description copied from interface: TableJoining
Instructs the element to make any child readOnlyizable blocks named within the given Set to read only

Specified by:
setEditableBlocks in interface TableJoining
See Also:
TableJoining.setEditableBlocks(java.util.Set)

setEditable

public void setEditable()
Description copied from interface: ReadOnlyable
Sets any renderable element within this table joining block to be editable

Specified by:
setEditable in interface ReadOnlyable
See Also:
ReadOnlyable.setEditable()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.