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);

最新文章

  1. Android 关于ijkplayer
  2. [LeetCode] Find Minimum in Rotated Sorted Array 寻找旋转有序数组的最小值
  3. Code First06---CodeFirst中的一对多关系
  4. window平台安装MongoDB
  5. RAC实例 表空间 维护
  6. jboolean
  7. delphi TColorDialog
  8. 【Express】请求和响应对象
  9. C语言实现有序二叉树(1)
  10. Jrebel 6.2.1破解
  11. STM32的外部中断配置及使用
  12. 2D命令行小游戏Beta1.0
  13. Windows密钥容器和证书的关系
  14. Photos_2017 China MVP Community Connection
  15. 使用rsync实现不同Linux服务器间目录同步
  16. HDU 1175 连连看 (DFS+剪枝)
  17. matplotlib画图
  18. Java学习笔记之linux配置java环境变量(三种环境变量)
  19. 优化cocos2d/x程序的内存使用和程序大小
  20. Java 8 日期时间API

热门文章

  1. 【原创】TCP超时重传机制探索
  2. android 细节之 menu 之 invalidateOptionsMenu
  3. jeecg-easypoi-2.0.3版本号公布
  4. springboot-quartz 实现动态添加,修改,删除,暂停,恢复等功能
  5. luogu3155 [CQOI2009]叶子的染色
  6. OC常用的数学函数及宏定义
  7. Linux下查看操作系统的位数和系统名称版本信息
  8. E20170905-mk
  9. Android PopWindow的替代品BasePopup
  10. JAVA 中进行网络通信时,通信的程序两端要传输的对象,不仅要序列化,而且这个对象所属的类的名字要完全一样,连包的名字都得一样