eas之style接口
Obj可以是KDTable对象,也可以是IRow,IColumn,ICell对象
锁定
Obj.getStyleAttributes().setLocked(true);
Obj.getStyleAttributes().isLocked();
隐藏
Obj.getStyleAttributes().setHided(true);
Obj.getStyleAttributes().isHided()
对齐(水平和垂直)
Obj.getStyleAttributes().setHorizontalAlign(HorizontalAlignment. RIGHT);
Obj.getStyleAttributes().setVerticalAlign(VerticalAlignment.TOP);
是否折行
Obj.getStyleAttributes().setWrapText(true);
背景色
Obj.getStyleAttributes().setBackground(Color.YELLOW);
边框笔形(实心线或点线等)
Obj.getStyleAttributes().setBorderPenStyle(Position.RIGHT, PenStyle.PS_SOLID);
Obj.getStyleAttributes().setBorderColor(Position.RIGHT, Color.YELLOW)
字体
Obj.getStyleAttributes().setFontSize(16);
Obj.getStyleAttributes().setBold(true)
// 隐藏列或行
col.getStyleAttributes().setHided(true);
row.getStyleAttributes().setHided(true);
// 设置单元背景色
cell.getStyleAttributes().setBackground(color);
// 设置单元字体颜色、字体名称、字体大小
cell.getStyleAttributes().setFontColor(color);
cell.getStyleAttributes().setFontName(strName);
cell.getStyleAttributes().setFontSize(size);
// 锁定表格、行、列、单元
table.getStyleAttributes().setLocked(true);
row.getStyleAttributes().setLocked(true);
col.getStyleAttributes().setLocked(true);
cell.getStyleAttributes().setLocked(true);
// 设置对齐方式
table.getStyleAttributes().setHorizontalAlign(HorizontalAlignment.RIGHT);
// 设置自动折行
table.getStyleAttributes().setWrapText(true);
// 隐藏表格、行、列、单元的边框
table.getStyleAttributes().setBorderLineStyle(Position.RIGHT, LineStyle. NULL_LINE);// 隐藏表格单元的右边框
table.getStyleAttributes().setBorderLineStyle(Position.BOTTOM, LineStyle. NULL_LINE);// 隐藏表格单元的下边框
注意:KDTable在默认情况下左边框和上边框为空,右边框和下边框不为空。上述代码也可应用在具体某个row、column或cell上。
table.getRow(2).setHeight(20);
table.getColumn(1).setWidth(100);
最新文章
- Android 关于ijkplayer
- [LeetCode] Find Minimum in Rotated Sorted Array 寻找旋转有序数组的最小值
- Code First06---CodeFirst中的一对多关系
- window平台安装MongoDB
- RAC实例 表空间 维护
- jboolean
- delphi TColorDialog
- 【Express】请求和响应对象
- C语言实现有序二叉树(1)
- Jrebel 6.2.1破解
- STM32的外部中断配置及使用
- 2D命令行小游戏Beta1.0
- Windows密钥容器和证书的关系
- Photos_2017 China MVP Community Connection
- 使用rsync实现不同Linux服务器间目录同步
- HDU 1175 连连看 (DFS+剪枝)
- matplotlib画图
- Java学习笔记之linux配置java环境变量(三种环境变量)
- 优化cocos2d/x程序的内存使用和程序大小
- Java 8 日期时间API
热门文章
- 【原创】TCP超时重传机制探索
- android 细节之 menu 之 invalidateOptionsMenu
- jeecg-easypoi-2.0.3版本号公布
- springboot-quartz 实现动态添加,修改,删除,暂停,恢复等功能
- luogu3155 [CQOI2009]叶子的染色
- OC常用的数学函数及宏定义
- Linux下查看操作系统的位数和系统名称版本信息
- E20170905-mk
- Android PopWindow的替代品BasePopup
- JAVA 中进行网络通信时,通信的程序两端要传输的对象,不仅要序列化,而且这个对象所属的类的名字要完全一样,连包的名字都得一样