コード例 #1
0
 @Override
 protected void changeLayoutFromGrid(
     final RadContainer container,
     final List<RadComponent> contents,
     final List<Boolean> canRowsGrow,
     final List<Boolean> canColumnsGrow) {
   int rowCount = Math.max(1, canRowsGrow.size());
   int columnCount = Math.max(1, canColumnsGrow.size());
   container.setLayoutManager(this, new GridLayoutManager(rowCount, columnCount));
 }
コード例 #2
0
 @Override
 public boolean canCellGrow(RadContainer container, boolean isRow, int cellIndex) {
   final GridLayoutManager gridLayoutManager = ((GridLayoutManager) container.getLayout());
   int maxSizePolicy = 0;
   for (int i = 0; i < gridLayoutManager.getCellCount(isRow); i++) {
     maxSizePolicy = Math.max(maxSizePolicy, gridLayoutManager.getCellSizePolicy(isRow, i));
   }
   return gridLayoutManager.getCellSizePolicy(isRow, cellIndex) == maxSizePolicy;
 }
コード例 #3
0
 @Override
 protected void changeLayoutFromIndexed(
     final RadContainer container, final List<RadComponent> components) {
   container.setLayoutManager(this, new GridLayoutManager(1, Math.max(1, components.size())));
 }