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

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

public class AccountingLineViewCurrentBaseAmount
extends Object
implements TableJoiningWithHeader, ReadOnlyable

Represents a current/base amount for an accounting line


Constructor Summary
AccountingLineViewCurrentBaseAmount()
           
 
Method Summary
protected  AccountingLineTableCell createCellForField(org.kuali.rice.kns.web.ui.Field field, AccountingLineViewFieldDefinition definition)
          Creates a table cell with a renderable field inside
protected  AccountingLineTableCell createHeaderCellForField(org.kuali.rice.kns.web.ui.Field field)
          Creates a header cell for the given field
 HeaderLabel createHeaderLabel()
          Not used; returns null.
 org.kuali.rice.kns.web.ui.Field getBaseAmountField()
          Gets the baseAmountField attribute.
 AccountingLineViewFieldDefinition getBaseAmountFieldDefinition()
          Gets the baseAmountFieldDefinition attribute.
 org.kuali.rice.kns.web.ui.Field getCurrentAmountField()
          Gets the currentAmountField attribute.
 AccountingLineViewFieldDefinition getCurrentAmountFieldDefinition()
          Gets the currentAmountFieldDefinition attribute.
 AccountingLineViewCurrentBaseAmountFieldDefinition getDefinition()
          Gets the definition attribute.
 String getName()
          Returns null; we don't want to participate in normal naming schemes
 int getRequestedRowCount()
          Always returns 2 - one line for the header, one line for the fields
protected  boolean isFieldUnviewable(org.kuali.rice.kns.web.ui.Field field, Set<String> unviewableBlocks)
          Determines if the given field is among the blocks which should not be viewable
 boolean isHidden()
          This field is never hidden
 boolean isReadOnly()
          Determines whether is element is entirely read only or not
 void joinRow(AccountingLineTableRow headerLabelRow, AccountingLineTableRow row)
          Adds the header cell to the first row, and the regular cell to the second row
 void joinTable(List<AccountingLineTableRow> rows)
          Adds the header cell to the first row and adds to the second row a cell that spans all remaining rows
 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
protected  void readOnlyizeField(org.kuali.rice.kns.web.ui.Field field, Set<String> readOnlyBlocks)
          Checks if the given field is named as a readOnlyBlock; if so, makes it read only
 void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
          Checks if either the current amount field or base amount field need to be set to read only
 void removeAllActionBlocks()
          Does nothing - we don't have action blocks, like, ever
 void removeUnviewableBlocks(Set<String> unviewableBlocks)
          Checks to see if either the current amount or the base amount are unviewable; if so, sets them to null
 void setBaseAmountField(org.kuali.rice.kns.web.ui.Field baseAmountField)
          Sets the baseAmountField attribute value.
 void setBaseAmountFieldDefinition(AccountingLineViewFieldDefinition baseAmountFieldDefinition)
          Sets the baseAmountFieldDefinition attribute value.
 void setCurrentAmountField(org.kuali.rice.kns.web.ui.Field currentAmountField)
          Sets the currentAmountField attribute value.
 void setCurrentAmountFieldDefinition(AccountingLineViewFieldDefinition currentAmountFieldDefinition)
          Sets the currentAmountFieldDefinition attribute value.
 void setDefinition(AccountingLineViewCurrentBaseAmountFieldDefinition 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
protected  void setEditableField(org.kuali.rice.kns.web.ui.Field field, Set<String> editableBlocks)
          Checks if the given field is named as an editableBlocks; if so, makes it editable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountingLineViewCurrentBaseAmount

public AccountingLineViewCurrentBaseAmount()
Method Detail

getName

public String getName()
Returns null; we don't want to participate in normal naming schemes

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

readOnlyizeReadOnlyBlocks

public void readOnlyizeReadOnlyBlocks(Set<String> readOnlyBlocks)
Checks if either the current amount field or base amount field need to be set to read only

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

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

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

readOnlyizeField

protected void readOnlyizeField(org.kuali.rice.kns.web.ui.Field field,
                                Set<String> readOnlyBlocks)
Checks if the given field is named as a readOnlyBlock; if so, makes it read only

Parameters:
field - the field to check
readOnlyBlocks - the names of all read only blocks

getRequestedRowCount

public int getRequestedRowCount()
Always returns 2 - one line for the header, one line for the fields

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

joinRow

public void joinRow(AccountingLineTableRow headerLabelRow,
                    AccountingLineTableRow row)
Adds the header cell to the first row, and the regular cell to the second 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)
Adds the header cell to the first row and adds to the second row a cell that spans all remaining rows

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

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)
Checks to see if either the current amount or the base amount are unviewable; if so, sets them to null

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

isFieldUnviewable

protected boolean isFieldUnviewable(org.kuali.rice.kns.web.ui.Field field,
                                    Set<String> unviewableBlocks)
Determines if the given field is among the blocks which should not be viewable

Parameters:
field - the field to check for unviewability
unviewableBlocks - the names of all unviewable blocks
Returns:
true if the field should not be viewable, false if we can see it

createCellForField

protected AccountingLineTableCell createCellForField(org.kuali.rice.kns.web.ui.Field field,
                                                     AccountingLineViewFieldDefinition definition)
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(org.kuali.rice.kns.web.ui.Field field)
Creates a header cell for the given field

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

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

createHeaderLabel

public HeaderLabel createHeaderLabel()
Not used; returns null.

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 field is never 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()

getBaseAmountField

public org.kuali.rice.kns.web.ui.Field getBaseAmountField()
Gets the baseAmountField attribute.

Returns:
Returns the baseAmountField.

setBaseAmountField

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

Parameters:
baseAmountField - The baseAmountField to set.

getCurrentAmountField

public org.kuali.rice.kns.web.ui.Field getCurrentAmountField()
Gets the currentAmountField attribute.

Returns:
Returns the currentAmountField.

setCurrentAmountField

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

Parameters:
currentAmountField - The currentAmountField to set.

getDefinition

public AccountingLineViewCurrentBaseAmountFieldDefinition getDefinition()
Gets the definition attribute.

Returns:
Returns the definition.

setDefinition

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

Parameters:
definition - The definition to set.

getBaseAmountFieldDefinition

public AccountingLineViewFieldDefinition getBaseAmountFieldDefinition()
Gets the baseAmountFieldDefinition attribute.

Returns:
Returns the baseAmountFieldDefinition.

setBaseAmountFieldDefinition

public void setBaseAmountFieldDefinition(AccountingLineViewFieldDefinition baseAmountFieldDefinition)
Sets the baseAmountFieldDefinition attribute value.

Parameters:
baseAmountFieldDefinition - The baseAmountFieldDefinition to set.

getCurrentAmountFieldDefinition

public AccountingLineViewFieldDefinition getCurrentAmountFieldDefinition()
Gets the currentAmountFieldDefinition attribute.

Returns:
Returns the currentAmountFieldDefinition.

setCurrentAmountFieldDefinition

public void setCurrentAmountFieldDefinition(AccountingLineViewFieldDefinition currentAmountFieldDefinition)
Sets the currentAmountFieldDefinition attribute value.

Parameters:
currentAmountFieldDefinition - The currentAmountFieldDefinition 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()

setEditableField

protected void setEditableField(org.kuali.rice.kns.web.ui.Field field,
                                Set<String> editableBlocks)
Checks if the given field is named as an editableBlocks; if so, makes it editable

Parameters:
field - the field to check
editableBlocks - the names of all editable blocks


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