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

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

public class AccountingLineViewLine
extends Object
implements ReadOnlyable, AccountingLineViewLineFillingElement

Represents a single table row to be rendered as part of an accounting line view.


Constructor Summary
AccountingLineViewLine()
           
 
Method Summary
protected  AccountingLineTableCell createTableCellForNonTableJoining(RenderableElement element)
          Creates a table cell to wrap the given rendering element
 AccountingLineViewLineDefinition getDefinition()
          Gets the definition attribute.
 int getDisplayingFieldWidth()
          Finds the number of table cells this line expects to take up
 List<RenderableElement> getElements()
          Gets the elements attribute.
protected  int getMaxRequestedRowCount()
          Determines the max requested row count in the line.
 String getName()
          Returns the name(s) of this table joining element; some table joining elements are compound
 int getRequestedRowCount()
          Gets the number of actual rows requested (1)
 boolean isReadOnly()
          Determines whether is element is entirely read only or not
 void joinRow(AccountingLineTableRow headerRow, AccountingLineTableRow row)
          Requests that this element join a table row
 void joinTable(List<AccountingLineTableRow> rows)
          Always throws an exception - a line may only join a table through a parent lines element
 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 responsibility on to any TableJoining children
 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(AccountingLineViewLineDefinition 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<RenderableElement> fields)
          Sets the elements attribute value.
 boolean shouldStretchToFillLine()
          This element should be padded out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingLineViewLine

public AccountingLineViewLine()
Method Detail

getDefinition

public AccountingLineViewLineDefinition getDefinition()
Gets the definition attribute.

Returns:
Returns the definition.

setDefinition

public void setDefinition(AccountingLineViewLineDefinition 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<RenderableElement> getElements()
Gets the elements attribute.

Returns:
Returns the elements.

setElements

public void setElements(List<RenderableElement> fields)
Sets the elements attribute value.

Parameters:
elements - The elements to set.

getRequestedRowCount

public int getRequestedRowCount()
Gets the number of actual rows requested (1)

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

getMaxRequestedRowCount

protected int getMaxRequestedRowCount()
Determines the max requested row count in the line.

Returns:
the number of rows to create for this line

joinRow

public void joinRow(AccountingLineTableRow headerRow,
                    AccountingLineTableRow row)
Description copied from interface: TableJoining
Requests that this element join a table row

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)

createTableCellForNonTableJoining

protected AccountingLineTableCell createTableCellForNonTableJoining(RenderableElement element)
Creates a table cell to wrap the given rendering element

Parameters:
element - the element to wrap
Returns:
a table cell wrapping that element

joinTable

public void joinTable(List<AccountingLineTableRow> rows)
Always throws an exception - a line may only join a table through a parent lines element

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

shouldStretchToFillLine

public boolean shouldStretchToFillLine()
This element should be padded out

Specified by:
shouldStretchToFillLine in interface AccountingLineViewLineFillingElement
Returns:
true if the line filling element should stretch its cell to fill the line; if false (or if the line contains more than a single cell), the line will be padded out with an empty cell
See Also:
org.kuali.kfs.sys.document.web.AccountingLineViewLineFillingElement#stretchToFillLine()

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:
org.kuali.kfs.sys.document.web.TableJoining#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:
org.kuali.kfs.sys.document.web.TableJoining#removeUnviewableBlocks()

readOnlyizeReadOnlyBlocks

public void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
Shuffles responsibility on to any TableJoining children

Specified by:
readOnlyizeReadOnlyBlocks in interface TableJoining
Parameters:
readOnlyBlocks - the names of blocks to make read only
See Also:
TableJoining.readOnlyizeReadOnlyBlocks(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)

getDisplayingFieldWidth

public int getDisplayingFieldWidth()
Finds the number of table cells this line expects to take up

Specified by:
getDisplayingFieldWidth in interface AccountingLineViewLineFillingElement
Returns:
the number of displayed table cells this line expects to render as

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()

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)


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