public abstract class CellHtmlWriter
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
protected CellGUIAttr |
cellGUIAttr |
protected int |
cellHeight |
protected int |
cellWidth |
protected boolean |
heavy |
protected boolean |
isUseLightHeavyTD |
protected Repository |
repo |
protected int |
reportIndex |
protected ReportSettingsProvider |
reportSettings |
protected Tag |
resTag |
protected int |
tableID |
构造器和说明 |
---|
CellHtmlWriter(Repository repo,
int reportIndex,
ReportSettingsProvider reportSettings) |
限定符和类型 | 方法和说明 |
---|---|
protected void |
anyElse(HtmlWriteCellBox box) |
java.lang.Object |
calculateRawValue(CellElement ce)
计算单元格的值
|
java.lang.Object |
calculateRawValue(CellElement ce,
Calculator c)
计算单元格的值
|
Tag |
cell2Tag(HtmlWriteCellBox box,
WebReportCase reportCase,
java.awt.Rectangle span_intersection,
java.awt.Rectangle length_intersection,
Calculator c)
把单元格写成HTML的TD标签
|
protected void |
columnRowPosition(ColumnRow boxColumnRow) |
protected void |
dealBeforeDrawContent(CellElement box) |
void |
dealContent(CellElement ce,
Tag contentTag,
java.lang.Object rawValue)
处理单元格内容
|
void |
dealWithEmptyHeight(Tag trTag)
对于空行高的TR的处理
alex:在ie里面要把trTag的display变成none才能真正把一行不见
但其他浏览器也这么做的话,会导致合并格子的错位
现在全部都display为none,合并单元格另作调整
|
protected Tag |
dealWithHyperlinkGroup(CellElement ce,
Tag tag) |
protected java.lang.Object |
dealWithValue4Formula(BaseFormula formula) |
protected void |
displayNormalText(CellElement ce,
java.lang.Object displayValue,
Tag valueWrapper,
int valueWrapperHeight) |
protected void |
displayVerticalText(Style style,
java.lang.Object displayValue,
Tag valueWrapper,
int valueWrapperHeight) |
protected void |
drawContent(CellElement ce,
java.lang.Object rawValue,
Tag contentTag) |
protected abstract ColumnRow |
getColumnRowOfBox(HtmlWriteCellBox box) |
protected java.lang.Object |
getDisplayValue(CellElement cell,
java.lang.Object rawValue) |
int |
getHeightOfValueWrapper(CellElement box) |
protected Html |
getHtmlValue(CellElement ce,
java.lang.Object displayValue,
Tag valueWrapper,
int valueWrapperHeight) |
protected java.lang.Object |
getRawValue(CellElement cell) |
int |
getReportIndex()
返回reportIndex
|
int |
getTableID()
得到标签的ID
|
Tag |
getTitleTag(PolyBlockAttr blockAttr)
获取Title的标签,用于BICellWriter重写
|
protected abstract Widget |
getWidgetOfCell(CellElement cell) |
boolean |
isHeavy()
是否是重方式输出
|
boolean |
isQuickModel()
是否是杂项
|
boolean |
isUseLightHeavyTD() |
protected abstract boolean |
isVisible(HtmlWriteCellBox box) |
void |
makeSureCellGUIAttrNotEmpty(CellElement ce)
确保获取的CellGUI属性非空
|
boolean |
mayHideTailRows()
是否需要隐藏结尾行
|
protected boolean |
painterAsImage() |
protected void |
processFormula(CellElement ce,
BaseFormula formula) |
protected void |
processNoneWidget(WebReportCase reportCase,
CellElement cell,
java.lang.Object rawValue,
ColumnRow position,
Calculator c) |
protected void |
processOtherAttributes(HtmlWriteCellBox box,
Calculator c) |
protected void |
processUnwrappedRawValue(CellElement ce,
java.lang.Object ob) |
protected void |
processWidget(WebReportCase reportCase,
CellElement cell,
Widget wi,
java.lang.Object rawValue,
ColumnRow position,
Calculator c) |
static ColumnRow[] |
retriveCellElementPositions(CellElement ce)
获取格子位置
|
void |
setHeavy(boolean heavy)
设置是否重方式输出
|
void |
setQuickModel(boolean isQuickModel) |
void |
setShowWidgetAttr(WebReportCase reportCase)
设置是否直接显示控件(只有填报需要用到)
|
void |
setTableID(int tableID)
设置标签的ID
|
void |
setTablePosition(Tag table)
设置table的position & left属性
|
void |
setUseLightHeavyTD(boolean useLightHeavyTD) |
protected boolean |
shouldBeDisplayAsVerticalText(CellElement ce,
Style style,
java.lang.Object displayValue) |
protected boolean |
shouldDrawBackground(HtmlWriteCellBox box) |
protected abstract boolean |
shouldDrawContent(java.lang.Object value,
CellElement cell,
Tag contentTag) |
boolean |
showUseHeavy(CellElement ce)
是否需要重方式输出格子
|
boolean |
skipValueWrapper(CellElement ce)
是否不处理格子值
|
protected java.lang.Object |
unwrapLobs(CellElement ce,
java.lang.Object ob) |
protected java.lang.String |
widget2Config(Widget widget,
java.lang.Object value4Widget,
ColumnRow cr4Widget,
CellElement ce,
int reportIndex,
java.lang.String fType4Widget,
Calculator c)
把widget转成Tag.Config,String格式
|
protected JSONObject |
widget2ConfigWithJSONStyle(Widget widget,
java.lang.Object value4Widget,
ColumnRow cr4Widget,
CellElement ce,
int reportIndex,
java.lang.String fType4Widget,
Calculator c)
把widget转成Tag.Config,JSON格式
|
protected void |
writeLocationID(ColumnRow boxColumnRow) |
protected Repository repo
protected Tag resTag
protected int cellWidth
protected int cellHeight
protected CellGUIAttr cellGUIAttr
protected boolean heavy
protected int reportIndex
protected int tableID
protected ReportSettingsProvider reportSettings
protected boolean isUseLightHeavyTD
public CellHtmlWriter(Repository repo, int reportIndex, ReportSettingsProvider reportSettings)
public static ColumnRow[] retriveCellElementPositions(CellElement ce)
ce
- 格子public Tag cell2Tag(HtmlWriteCellBox box, WebReportCase reportCase, java.awt.Rectangle span_intersection, java.awt.Rectangle length_intersection, Calculator c) throws JSONException
box
- 单元格辅助类reportCase
- 单元格获取类span_intersection
- 跨度重叠length_intersection
- 长度重叠c
- 贯穿报表计算过程的计算器JSONException
public void setShowWidgetAttr(WebReportCase reportCase)
public void dealContent(CellElement ce, Tag contentTag, java.lang.Object rawValue)
ce
- 当前单元格contentTag
- 当前TagrawValue
- 单元格值public int getReportIndex()
public void makeSureCellGUIAttrNotEmpty(CellElement ce)
ce
- 当前单元格对象public java.lang.Object calculateRawValue(CellElement ce, Calculator c)
ce
- 格子c
- 算子public java.lang.Object calculateRawValue(CellElement ce)
ce
- 格子public boolean showUseHeavy(CellElement ce)
ce
- 格子protected void drawContent(CellElement ce, java.lang.Object rawValue, Tag contentTag)
protected boolean shouldBeDisplayAsVerticalText(CellElement ce, Style style, java.lang.Object displayValue)
protected void displayVerticalText(Style style, java.lang.Object displayValue, Tag valueWrapper, int valueWrapperHeight)
protected void displayNormalText(CellElement ce, java.lang.Object displayValue, Tag valueWrapper, int valueWrapperHeight)
protected Html getHtmlValue(CellElement ce, java.lang.Object displayValue, Tag valueWrapper, int valueWrapperHeight)
protected boolean painterAsImage()
protected void columnRowPosition(ColumnRow boxColumnRow)
protected void writeLocationID(ColumnRow boxColumnRow)
protected abstract ColumnRow getColumnRowOfBox(HtmlWriteCellBox box)
protected abstract boolean isVisible(HtmlWriteCellBox box)
protected boolean shouldDrawBackground(HtmlWriteCellBox box)
protected abstract boolean shouldDrawContent(java.lang.Object value, CellElement cell, Tag contentTag)
public int getHeightOfValueWrapper(CellElement box)
public boolean skipValueWrapper(CellElement ce)
ce
- 格子protected java.lang.Object getRawValue(CellElement cell)
protected void processFormula(CellElement ce, BaseFormula formula)
protected void processUnwrappedRawValue(CellElement ce, java.lang.Object ob)
protected java.lang.Object getDisplayValue(CellElement cell, java.lang.Object rawValue)
protected abstract Widget getWidgetOfCell(CellElement cell)
protected void processWidget(WebReportCase reportCase, CellElement cell, Widget wi, java.lang.Object rawValue, ColumnRow position, Calculator c)
protected void processNoneWidget(WebReportCase reportCase, CellElement cell, java.lang.Object rawValue, ColumnRow position, Calculator c)
protected void processOtherAttributes(HtmlWriteCellBox box, Calculator c)
protected void anyElse(HtmlWriteCellBox box)
protected void dealBeforeDrawContent(CellElement box)
protected Tag dealWithHyperlinkGroup(CellElement ce, Tag tag) throws JSONException
JSONException
public void dealWithEmptyHeight(Tag trTag)
trTag
- tr标签protected JSONObject widget2ConfigWithJSONStyle(Widget widget, java.lang.Object value4Widget, ColumnRow cr4Widget, CellElement ce, int reportIndex, java.lang.String fType4Widget, Calculator c) throws JSONException
widget
- 控件对象value4Widget
- 控件值cr4Widget
- 控件所在的行列ce
- 格子对象reportIndex
- 报表sheet下标fType4Widget
- 表示要取的资源为widgetc
- JSONException
protected java.lang.String widget2Config(Widget widget, java.lang.Object value4Widget, ColumnRow cr4Widget, CellElement ce, int reportIndex, java.lang.String fType4Widget, Calculator c) throws JSONException
JSONException
protected java.lang.Object dealWithValue4Formula(BaseFormula formula)
protected java.lang.Object unwrapLobs(CellElement ce, java.lang.Object ob)
public void setHeavy(boolean heavy)
heavy
- 是否重方式输出public boolean isHeavy()
public boolean isUseLightHeavyTD()
public void setUseLightHeavyTD(boolean useLightHeavyTD)
public void setTableID(int tableID)