org.openxava.web.layout
Class LayoutElement

java.lang.Object
  extended by org.openxava.web.layout.LayoutElement
All Implemented Interfaces:
java.io.Serializable

public class LayoutElement
extends java.lang.Object
implements java.io.Serializable

Author:
Juan Mendoza and Federico Alcantara
See Also:
Serialized Form

Constructor Summary
LayoutElement(View view, int groupLevel)
          Default constructor.
LayoutElement(View view, int groupLevel, LayoutElementType elementType)
          Preferred constructor.
 
Method Summary
 java.util.Collection<java.lang.String> getActionsNameForProperty()
           
 java.util.Collection<java.lang.String> getActionsNameForReference()
           
 LayoutElementType getElementType()
           
 int getGroupLevel()
           
 java.lang.String getLabel()
           
 int getLabelFormat()
           
 java.lang.Integer getMaxContainerColumnsCount()
          This value only makes sense if the layout element is of type LayoutElementType.GROUP_START or LayoutElementType.FRAME_START.
 java.lang.Integer getMaxFramesCount()
           
 java.lang.Integer getMaxRowColumnsCount()
           
 java.lang.Integer getMaxViewColumnsCount()
           
 MetaCollection getMetaCollection()
           
 MetaProperty getMetaProperty()
           
 MetaReference getMetaReference()
           
 java.lang.String getName()
           
 java.lang.String getPropertyKey()
           
 java.lang.String getPropertyPrefix()
           
 java.lang.String getReferenceForDescriptionsList()
           
 java.lang.Integer getRowCurrentColumnsCount()
          This value only makes sense if the layout element is of type LayoutElementType.ROW_START.
 java.lang.Integer getRowIndex()
           
 java.lang.String getSearchAction()
           
 View getView()
           
 boolean hasActions()
           
 boolean hasFrame()
           
 boolean hasSections()
           
 boolean isCreateNew()
           
 boolean isDisplayAsDescriptionsList()
           
 boolean isEditable()
           
 boolean isLastSearchKey()
           
 boolean isModify()
           
 boolean isRowClosed()
           
 boolean isSearch()
           
 boolean isSeparator()
           
 boolean isThrowPropertyChanged()
           
 void setActions(boolean hasActions)
           
 void setActionsNameForProperty(java.util.Collection<java.lang.String> actionsNameForProperty)
           
 void setActionsNameForReference(java.util.Collection<java.lang.String> actionsNameForReference)
           
 void setCreateNew(boolean createNew)
           
 void setDisplayAsDescriptionsList(boolean displayAsDescriptionsList)
           
 void setEditable(boolean editable)
           
 void setElementType(LayoutElementType elementType)
           
 void setFrame(boolean hasframe)
           
 void setGroupLevel(int groupLevel)
           
 void setLabel(java.lang.String label)
           
 void setLabelFormat(int labelFormat)
           
 void setLastSearchKey(boolean lastSearchKey)
           
 void setMaxContainerColumnsCount(java.lang.Integer maxContainerCellsCount)
           
 void setMaxFramesCount(java.lang.Integer maxFramesCount)
           
 void setMaxRowColumnsCount(java.lang.Integer maxRowCellsCount)
           
 void setMaxViewColumnsCount(java.lang.Integer maxViewColumnsCount)
           
 void setMetaCollection(MetaCollection metaCollection)
           
 void setMetaProperty(MetaProperty metaProperty)
           
 void setMetaReference(MetaReference metaReference)
           
 void setModify(boolean modify)
           
 void setName(java.lang.String name)
           
 void setPropertyKey(java.lang.String propertyKey)
           
 void setPropertyPrefix(java.lang.String propertyPrefix)
           
 void setReferenceForDescriptionsList(java.lang.String referenceForDescriptionsList)
           
 void setRowClosed(boolean rowClosed)
           
 void setRowCurrentColumnsCount(java.lang.Integer currentRowCellsCount)
           
 void setRowIndex(java.lang.Integer rowIndex)
           
 void setSearch(boolean search)
           
 void setSearchAction(java.lang.String searchAction)
           
 void setSections(boolean sections)
           
 void setSeparator(boolean separator)
           
 void setThrowPropertyChanged(boolean throwPropertyChanged)
           
 void setView(View view)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LayoutElement

