|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.web.LyWebObject
leon.view.web.struts.LyStrutsFieldItem
leon.view.web.struts.LyStrutsPanel
leon.view.web.struts.LyStrutsTable
public class LyStrutsTable
This class implements the Table object (as described in the dtd) for web viewer.
TABLE: Table
A table allows displaying a set of rows and columns containing a set of cells. It can contain a
header providing information about the content of the cells of the list. It is possible to define
its selection modes (simple, extended, multiple or none) and finally to indicate if horizontal
and/or vertical separation lines should be drawn.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static boolean |
DISABLE_TEXT_SELECTION
Indicates whether text selection must be disabled. |
static java.lang.String |
EXTEND_SORT
The extend_sort String value. |
static java.lang.String |
EXTEND_SORT_IMAGE
The extend_sort_image String value. |
static java.lang.String |
SELECT_ALL
The select_all String value. |
Fields inherited from class leon.view.web.LyWebObject |
---|
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID |
Constructor Summary | |
---|---|
LyStrutsTable(LyTable table)
Constructor. |
Method Summary | |
---|---|
boolean |
addLastCell(LyWebPageWriter pw)
Indicates if an empty cell must be added at the end of each row. |
void |
addRow(LyRow row)
Adds the given row at the end of the current table. |
void |
addRow(LyRow row,
int idx)
Adds the given row at the given position in the current table. |
boolean |
allowExtendedSort()
Computes if we can have an extended sort (more than one header with sort enable). |
boolean |
drawImages()
Indicates if images must be drawn. |
void |
freezeColumn(int idx)
Freezes the column at the given index in the view. |
boolean |
generateExternalBorder(LyWebPageWriter pw)
Indicates whether an external border must be generated for this table. |
java.lang.String |
getAdditionalStyle()
Computes an additional style for the table. |
java.lang.String |
getDefaultAction(LyWebPageWriter pw)
(non-Javadoc). |
java.lang.String |
getExpandRowAction(LyWebPageWriter pw)
Gets the expand row action and writes associated javascript function for this table. |
java.lang.String |
getHRefAction(LyWebPageWriter pw)
Gets the href action and writes associated javascript function for this table. |
static java.lang.String |
getHtmlHAligment(LyHeader.Align alignCode)
Gets the HTML horizontal alignment string corresponding to the LyHeader alignment. |
LyRow |
getRow(int i)
Gets the row at the specified position. |
int |
getScrollHeightForSplitter(LyWebPageWriter pw)
Indicates whether this component needs scrollbars when inserted in a splitter. |
java.lang.String |
getSelectionAction(LyWebPageWriter pw)
Gets the selection action javascript function name for this table. |
java.lang.String |
getSortAction(LyWebPageWriter pw)
Gets the sort action and writes associated javascript function for this table. |
java.lang.String |
getSortActionFunction()
Gets the sort action and writes associated javascript function for this table. |
java.lang.String |
getStatusAction(LyWebPageWriter pw)
(non-Javadoc). |
java.lang.String |
getTableRootUrl()
This method is overriden to redirect the SORT, HREF and EXPAND actions to the Leonardi struts 'graphical event handler'. |
java.lang.String |
getUpdateRowsColorsScript()
Returns the Javascript code to be used to update table colors. |
void |
hideRow(int idx,
boolean hide)
Hides or show the row at the given index. |
void |
initialize()
Initialization method. |
void |
refresh()
Performs a refresh of the table. |
void |
removeRow(int idx)
Removes the row at the given index from the current table. |
void |
removeRow(LyRow row)
Removes the given row from the current table. |
void |
selectAll(boolean select,
boolean updateView)
Selects or unselects all objects of the table. |
void |
selectRow(int idx,
boolean select)
Selects or unselects the row at the given index of the table. |
void |
selectRow(LyRow row,
boolean select)
Selects or unselects the specified row in the table. |
void |
setEnabled(boolean status)
Updates attribute enabled to the given value. |
void |
setFooters(LyFooters footers)
Sets sub-component footers. |
void |
setHeaders(LyHeaders headers)
Sets sub-component headers. |
void |
setIdle(boolean status)
Sets or unset the idle mode on the component/node. |
void |
setNRows(int nRows)
Updates attribute nRows to the given value. |
void |
setVisible(boolean status)
Sets the visibility status of this component. |
void |
showRow(int idx)
Scrolls to make visible to the user the row at the given index . |
boolean |
sortOnStatus()
Indicates there is header for sorting status. |
void |
swapRows(int idx1,
int idx2)
Swaps the rows at the specified indexes. |
void |
updateRow(LyRow row)
Updates the given row. |
void |
writeHtml(LyWebPageWriter pw)
Write HTML description corresponding to this component. |
Methods inherited from class leon.view.web.struts.LyStrutsPanel |
---|
getPopupMenuView, setPopupMenu |
Methods inherited from class leon.view.web.struts.LyStrutsFieldItem |
---|
canDisabled, getCaption, getController, getFieldItem, getForm, getFormField, getFormName, getHtmlForm, getId, isEditable, isNetscape, isOptional, needCheck, setLabel |
Methods inherited from class leon.view.web.LyWebObject |
---|
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getUrl, getWebViewManager, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, getBounds, getChildrenBounds, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface leon.view.graphic.LyGraphicalComponent |
---|
free, getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String EXTEND_SORT
public static final java.lang.String EXTEND_SORT_IMAGE
public static final java.lang.String SELECT_ALL
public static boolean DISABLE_TEXT_SELECTION
Constructor Detail |
---|
public LyStrutsTable(LyTable table)
table
- the table component.Method Detail |
---|
public static java.lang.String getHtmlHAligment(LyHeader.Align alignCode)
LyHeader
alignment.
alignCode
- the LyHeader halign code. Possible values are LyHeader#Align.CENTER
, LyHeader#Align.LEFT
and LyHeader#Align.RIGHT
.
public void selectAll(boolean select, boolean updateView)
LySetTableInterface
selectAll
in interface LySetTableInterface
select
- true if all objects have to be selected, false otherwiseupdateView
- indicates if the view must be updated or not.public void selectRow(int idx, boolean select)
LySetTableInterface
selectRow
in interface LySetTableInterface
idx
- index of the row to select or unselectselect
- true if the row has to be selected, false otherwisepublic java.lang.String getDefaultAction(LyWebPageWriter pw)
getDefaultAction(leon.view.web.LyWebPageWriter)
public java.lang.String getHRefAction(LyWebPageWriter pw)
pw
- the page writer
public java.lang.String getStatusAction(LyWebPageWriter pw)
getStatusAction(leon.view.web.LyWebPageWriter)
public java.lang.String getSortAction(LyWebPageWriter pw)
pw
- the page writer
public java.lang.String getTableRootUrl()
public void setHeaders(LyHeaders headers)
LyGraphicalTable
setHeaders
in interface LyGraphicalTable
headers
- New value of headersleon.view.setinterface.LySetTableInterface#setHeaders(LyHeaders)
public void setFooters(LyFooters footers)
LyGraphicalTable
setFooters
in interface LyGraphicalTable
footers
- New value of footersleon.view.setinterface.LySetTableInterface#setFooters(LyFooters)
public void addRow(LyRow row)
LySetTableInterface
addRow
in interface LySetTableInterface
row
- the row to addpublic void addRow(LyRow row, int idx)
LySetTableInterface
addRow
in interface LySetTableInterface
row
- the row to addidx
- the position where the row has to be addedpublic void removeRow(LyRow row)
LySetTableInterface
removeRow
in interface LySetTableInterface
row
- the row to removepublic void removeRow(int idx)
LySetTableInterface
removeRow
in interface LySetTableInterface
idx
- the index of the row to removepublic void refresh()
refresh
in class LyWebObject
public java.lang.String getUpdateRowsColorsScript()
public int getScrollHeightForSplitter(LyWebPageWriter pw)
LyWebObject
getScrollHeightForSplitter
in class LyWebObject
pw
- current page writer
public void initialize()
null
.
public boolean addLastCell(LyWebPageWriter pw)
public void writeHtml(LyWebPageWriter pw)
LyWebComponent
writeHtml
in interface LyWebComponent
pw
- the page writerpublic final boolean generateExternalBorder(LyWebPageWriter pw)
public void setVisible(boolean status)
LySetVisibleInterface
setVisible
in interface LySetVisibleInterface
status
- new visibility status, if true the component will be shown, if false it will be
hidenpublic boolean drawImages()
public boolean sortOnStatus()
public void swapRows(int idx1, int idx2)
LySetTableInterface
swapRows
in interface LySetTableInterface
idx1
- the position of the first row to swapidx2
- the position of the second row to swappublic void selectRow(LyRow row, boolean select)
LySetTableInterface
selectRow
in interface LySetTableInterface
row
- the row to select or unselectselect
- true if the row has to be selected, false otherwisepublic void hideRow(int idx, boolean hide)
LySetTableInterface
hideRow
in interface LySetTableInterface
idx
- the index of the row to show or hidehide
- indicates if the row has to be shown or hidedpublic void updateRow(LyRow row)
LySetTableInterface
updateRow
in interface LySetTableInterface
row
- the row to updatepublic void freezeColumn(int idx)
LySetTableInterface
freezeColumn
in interface LySetTableInterface
idx
- the index of the column to freezepublic boolean allowExtendedSort()
public java.lang.String getSortActionFunction()
pw
- the page writer
public java.lang.String getExpandRowAction(LyWebPageWriter pw)
pw
- the page writer
public java.lang.String getSelectionAction(LyWebPageWriter pw)
pw
- the page writer
public void showRow(int idx)
LySetTableInterface
showRow
in interface LySetTableInterface
idx
- the index of the row to showpublic void setIdle(boolean status)
LySetIdleInterface
setIdle
in interface LySetIdleInterface
status
- new idle status (LySetIdleInterface interface)public void setEnabled(boolean status)
LyGraphicalTable
setEnabled
in interface LyGraphicalTable
setEnabled
in interface LySetEnabledInterface
status
- Boolean indicating if attribute enabled is set or unset.LySetEnabledInterface.setEnabled(boolean)
public void setNRows(int nRows)
LyGraphicalTable
setNRows
in interface LyGraphicalTable
nRows
- New value of nRows.LyGraphicalTable.setNRows(int)
public LyRow getRow(int i)
i
- the row position
public java.lang.String getAdditionalStyle()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |