Skip to content

Commit

Permalink
增加行点击事件
Browse files Browse the repository at this point in the history
  • Loading branch information
huangyanbin committed Mar 14, 2018
1 parent 452ae89 commit 39ebea4
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion form/src/main/java/com/bin/david/form/core/TableConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -121,7 +122,7 @@ public class TableConfig {
/**
* 网格格式化
*/
private IGridFormat tableGridFormat = new BaseGridFormat();
private IGridFormat tableGridFormat = new SimpleGridFormat();



Expand Down
Original file line number Diff line number Diff line change
@@ -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);
}
}

0 comments on commit 39ebea4

Please sign in to comment.