public LayoutElement(View view,
                     int groupLevel)
Default constructor.

Parameters:
view - Originating view.
groupLevel - Group level.

LayoutElement

public LayoutElement(View view,
                     int groupLevel,
                     LayoutElementType elementType)
Preferred constructor.

Parameters:
view - Originating view.
groupLevel - Group level.
elementType - Type of element that is being created.
Method Detail

hasSections

public boolean hasSections()
Returns:
the hasSection

setSections

public void setSections(boolean sections)
Parameters:
hasSection - the hasSection to set

getMetaProperty

public MetaProperty getMetaProperty()
Returns:
the metaProperty

setMetaProperty

public void setMetaProperty(MetaProperty metaProperty)
Parameters:
metaProperty - the metaProperty to set

getMetaReference

public MetaReference getMetaReference()
Returns:
the metaReference

setMetaReference

public void setMetaReference(MetaReference metaReference)
Parameters:
metaReference - the metaReference to set

getMetaCollection

public MetaCollection getMetaCollection()
Returns:
the metaCollection

setMetaCollection

public void setMetaCollection(MetaCollection metaCollection)
Parameters:
metaCollection - the metaCollection to set

setActionsNameForReference

public void setActionsNameForReference(java.util.Collection<java.lang.String> actionsNameForReference)
Parameters:
actionsNameForReference - the actionsNameForReference to set

getActionsNameForReference

public java.util.Collection<java.lang.String> getActionsNameForReference()
Returns:
the actionsNameForReference

setActionsNameForProperty

public void setActionsNameForProperty(java.util.Collection<java.lang.String> actionsNameForProperty)
Parameters:
actionsNameForProperty - the actionsNameForProperty to set

getActionsNameForProperty

public java.util.Collection<java.lang.String> getActionsNameForProperty()
Returns:
the actionsNameForProperty

setActions

public void setActions(boolean hasActions)
Parameters:
actions - the actions to set

hasActions

public boolean hasActions()
Returns:
the actions

hasFrame

public boolean hasFrame()
Returns:
the frame

setFrame

public void setFrame(boolean hasframe)
Parameters:
frame - the frame to set

isSeparator

public boolean isSeparator()
Returns:
the separator

setSeparator

public void setSeparator(boolean separator)
Parameters:
separator - the separator to set

isEditable

public boolean isEditable()
Returns:
the editable

setEditable

public void setEditable(boolean editable)
Parameters:
editable - the editable to set

isSearch

public boolean isSearch()
Returns:
the search

setSearch

public void setSearch(boolean search)
Parameters:
search - the search to set

setLastSearchKey

public void setLastSearchKey(boolean lastSearchKey)
Parameters:
lastSearchKey - the lastSearchKey to set

isLastSearchKey

public boolean isLastSearchKey()
Returns:
the lastSearchKey

isCreateNew

public boolean isCreateNew()
Returns:
the createNew

setCreateNew

public void setCreateNew(boolean createNew)
Parameters:
createNew - the createNew to set

isModify

public boolean isModify()
Returns:
the modify

setModify

public void setModify(boolean modify)
Parameters:
modify - the modify to set

setThrowPropertyChanged

public void setThrowPropertyChanged(boolean throwPropertyChanged)
Parameters:
throwPropertyChanged - the throwPropertyChanged to set

isThrowPropertyChanged

public boolean isThrowPropertyChanged()
Returns:
the throwPropertyChanged

setDisplayAsDescriptionsList

public void setDisplayAsDescriptionsList(boolean displayAsDescriptionsList)
Parameters:
displayAsDescriptionsList - the displayAsDescriptionsList to set

isDisplayAsDescriptionsList

public boolean isDisplayAsDescriptionsList()
Returns:
the displayAsDescriptionsList

setLabel

public void setLabel(java.lang.String label)
Parameters:
label - the label to set

getLabel

