diff --git a/form/src/main/java/com/bin/david/form/core/TableConfig.java b/form/src/main/java/com/bin/david/form/core/TableConfig.java index 5f43324..6066d2a 100644 --- a/form/src/main/java/com/bin/david/form/core/TableConfig.java +++ b/form/src/main/java/com/bin/david/form/core/TableConfig.java @@ -10,6 +10,7 @@ import com.bin.david.form.data.format.grid.BaseGridFormat; import com.bin.david.form.data.format.grid.IGridFormat; import com.bin.david.form.data.format.draw.LeftTopDrawFormat; +import com.bin.david.form.data.format.grid.SimpleGridFormat; import com.bin.david.form.data.style.FontStyle; import com.bin.david.form.data.style.LineStyle; @@ -121,7 +122,7 @@ public class TableConfig { /** * 网格格式化 */ - private IGridFormat tableGridFormat = new BaseGridFormat(); + private IGridFormat tableGridFormat = new SimpleGridFormat(); diff --git a/form/src/main/java/com/bin/david/form/data/format/grid/SimpleGridFormat.java b/form/src/main/java/com/bin/david/form/data/format/grid/SimpleGridFormat.java new file mode 100644 index 0000000..2e3b72a --- /dev/null +++ b/form/src/main/java/com/bin/david/form/data/format/grid/SimpleGridFormat.java @@ -0,0 +1,53 @@ +package com.bin.david.form.data.format.grid; + + +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Rect; + +import com.bin.david.form.data.CellInfo; +import com.bin.david.form.data.column.Column; + +/** + * Created by huang on 2018/3/9. + * 简单的绘制边界 + */ + +public class SimpleGridFormat implements IGridFormat { + + + @Override + public void drawContentGrid(Canvas canvas, int col, int row, Rect rect, CellInfo cellInfo, Paint paint) { + canvas.drawRect(rect,paint); + } + + @Override + public void drawXSequenceGrid(Canvas canvas, int col, Rect rect, Paint paint) { + canvas.drawRect(rect,paint); + } + + @Override + public void drawYSequenceGrid(Canvas canvas, int row, Rect rect, Paint paint) { + canvas.drawRect(rect,paint); + } + + @Override + public void drawCountGrid(Canvas canvas, int col, Rect rect, Column column, Paint paint) { + canvas.drawRect(rect,paint); + } + + @Override + public void drawColumnTitleGrid(Canvas canvas, Rect rect, Column column, int col, Paint paint) { + canvas.drawRect(rect,paint); + } + + @Override + public void drawTableBorderGrid(Canvas canvas, int left, int top, int right, int bottom, Paint paint) { + canvas.drawRect(left,top,right,bottom,paint); + } + + @Override + public void drawLeftAndTopGrid(Canvas canvas, Rect rect, Paint paint) { + canvas.drawRect(rect,paint); + } +}