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

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

public class AccountingLineViewDebitCreditAmountLayoutElement
extends Object
implements TableJoiningWithHeader, ReadOnlyable

A table joining element which adds two fields to an amount: debit amount and credit amount


Constructor Summary
AccountingLineViewDebitCreditAmountLayoutElement()
           
 
Method Summary
protected  AccountingLineTableCell createCellForField(org.kuali.rice.kns.web.ui.Field field, AccountingLineViewFieldDefinition definition, boolean isDebit)
          Creates a table cell with a renderable field inside
protected  AccountingLineTableCell createHeaderCellForField(boolean isDebit)
          Creates a header cell for the given field
 HeaderLabel createHeaderLabel()
          We don't generate headers
 org.kuali.rice.kns.web.ui.Field getCreditAmountField()
          Gets the creditAmountField attribute.
 AccountingLineViewFieldDefinition getCreditFieldDefinition()
          Gets the creditFieldDefinition attribute.
protected  String getCreditPropertyName()
           
 org.kuali.rice.kns.web.ui.Field getDebitAmountField()
          Gets the debitAmountField attribute.
 AccountingLineViewFieldDefinition getDebitFieldDefinition()
          Gets the debitFieldDefinition attribute.
protected  String getDebitPropertyName()
           
 AccountingLineViewDebitCreditAmountFieldDefinition getDefinition()
          Gets the definition attribute.
 String getName()
          This renderable element...it ain't got no single name!
 int getRequestedRowCount()
          Request two rows - one for the header, one for the field
 boolean isHidden()
          This isn't hidden
 boolean isReadOnly()
          Returns whether the debit and the credit amount fields are both read only
 void joinRow(AccountingLineTableRow headerLabelRow, AccountingLineTableRow row)
          Requests that this element join a table row
 void joinTable(List<AccountingLineTableRow> rows)
          Requests that this layout element property join a number of rows which will make up a table
 void performFieldTransformations(List<AccountingLineFieldRenderingTransformation> fieldTransformations, AccountingLine accountingLine, Map unconvertedValues)
          Performs a transformations on any fields this TableJoining layout element knows about
 void readOnlyize()
          Read onlyizes both the credit and the debit amount fields
 void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
          Instructs the element to make any child readOnlyizable blocks named within the given Set to read only
 void removeAllActionBlocks()
          Does nothing - we don't have action blocks, like, ever
 void removeUnviewableBlocks(Set<String> unviewableBlocks)
          Removes any unviewable blocks within this this table joining element
 void setCreditAmountField(org.kuali.rice.kns.web.ui.Field creditAmountField)
          Sets the creditAmountField attribute value.
 void setCreditFieldDefinition(AccountingLineViewFieldDefinition creditFieldDefinition)
          Sets the creditFieldDefinition attribute value.
 void setDebitAmountField(org.kuali.rice.kns.web.ui.Field debitAmountField)
          Sets the debitAmountField attribute value.
 void setDebitFieldDefinition(AccountingLineViewFieldDefinition debitFieldDefinition)
          Sets the debitFieldDefinition attribute value.
 void setDefinition(AccountingLineViewDebitCreditAmountFieldDefinition 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingLineViewDebitCreditAmountLayoutElement

public AccountingLineViewDebitCreditAmountLayoutElement()
Method Detail

isReadOnly

public boolean isReadOnly()
Returns whether the debit and the credit amount fields are both read only

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

readOnlyize

public void readOnlyize()
Read onlyizes both the credit and the debit amount fields

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

createHeaderLabel

public HeaderLabel createHeaderLabel()
We don't generate headers

Specified by:
createHeaderLabel in interface TableJoiningWithHeader
Returns:
the property to lookup the label in the data dictionary
See Also:
TableJoiningWithHeader.createHeaderLabel()

isHidden

public boolean isHidden()
This isn't hidden

Specified by:
isHidden in interface TableJoiningWithHeader
Returns:
true if the table joiner will be hidden, false otherwise - in which case a header cell will be rendered
See Also:
TableJoiningWithHeader.isHidden()

getName

public String getName()
This renderable element...it ain't got no single name!

Specified by:
getName in interface ElementNamable
Returns:
the names of this table joining element
See Also:
ElementNamable.getName()

getRequestedRowCount

public int getRequestedRowCount()
Request two rows - one for the header, one for the field

Specified by:
getRequestedRowCount in interface TableJoining
Returns:
the minimum number of rows
See Also:
TableJoining.getRequestedRowCount()

joinRow

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

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

joinTable

public void joinTable(List<AccountingLineTableRow> rows)
Description copied from interface: TableJoining
Requests that this layout element property join a number of rows which will make up a table

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

createCellForField

protected AccountingLineTableCell createCellForField(org.kuali.rice.kns.web.ui.Field field,
                                                     AccountingLineViewFieldDefinition definition,
                                                     boolean isDebit)
Creates a table cell with a renderable field inside

Parameters:
field - the field to create a cell for
Returns:
a cell that wraps the given field

createHeaderCellForField

protected AccountingLineTableCell createHeaderCellForField(boolean isDebit)
Creates a header cell for the given field

Parameters:
field - the field to create a header cell for
Returns:
a header cell

getDebitPropertyName

protected String getDebitPropertyName()
Returns:
the property name for debit labels

getCreditPropertyName

protected String getCreditPropertyName()
Returns:
the property name for credit labels

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#performFieldTransformations(java.util.List, org.kuali.kfs.sys.businessobject.AccountingLine, java.util.Map, java.util.Map)

readOnlyizeReadOnlyBlocks

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

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

removeAllActionBlocks

public void removeAllActionBlocks()
Does nothing - we don't have action blocks, like, ever

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)

getCreditAmountField

public org.kuali.rice.kns.web.ui.Field getCreditAmountField()
Gets the creditAmountField attribute.

Returns:
Returns the creditAmountField.

setCreditAmountField

public void setCreditAmountField(org.kuali.rice.kns.web.ui.Field creditAmountField)
Sets the creditAmountField attribute value.

Parameters:
creditAmountField - The creditAmountField to set.

getCreditFieldDefinition

public AccountingLineViewFieldDefinition getCreditFieldDefinition()
Gets the creditFieldDefinition attribute.

Returns:
Returns the creditFieldDefinition.

setCreditFieldDefinition

public void setCreditFieldDefinition(AccountingLineViewFieldDefinition creditFieldDefinition)
Sets the creditFieldDefinition attribute value.

Parameters:
creditFieldDefinition - The creditFieldDefinition to set.

getDebitAmountField

public org.kuali.rice.kns.web.ui.Field getDebitAmountField()
Gets the debitAmountField attribute.

Returns:
Returns the debitAmountField.

setDebitAmountField

public void setDebitAmountField(org.kuali.rice.kns.web.ui.Field debitAmountField)
Sets the debitAmountField attribute value.

Parameters:
debitAmountField - The debitAmountField to set.

getDebitFieldDefinition

public AccountingLineViewFieldDefinition getDebitFieldDefinition()
Gets the debitFieldDefinition attribute.

Returns:
Returns the debitFieldDefinition.

setDebitFieldDefinition

public void setDebitFieldDefinition(AccountingLineViewFieldDefinition debitFieldDefinition)
Sets the debitFieldDefinition attribute value.

Parameters:
debitFieldDefinition - The debitFieldDefinition to set.

getDefinition

public AccountingLineViewDebitCreditAmountFieldDefinition getDefinition()
Gets the definition attribute.

Returns:
Returns the definition.

setDefinition

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

Parameters:
definition - The definition to 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.