コード例 #1
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;
 }
コード例 #2
0
  public void writeLayout(final XmlWriter writer, final RadContainer radContainer) {
    GridLayoutManager layout = (GridLayoutManager) radContainer.getLayout();

    writer.addAttribute("row-count", layout.getRowCount());
    writer.addAttribute("column-count", layout.getColumnCount());

    writer.addAttribute(
        UIFormXmlConstants.ATTRIBUTE_SAME_SIZE_HORIZONTALLY, layout.isSameSizeHorizontally());
    writer.addAttribute(
        UIFormXmlConstants.ATTRIBUTE_SAME_SIZE_VERTICALLY, layout.isSameSizeVertically());

    RadXYLayoutManager.INSTANCE.writeLayout(writer, radContainer);
  }
コード例 #3
0
 public int[] getGridCellSizes(RadContainer container, boolean isRow) {
   GridLayoutManager grid = (GridLayoutManager) container.getLayout();
   return isRow ? grid.getHeights() : grid.getWidths();
 }
コード例 #4
0
 public int[] getGridCellCoords(RadContainer container, boolean isRow) {
   GridLayoutManager grid = (GridLayoutManager) container.getLayout();
   return isRow ? grid.getYs() : grid.getXs();
 }
コード例 #5
0
 @Override
 public int[] getVerticalGridLines(RadContainer container) {
   GridLayoutManager grid = (GridLayoutManager) container.getLayout();
   return grid.getVerticalGridLines();
 }
コード例 #6
0
 @Override
 public int getGridColumnCount(RadContainer container) {
   return ((GridLayoutManager) container.getLayout()).getColumnCount();
 }