EAS BOS 设置KDTable列宽改变时行高自适应内容

private KDTResizeListener resizeListener;

@Override
public void loadFields() {
    removeListeners();
    super.loadFields();
    addListeners();
}

protected void addListeners() {

    if(resizeListener == null){
        resizeListener = new KDTResizeListener(){

            //列宽改变
            @Override
            public void tableColumnResize(KDTResizeEvent paramKDTResizeEvent) {
                reCalHeightOrWidth(paramKDTResizeEvent, true);
            }

            //行高改变
            @Override
            public void tableRowResize(KDTResizeEvent paramKDTResizeEvent) {
                
            }
        };
        kdtEntry.addKDTResizeListener(resizeListener);
    }
}


protected void removeListeners() {
    kdtEntry.removeKDTResizeListener(resizeListener);
}


protected void reCalHeightOrWidth(KDTResizeEvent e, boolean isColumnResize) {
    KDTable t = (KDTable) e.getSource();
    if(isColumnResize){
        for(int i = 0; i

 

你可能感兴趣的:(EAS,BOS)