예제 #1
0
 public void setBounds(final int x, final int y, final int width, final int height) {
   super.setBounds(x, y, width, height);
   final int portion = width / 100;
   int widthSum = 0;
   for (DataTableFieldWrapper field : this.colMetaData.values()) {
     final int colNum = field.getColNum();
     final TableColumn column = this.getColumnModel().getColumn(colNum);
     column.setPreferredWidth(field.getPreferredWidth() * portion);
     widthSum = widthSum + field.getPreferredWidth();
   }
   if (widthSum != 100) {
     LOG.error("Sum of column width is expected to be 100, now its " + widthSum);
   }
 }
예제 #2
0
 private void validateTableFields() {
   for (DataTableFieldWrapper wrapper : this.colMetaData.values()) {
     if (wrapper.getDataTableField().isEditable()
         && wrapper.getDataTableField().columnName().contains("<html>")
         && ValidationUtil.isNullOrEmpty(wrapper.getDataTableField().displayName())) {
       LOG.error(
           "Warning in class "
               + this.dataModelClass.getName()
               + ":Error messages may contain '"
               + wrapper.getDataTableField().columnName()
               + "'. Provide 'displayName' to avoid this.");
     }
   }
 }