|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.cc.framework.ui.painter.ControlPainter
com.cc.framework.ui.painter.def.DefPainterBase
com.cc.framework.ui.painter.def.DefListPainter
Default painter for Lists
| Field Summary | |
private CellPainterContext |
cellPainterContext
The Cell Painter Context |
private java.util.Map |
colpaintermap
The painters for each column of the control |
| Fields inherited from class com.cc.framework.ui.painter.ControlPainter |
log |
| Constructor Summary | |
DefListPainter(PainterContext painterContext,
ListControl ctrl)
Constructor |
|
| Method Summary | |
private void |
addColumn(ColumnDesignModel column,
org.apache.ecs.html.ColGroup colgroup)
Ads all terminal columns (columns without children) recursively to the column group |
protected void |
assignColumnPainter(ColumnDesignModel column,
ColumnPainter painter)
Assigns a column painter to a specific column |
protected int |
calcTableColumns(ColumnDesignModel[] columns)
This method calculates the number of visible columns |
protected int |
calcVisibleColumns(ColumnDesignModel column)
Calculates the number of visible columns. |
protected int |
calcVisibleColumns(ColumnDesignModel[] columns)
Calculates the number of visible columns in the given column set. |
protected int |
calcVisibleDepth(ColumnDesignModel column)
Calculates the visible depth (number of column child levels) of the given column. |
protected int |
calcVisibleDepth(ColumnDesignModel[] columns)
Calculates the visible depth (number of column child levels) of the given column set. |
protected CellPainterContext |
createCellPainterContext()
Creates the context class that will be passed to the cell painters. |
protected void |
createColumnPainters(ColumnDesignModel[] columns)
Creates a Table with a painter for each column |
protected void |
doAfterCreate()
This template method gets called after element creation |
protected void |
doBeforeCreate()
This template method gets called before element creation |
protected int |
doCalcualteTotalWidth(ColumnDesignModel[] columns)
Calculates the total width for all columns |
protected org.apache.ecs.ConcreteElement |
doCreateBody(ColumnDesignModel[] columns)
This method creates the body of the list control |
protected org.apache.ecs.ConcreteElement |
doCreateBodyDefault(ColumnDesignModel[] columns)
Creates the body with a fixed (not scrollable) region |
protected org.apache.ecs.ConcreteElement |
doCreateBodyScrollable(ColumnDesignModel[] columns)
Creates the body with a scrollable region |
protected void |
doCreateCells(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns,
LineIterator iter,
DeferredEnvironment env)
Creates the Data for each cell of a row |
protected org.apache.ecs.ConcreteElement |
doCreateColGroup(ColumnDesignModel[] columns)
Creates the HTML <COLGROUP> Element for the list |
protected ColumnPainter |
doCreateColumnPainter(ColumnDesignModel column)
This method creates a concrete column painter for a given column object. |
protected org.apache.ecs.ConcreteElement |
doCreateElement()
Creates the HTML Code for the following Elements: Title Body Footer (optional) |
protected void |
doCreateEmptyListCells(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns)
Creates the cells for an "empty list" row |
protected org.apache.ecs.ConcreteElement |
doCreateExportButton(boolean empty)
Creates the Export-Button |
protected org.apache.ecs.ConcreteElement |
doCreateFirstButton(boolean enabled)
Creates the First-Button |
protected org.apache.ecs.ConcreteElement |
doCreateFooter()
Creates an additional footer. |
protected org.apache.ecs.ConcreteElement |
doCreateFrames(AlignmentType alignmentFilter)
Creates a frame container with all frames that match the given filter |
protected org.apache.ecs.ConcreteElement |
doCreateHeader()
Creates an additional header. |
protected org.apache.ecs.ConcreteElement |
doCreateHeader(ColumnDesignModel[] columns)
Creates the Row(s) with the column headers |
protected void |
doCreateHeaderCells(org.apache.ecs.html.TR[] headerrows,
int level,
ColumnDesignModel[] columns,
boolean showLevel)
Creates the cells for the given header column |
protected org.apache.ecs.ConcreteElement |
doCreateLastButton(boolean enabled)
Creates the Last-Button |
protected java.util.Collection |
doCreateNavigationButtons()
Creates the navigation buttons of the list |
protected org.apache.ecs.ConcreteElement |
doCreateNewButton()
Creates the New-Button |
protected org.apache.ecs.ConcreteElement |
doCreateNextButton(boolean enabled,
int page)
Creates the next page Button |
protected org.apache.ecs.ConcreteElement |
doCreatePageButton(boolean enabled,
int page)
Creates the page Button |
protected org.apache.ecs.ConcreteElement |
doCreatePageButtonSeperator()
Creates the separator between page buttons |
protected org.apache.ecs.ConcreteElement |
doCreatePrevButton(boolean enabled,
int page)
Creates the previous page Button |
protected org.apache.ecs.ConcreteElement |
doCreatePrintButton(boolean empty)
Creates the Print-Button |
protected org.apache.ecs.ConcreteElement |
doCreateRefreshButton()
Creates the Refresh-Button |
protected org.apache.ecs.ConcreteElement |
doCreateRows(ColumnDesignModel[] columns,
LineIterator iter)
Creates the rows of the List for the current page |
protected JavaScript |
doCreateScript()
Creates the Java Script Code which is needed by the control |
protected java.util.Collection |
doCreateTitleButtons()
Creates the buttons in the header of the list |
protected void |
doPaintCell(org.apache.ecs.html.TD cell,
ColumnDesignModel column,
LineIterator iter)
The painter will call this method to paint the cells content |
protected void |
doPaintHeaderCell(org.apache.ecs.html.TD cell,
ColumnDesignModel column)
The painter will call this method to paint the column headers content |
protected void |
doPaintRow(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns,
LineIterator iter,
DeferredEnvironment env)
Creates one row of the List |
protected int |
getCellPadding()
Returns the cell padding for the list cells |
protected CellPainterContext |
getCellPainterContext()
|
protected int |
getCellSpacing()
Returns the cell spacing for the list cells |
protected ColumnPainter |
getColumnPainter(ColumnDesignModel column)
Retrieves the column painter for the given column. |
protected ListControl |
getCtrl()
Retrieves the control for this painter |
protected int |
getCurrentPage()
Returns the number of the current page which is displayed. |
protected java.lang.String |
getDetailText()
Returns the detail text for the header The first element in the array is the resource key |
java.lang.String |
getElementClass(int type)
The method returns the HTML style class required for a list or treelist control. |
protected FrameTitle |
getFrameTitle()
Creates the Title for the Frame |
protected int |
getMinRowCount()
Returns the minimal number of rows on the page. |
protected int |
getPageButtons()
Returns the number of page buttons to show |
protected java.lang.String |
getRowClass(int relRowIndex,
boolean selected)
Returns the HTML-Class for a Row |
protected int |
getRowsPerPage()
Returns the number of rows on the page. |
protected int |
getTotalPages()
Returns the total number of pages. |
protected boolean |
hasRows()
Checks if the list control has any rows |
protected boolean |
isFirstPage()
Returns true for the FirstPage |
protected boolean |
isLastPage()
Returns true for the LastPage |
protected boolean |
isScrollable()
|
static void |
registerColumnPainter(java.lang.Class columnClass,
ColumnPainter painter)
Registers a column painter for the given column class |
protected boolean |
showButton(ControlButton button)
This Method is called by the Painter before rendering a Button. |
protected boolean |
showFrame()
Checks if the frame should be painted |
| Methods inherited from class com.cc.framework.ui.painter.def.DefPainterBase |
createHelpElement, createHelpElement, doCreateHelpButton, doCreateHelpIcon |
| Methods inherited from class com.cc.framework.ui.painter.ControlPainter |
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAttachDecorations, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private transient java.util.Map colpaintermap
ColumnPainterprivate CellPainterContext cellPainterContext
| Constructor Detail |
public DefListPainter(PainterContext painterContext,
ListControl ctrl)
painterContext - The PainterContextctrl - The Control to render| Method Detail |
protected CellPainterContext createCellPainterContext()
protected ListControl getCtrl()
protected int getTotalPages()
protected boolean hasRows()
protected int getMinRowCount()
protected int getRowsPerPage()
protected int getCurrentPage()
protected boolean isScrollable()
true when the control should render a
scrolling bodyprotected boolean showButton(ControlButton button)
button - ControlButton
protected boolean showFrame()
true if the frame should be paintedprotected int getPageButtons()
protected boolean isFirstPage()
protected boolean isLastPage()
protected int getCellSpacing()
protected int getCellPadding()
protected int calcVisibleDepth(ColumnDesignModel column)
column - The root column of a column hierarchy
protected int calcVisibleDepth(ColumnDesignModel[] columns)
columns - The column set (column forest) to calculate
protected int calcVisibleColumns(ColumnDesignModel column)
column - the root column of a column hierarchy
protected int calcVisibleColumns(ColumnDesignModel[] columns)
columns - column set
protected java.lang.String getRowClass(int relRowIndex,
boolean selected)
relRowIndex - relative Row Indexselected - true when the row is selected
protected CellPainterContext getCellPainterContext()
protected org.apache.ecs.ConcreteElement doCreateNewButton()
protected org.apache.ecs.ConcreteElement doCreateExportButton(boolean empty)
empty - Indicates an empty list
protected org.apache.ecs.ConcreteElement doCreatePrintButton(boolean empty)
empty - Indicates an empty list
protected org.apache.ecs.ConcreteElement doCreateRefreshButton()
protected org.apache.ecs.ConcreteElement doCreateFirstButton(boolean enabled)
enabled - true if the Button is enabled
protected org.apache.ecs.ConcreteElement doCreateLastButton(boolean enabled)
enabled - true if the Button is enabled
protected org.apache.ecs.ConcreteElement doCreatePrevButton(boolean enabled,
int page)
enabled - true if the Button is enabledpage - page number
protected org.apache.ecs.ConcreteElement doCreateNextButton(boolean enabled,
int page)
enabled - true if the Button is enabledpage - page number
protected org.apache.ecs.ConcreteElement doCreatePageButton(boolean enabled,
int page)
enabled - true if the Button is enabledpage - page number
protected java.util.Collection doCreateNavigationButtons()
protected org.apache.ecs.ConcreteElement doCreatePageButtonSeperator()
protected java.util.Collection doCreateTitleButtons()
protected int calcTableColumns(ColumnDesignModel[] columns)
columns - The column painters
private void addColumn(ColumnDesignModel column,
org.apache.ecs.html.ColGroup colgroup)
column - the column to addcolgroup - the column group elementprotected org.apache.ecs.ConcreteElement doCreateColGroup(ColumnDesignModel[] columns)
columns - The column painters
protected void doCreateHeaderCells(org.apache.ecs.html.TR[] headerrows,
int level,
ColumnDesignModel[] columns,
boolean showLevel)
headerrows - HTML row elements that make up the headerlevel - the nesting level of the columncolumns - the column list for the current levelshowLevel - a value of false indicates that no header
elements should be generated for the current header level.
When a header cell spans multiple rows we must create only one
cell element on the first row!protected org.apache.ecs.ConcreteElement doCreateHeader(ColumnDesignModel[] columns)
columns - The columns (including column groups!)
protected void doPaintHeaderCell(org.apache.ecs.html.TD cell,
ColumnDesignModel column)
cell - the header cell to rendercolumn - The column
protected void doPaintCell(org.apache.ecs.html.TD cell,
ColumnDesignModel column,
LineIterator iter)
cell - the cell to rendercolumn - The columniter - LineIterator with access to the row bean or null
to create an empty row
protected void doCreateCells(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns,
LineIterator iter,
DeferredEnvironment env)
row - The HTML-Row elementcolumns - The columns (including column groups!)iter - LineIterator with access to the row bean or null
to create an empty rowenv - The Environment that should be used to evaluate expressions
protected void doPaintRow(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns,
LineIterator iter,
DeferredEnvironment env)
row - the Row elementcolumns - The column paintersiter - LineIteratorenv - The Environment that should be used to evaluate expressions
protected void doCreateEmptyListCells(org.apache.ecs.html.TR row,
ColumnDesignModel[] columns)
row - The HTML-Row elementcolumns - The column painters
protected org.apache.ecs.ConcreteElement doCreateRows(ColumnDesignModel[] columns,
LineIterator iter)
columns - The column paintersiter - a line iterator for the page to display
protected org.apache.ecs.ConcreteElement doCreateBody(ColumnDesignModel[] columns)
columns - The column painters
protected org.apache.ecs.ConcreteElement doCreateBodyDefault(ColumnDesignModel[] columns)
columns - ColumnDesignModel
protected org.apache.ecs.ConcreteElement doCreateBodyScrollable(ColumnDesignModel[] columns)
columns - ColumnDesignModel
protected int doCalcualteTotalWidth(ColumnDesignModel[] columns)
columns -
protected org.apache.ecs.ConcreteElement doCreateHeader()
protected org.apache.ecs.ConcreteElement doCreateFooter()
protected org.apache.ecs.ConcreteElement doCreateFrames(AlignmentType alignmentFilter)
alignmentFilter - the filter
null
public static void registerColumnPainter(java.lang.Class columnClass,
ColumnPainter painter)
columnClass - the columns classpainter - Column painter instanceprotected ColumnPainter doCreateColumnPainter(ColumnDesignModel column)
column - the concrete column object
protected void createColumnPainters(ColumnDesignModel[] columns)
columns - The list of columnsprotected ColumnPainter getColumnPainter(ColumnDesignModel column)
column - Column
null
protected void assignColumnPainter(ColumnDesignModel column,
ColumnPainter painter)
column - Columnpainter - The CollumnPainter for this columnprotected FrameTitle getFrameTitle()
nullprotected void doBeforeCreate()
ControlPainter
doBeforeCreate in class ControlPainterControlPainter.doBeforeCreate()protected org.apache.ecs.ConcreteElement doCreateElement()
doCreateElement in class ControlPainterprotected void doAfterCreate()
ControlPainter
doAfterCreate in class ControlPainterControlPainter.doAfterCreate()protected java.lang.String getDetailText()
public java.lang.String getElementClass(int type)
ControlPainter
getElementClass in class DefPainterBaseControlPainter.getElementClass(int)protected JavaScript doCreateScript()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||