public java.lang.String getLabel()
Returns:
the label

getSearchAction

public java.lang.String getSearchAction()
Returns:
the searchAction

setSearchAction

public void setSearchAction(java.lang.String searchAction)
Parameters:
searchAction - the searchAction to set

setLabelFormat

public void setLabelFormat(int labelFormat)
Parameters:
labelFormat - the labelFormat to set

getLabelFormat

public int getLabelFormat()
Returns:
the labelFormat

setPropertyPrefix

public void setPropertyPrefix(java.lang.String propertyPrefix)
Parameters:
propertyPrefix - the propertyPrefix to set

getPropertyPrefix

public java.lang.String getPropertyPrefix()
Returns:
the propertyPrefix

setPropertyKey

public void setPropertyKey(java.lang.String propertyKey)
Parameters:
propertyKey - the propertyKey to set

getPropertyKey

public java.lang.String getPropertyKey()
Returns:
the propertyKey

setReferenceForDescriptionsList

public void setReferenceForDescriptionsList(java.lang.String referenceForDescriptionsList)
Parameters:
referenceForDescriptionsList - the referenceForDescriptionsList to set

getReferenceForDescriptionsList

public java.lang.String getReferenceForDescriptionsList()
Returns:
the referenceForDescriptionsList

getName

public java.lang.String getName()
Returns:
the name

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

setGroupLevel

public void setGroupLevel(int groupLevel)
Parameters:
groupLevel - the groupLevel to set

getGroupLevel

public int getGroupLevel()
Returns:
the groupLevel

setView

public void setView(View view)
Parameters:
view - the view to set

getView

public View getView()
Returns:
the view

getElementType

public LayoutElementType getElementType()
Returns:
the elementType

setElementType

public void setElementType(LayoutElementType elementType)
Parameters:
elementType - the elementType to set

getMaxRowColumnsCount

public java.lang.Integer getMaxRowColumnsCount()
Returns:
The maximum number of columns displayed in the row.

setMaxRowColumnsCount

public void setMaxRowColumnsCount(java.lang.Integer maxRowCellsCount)
Parameters:
maxRowColumnsCount - the maxRowColumnsCount to set

getRowCurrentColumnsCount

public java.lang.Integer getRowCurrentColumnsCount()
This value only makes sense if the layout element is of type LayoutElementType.ROW_START.

Returns:
While rendering keeps the already processed columns.

setRowCurrentColumnsCount

public void setRowCurrentColumnsCount(java.lang.Integer currentRowCellsCount)
Parameters:
rowCurrentColumnsCount - the rowCurrentColumnsCount to set

getMaxContainerColumnsCount

public java.lang.Integer getMaxContainerColumnsCount()
This value only makes sense if the layout element is of type LayoutElementType.GROUP_START or LayoutElementType.FRAME_START.

Returns:
the maxContainerColumnsCount

setMaxContainerColumnsCount

public void setMaxContainerColumnsCount(java.lang.Integer maxContainerCellsCount)
Parameters:
maxContainerColumnsCount - the maxContainerColumnsCount to set

getMaxViewColumnsCount

public java.lang.Integer getMaxViewColumnsCount()
Returns:
the maxViewColumnsCount

setMaxViewColumnsCount

public void setMaxViewColumnsCount(java.lang.Integer maxViewColumnsCount)
Parameters:
maxViewColumnsCount - the maxViewColumnsCount to set

getMaxFramesCount

public java.lang.Integer getMaxFramesCount()
Returns:
the maxFramesCount

setMaxFramesCount

public void setMaxFramesCount(java.lang.Integer maxFramesCount)
Parameters:
maxFramesCount - the maxFramesCount to set

getRowIndex

public java.lang.Integer getRowIndex()
Returns:
the rowIndex

setRowIndex

public void setRowIndex(java.lang.Integer rowIndex)
Parameters:
rowIndex - the rowIndex to set

isRowClosed

public boolean isRowClosed()
Returns:
the rowClosed

setRowClosed

public void setRowClosed(boolean rowClosed)
Parameters:
rowClosed - the rowClosed to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object