LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view
Class LyRows

java.lang.Object
  extended by leon.view.LyComponent
      extended by leon.view.LyRowsBase
          extended by leon.view.LyRows

public class LyRows
extends LyRowsBase

This class represents a Rows component.

See Also:
LyComponent

Nested Class Summary
 
Nested classes/interfaces inherited from class leon.view.LyComponent
LyComponent.EventType
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.LyComponent
_nbComponents, INIT_RESOURCE_ID, INTERNAL_ID_SEP, REWRITING_MODE, SEP_ID
 
Constructor Summary
LyRows()
          Constructor with all required attributes.
 
Method Summary
 int getDisplayedRowCount()
          Get sub-component displayed Row count.
 void getDisplayedSubRows(java.util.Vector<LyRow> list)
          Retrieve all the displayed sub-rows of the rows component and add them to the given list, browsing all the tree of sub-rows.
 java.lang.Object getLock()
          Get a lock to prevent concurrent access Returns the one provided by the internal view implementation, otherwise returns this.
 LyTable getParentTable()
          Gets parent table.
 int getPositionInTable()
          Returns the position of the rows component in the parent table component.
 LyRow getRow(java.lang.String id)
          Retrieves a row by its id.
 int getRowIndex(LyRow row)
          Accessor to the index of a row.
 int getSubRowCount(boolean displayed)
          Return the number of sub-rows, browsing all the tree of sub-rows.
 LySetTableInterface getTableInterface()
          Gets parent table.
 boolean hasHiddenRow()
          Indicates if the rows component has at least one hidden row.
 void insertRow(LyRow row, int pos)
          Inserts a sub-component row at given position.
 boolean isHierarchical()
          Indicates if the rows component is hierarchical (if at least one of its children has children).
 void removeRow(int index)
          Remove row at the given index.
 void removeRow(LyRow row)
          Removes a sub-component row.
 void swapRows(int index1, int index2)
          Swap rows at the given indexes.
 
Methods inherited from class leon.view.LyRowsBase
addRow, cloneComponent, getRow, getRowCount, writeXml
 
Methods inherited from class leon.view.LyComponent
addComponent, addData, addEventFunction, clearChildrenBounds, free, freeze, getBounds, getChild, getChildCount, getChildFromCache, getChildrenBounds, getComponent, getComponent, getComponent, getComponent, getComponent, getComponentAt, getComponentAt, getComponentByInternalId, getComponentByLabel, getComponents, getComponentWithModel, getData, getDatas, getEnvironment, getEventFunctions, getId, getIdCode, getInternalId, getInternalView, getInternalView, getModel, getParent, getParentArea, getParentForm, getParentFormFieldId, getParentSplitter, getParentSplitter, getParentTab, getParentTab, getParentTabs, getParentTabs, getParentView, getRootController, getSetVisibleParent, getTag, getViewManager, isFreed, isFreeing, registerChildrenBounds, removeComponent, reset, resetChildrenCache, resetEventFunctions, setDatas, setInternalView, setVisible, useEventDefaultFunction, writeXml
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyRows

public LyRows()
Constructor with all required attributes.

Method Detail

getTableInterface

public LySetTableInterface getTableInterface()
Gets parent table.

Returns:
parent table (internal view) if instance of LySetTableInterface, or null.

getPositionInTable

public int getPositionInTable()
Returns the position of the rows component in the parent table component.

Returns:
0 if parent table is not hierarchical (only one rows component) or the rows component position in the table otherwise.

getSubRowCount

public int getSubRowCount(boolean displayed)
Return the number of sub-rows, browsing all the tree of sub-rows.

Parameters:
displayed - indicates if only displayed rows must be considered
Returns:
the number of sub-rows

getDisplayedRowCount

public int getDisplayedRowCount()
Get sub-component displayed Row count.

Returns:
sub-component displayed Row count.

getDisplayedSubRows

public void getDisplayedSubRows(java.util.Vector<LyRow> list)
Retrieve all the displayed sub-rows of the rows component and add them to the given list, browsing all the tree of sub-rows.

Parameters:
list - the list containing the sub-rows

isHierarchical

public boolean isHierarchical()
Indicates if the rows component is hierarchical (if at least one of its children has children).

Returns:
true if the rows component is hierarchical, false otherwise.

hasHiddenRow

public boolean hasHiddenRow()
Indicates if the rows component has at least one hidden row.

Returns:
true if the rows component has at least one hidden row, false otherwise.

getParentTable

public LyTable getParentTable()
Gets parent table.

Returns:
parent table.

insertRow

public void insertRow(LyRow row,
                      int pos)
Inserts a sub-component row at given position.

Overrides:
insertRow in class LyRowsBase
Parameters:
row - row that must be added.
pos - index where row must be added.

removeRow

public void removeRow(LyRow row)
Removes a sub-component row.

Parameters:
row - row that must be removed.

removeRow

public void removeRow(int index)
Remove row at the given index.

Parameters:
index - index of the row that must be removed.

swapRows

public void swapRows(int index1,
                     int index2)
Swap rows at the given indexes.

Parameters:
index1 - index of first row to swap.
index2 - index of second row to swap.

getRowIndex

public int getRowIndex(LyRow row)
Accessor to the index of a row.

Parameters:
row - row we are looking for the index
Returns:
the index of the row or -1 if it could not be found

getRow

public LyRow getRow(java.lang.String id)
Retrieves a row by its id.

Parameters:
id - Id of the row.
Returns:
The corresponding row if found, null otherwise.

getLock

public java.lang.Object getLock()
Get a lock to prevent concurrent access Returns the one provided by the internal view implementation, otherwise returns this.

Overrides:
getLock in class LyComponent
Returns:
a valid lock for synchronized(), may not return null

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com