其他备用代码

1、eclipse大小写切换 

ctrl+shift+Y

2、EditPlus大小写切换

Ctrl+K

3、BigDecimal

ROUND_HALF_UP  向(距离)最近的一边舍入,除非两边(的距离)是相等,如果是这样,向上舍入, 1.55保留一位小数结果为1.6

SysConstant.BIGZERO

4、 kdtable

kdtable日期格式化:

        * yyyy-MM-dd HH:mm:ss
        * yyyy-MM-dd
        * yyyy/MM/dd  HH:mm:ss
        * yyyy/MM/dd
        * yyyy.MM.dd  HH.mm.ss
        * yyyy.MM.dd
        * EEE MMM dd HH:mm:ss zzz yyyy,//标准时间表达
        * D MMM yyyy hh:mm:ss 'GMT', //GMT时间表达
        * E, d MMM yyyy HH:mm:ss,//Email时间表达

 

kdtable选择模式

    public static final int MODEL_LIST = 0;
    public static final int MODEL_EDIT = 1;
    public static final int NO_SELECT = 0;
    public static final int CELL_SELECT = 1;
    public static final int ROW_SELECT = 2;
    public static final int COLUMN_SELECT = 4;
    public static final int MULTIPLE_CELL_SELECT = 15;
    public static final int MULTIPLE_ROW_SELECT = 10;
    public static final int MULTIPLE_COLUMN_SELECT = 12;
    public static final int TABLE_SELECT = 8;
    private static final int MULTIPLE_SELECT = 8;

5、清除表格数据


    public static void removeTableData(KDTable table) {
        IObjectCollection collection = (IObjectCollection) table.getUserObject();
        if (collection != null && !collection.isEmpty())
            for (int rowIndex = 0; rowIndex < table.getRowCount(); rowIndex++) {
                IObjectValue detailData = (IObjectValue) table.getRow(rowIndex).getUserObject();
                if (detailData != null) {
                    collection.removeObject(detailData);
                }
            }
        table.removeRows();
    }

6、MsgBox及资源文件

MsgBox.showError(this, EASResource.getString(HuarConstant.RES_PLACEMGR, "ConNumberEmpty"));

7、KDTabbedPane默认无穷大

    /**
     * KDTabbedPane问题
     */
    public void initUIContentLayout() {
        super.initUIContentLayout();
        pnlEndCase.putClientProperty("OriginalBounds", new Rectangle(0, 0, 560, 196));
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值