From 39ebea4bb96521a877af1200a430881bc985c9da Mon Sep 17 00:00:00 2001 From: huangyanbin <873825232@qq.com> Date: Wed, 14 Mar 2018 15:06:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A1=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bin/david/form/core/TableConfig.java | 3 +- .../data/format/grid/SimpleGridFormat.java | 53 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 form/src/main/java/com/bin/david/form/data/format/grid/SimpleGridFormat.java 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); + } +}