本文整理了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
暂无
代码示例来源:origin: stackoverflow.com
public Grid copyGrid(Grid grid) {
Grid g = new Grid(grid.getHeight(), grid.getWidth());
for (int row = 0; row < height; row++) {
for (int col = 0; col < width; col++) {
g.setValue(row, col, grid.getValue(row, col));
}
return g;
}
代码示例来源:origin: com.extjs/gxt
@Override
protected void resize() {
final int oldCount = getVisibleRowCount();
super.resize();
if (mainBody != null) {
resizeLiveScroller();
scroller.setWidth(grid.getWidth() - getScrollAdjust(), true);
DeferredCommand.addCommand(new Command() {
public void execute() {
if (oldCount != getVisibleRowCount()) {
updateRows(LiveGridView.this.viewIndex, true);
}
}
});
}
}
代码示例来源:origin: com.extjs/gxt
protected void autoExpand(boolean preventUpdate) {
if (!userResized && grid.getAutoExpandColumn() != null) {
int tw = cm.getTotalWidth(false);
int aw = grid.getWidth(true) - getScrollAdjust();
if (tw != aw) {
int ci = cm.getIndexById(grid.getAutoExpandColumn());
assert ci != Style.DEFAULT : "auto expand column not found";
if (cm.isHidden(ci)) {
return;
}
int currentWidth = cm.getColumnWidth(ci);
int cw = Math.min(Math.max(((aw - tw) + currentWidth), grid.getAutoExpandMin()), grid.getAutoExpandMax());
if (cw != currentWidth) {
cm.setColumnWidth(ci, cw, true);
if (!preventUpdate) {
updateColumnWidth(ci, cw);
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!