com.extjs.gxt.ui.client.widget.grid.Grid.getWidth()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中com.extjs.gxt.ui.client.widget.grid.Grid.getWidth()方法的一些代码示例,展示了Grid.getWidth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.getWidth()方法的具体详情如下:
包路径:com.extjs.gxt.ui.client.widget.grid.Grid
类名称:Grid
方法名:getWidth

Grid.getWidth介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

  1. public Grid copyGrid(Grid grid) {
  2. Grid g = new Grid(grid.getHeight(), grid.getWidth());
  3. for (int row = 0; row < height; row++) {
  4. for (int col = 0; col < width; col++) {
  5. g.setValue(row, col, grid.getValue(row, col));
  6. }
  7. return g;
  8. }

代码示例来源:origin: com.extjs/gxt

  1. @Override
  2. protected void resize() {
  3. final int oldCount = getVisibleRowCount();
  4. super.resize();
  5. if (mainBody != null) {
  6. resizeLiveScroller();
  7. scroller.setWidth(grid.getWidth() - getScrollAdjust(), true);
  8. DeferredCommand.addCommand(new Command() {
  9. public void execute() {
  10. if (oldCount != getVisibleRowCount()) {
  11. updateRows(LiveGridView.this.viewIndex, true);
  12. }
  13. }
  14. });
  15. }
  16. }

代码示例来源:origin: com.extjs/gxt

  1. protected void autoExpand(boolean preventUpdate) {
  2. if (!userResized && grid.getAutoExpandColumn() != null) {
  3. int tw = cm.getTotalWidth(false);
  4. int aw = grid.getWidth(true) - getScrollAdjust();
  5. if (tw != aw) {
  6. int ci = cm.getIndexById(grid.getAutoExpandColumn());
  7. assert ci != Style.DEFAULT : "auto expand column not found";
  8. if (cm.isHidden(ci)) {
  9. return;
  10. }
  11. int currentWidth = cm.getColumnWidth(ci);
  12. int cw = Math.min(Math.max(((aw - tw) + currentWidth), grid.getAutoExpandMin()), grid.getAutoExpandMax());
  13. if (cw != currentWidth) {
  14. cm.setColumnWidth(ci, cw, true);
  15. if (!preventUpdate) {
  16. updateColumnWidth(ci, cw);
  17. }
  18. }
  19. }
  20. }
  21. }

相关文章