|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.ControlPainter com.cc.framework.ui.painter.def.DefPainterBase com.cc.framework.ui.painter.def.DefRatingPainter
Painter for the rating control
Field Summary | |
private static int[] |
COLS
|
private static java.lang.String[] |
PROPERTIES
|
Fields inherited from class com.cc.framework.ui.painter.ControlPainter |
log |
Constructor Summary | |
DefRatingPainter(PainterContext painterContext,
RatingControl ctrl)
Constructor |
Method Summary | |
protected double |
calcRatio(RatingItem item,
long total)
Calculates the ratio of the single item compared to the controls total value |
protected org.apache.ecs.ConcreteElement |
doCreateColGroup()
Creates the HTML <COLGROUP> Element for the list |
protected org.apache.ecs.ConcreteElement |
doCreateElement()
Creates the HTML-Element. |
protected org.apache.ecs.ConcreteElement |
doCreateEmptyRating()
Creates the HTML code for the empty rating element |
protected org.apache.ecs.ConcreteElement |
doCreateHeader()
|
protected org.apache.ecs.ConcreteElement |
doCreateItems()
|
protected org.apache.ecs.ConcreteElement |
doCreateRating()
Creates the rating element |
protected void |
doPaintBarCell(org.apache.ecs.html.TD cell,
RatingItem item,
long total)
paint the ratio bar column of the control |
protected void |
doPaintCell(org.apache.ecs.html.TD cell,
RatingItem item,
int columnId,
long total)
|
protected void |
doPaintDetailCell(org.apache.ecs.html.TD cell,
RatingItem item)
|
protected void |
doPaintHeaderCell(org.apache.ecs.html.TD cell,
int columnId)
The painter will call this method to paint the column headers content |
protected void |
doPaintLabelCell(org.apache.ecs.html.TD cell,
RatingItem item)
paint the label column of the control |
protected void |
doPaintRatioCell(org.apache.ecs.html.TD cell,
RatingItem item,
long total)
paint the ratio column of the control |
protected void |
doPaintValueCell(org.apache.ecs.html.TD cell,
RatingItem item)
|
protected int |
getBarWidth()
|
protected java.lang.String |
getColumnHeader(int columnId)
|
protected java.lang.String |
getColumnTooltip(int columnId)
|
protected java.lang.String |
getColumnWidth(int columnId)
|
protected RatingControl |
getCtrl()
Retrieves the control for this painter |
int |
mapColumnPosition(int columnId)
Maps the column identifier on to the actual column index |
protected boolean |
showColumn(int columnId)
|
Methods inherited from class com.cc.framework.ui.painter.def.DefPainterBase |
createHelpElement, createHelpElement, doCreateHelpButton, doCreateHelpIcon, getElementClass |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int[] COLS
private static final java.lang.String[] PROPERTIES
Constructor Detail |
public DefRatingPainter(PainterContext painterContext, RatingControl ctrl)
painterContext
- The PainterContextctrl
- The Control to renderMethod Detail |
protected RatingControl getCtrl()
protected double calcRatio(RatingItem item, long total)
item
- the item to investigatetotal
- the total value of the control
public int mapColumnPosition(int columnId)
columnId
- column identifier
protected int getBarWidth()
protected boolean showColumn(int columnId)
protected java.lang.String getColumnWidth(int columnId)
protected java.lang.String getColumnHeader(int columnId)
protected java.lang.String getColumnTooltip(int columnId)
protected org.apache.ecs.ConcreteElement doCreateEmptyRating()
protected void doPaintHeaderCell(org.apache.ecs.html.TD cell, int columnId)
cell
- the header cell to rendercolumnId
- The column identifierprotected org.apache.ecs.ConcreteElement doCreateHeader()
protected org.apache.ecs.ConcreteElement doCreateColGroup()
protected void doPaintLabelCell(org.apache.ecs.html.TD cell, RatingItem item)
cell
- the cell elementitem
- the item to renderprotected void doPaintDetailCell(org.apache.ecs.html.TD cell, RatingItem item)
protected void doPaintValueCell(org.apache.ecs.html.TD cell, RatingItem item)
protected void doPaintBarCell(org.apache.ecs.html.TD cell, RatingItem item, long total)
cell
- the cell elementitem
- the item to rendertotal
- the total value of the controlprotected void doPaintRatioCell(org.apache.ecs.html.TD cell, RatingItem item, long total)
cell
- the cell elementitem
- the item to rendertotal
- the total value of the controlprotected void doPaintCell(org.apache.ecs.html.TD cell, RatingItem item, int columnId, long total)
protected org.apache.ecs.ConcreteElement doCreateItems()
protected org.apache.ecs.ConcreteElement doCreateRating()
protected org.apache.ecs.ConcreteElement doCreateElement()
ControlPainter
doCreateElement
in class ControlPainter
ControlPainter.doCreateElement()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |