zoukankan      html  css  js  c++  java
  • 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);


  • 相关阅读:
    SpringBoot创建定时任务
    SpringBoot 多环境配置
    SpringBoot中使用log4j日志
    SpringBoot项目结构介绍
    SpringBoot快速入门
    Zookeeper Zkclient客户端
    Zookeeper java api
    学习微信小程序及知识占及v-if与v-show差别

    1像素
  • 原文地址:https://www.cnblogs.com/luojiabao/p/10963785.html
Copyright © 2011-2022 走看看