Class EGridLayout.Grid

java.lang.Object
com.iizigo.panel.prop.EGridLayout.Grid
Enclosing class:
EGridLayout

public class EGridLayout.Grid extends Object
The grid class.
Author:
Christopher Mindus
  • Field Details

    • columnCount

      public int columnCount
      The column count.
    • grid

      public ArrayList<int[]> grid
      The grid.
  • Method Details

    • consolidateGrid

      public void consolidateGrid(ComplexOperation op)
      Make sure grid is filled with empty cells at all "zero-locations".

      The index VALUES of this grid are stale after the call: an Empty component inserted here gets its own position as index, and the components after it keep the index they had (the renumbering below is commented out), so cells of two components can hold the same value. No caller is affected: every caller discards the grid after this call, and EGridLayout.getGrid() builds a new one for the next operation.

    • getRow

      public int getRow(UIComp c)
      Gets the row of a component.
      Returns:
      -1 if not found.
    • getColumn

      public int getColumn(UIComp c)
      Gets the column of a component.
      Returns:
      -1 if not found.
    • deleteColumn

      public void deleteColumn(ComplexOperation op, int column)
      Deletes a column.
    • deleteRow

      public void deleteRow(ComplexOperation op, int row)
      Deletes a row.
    • insertRow

      public void insertRow(ComplexOperation op, int row)
      Insert row.
    • insertColumn

      public void insertColumn(ComplexOperation op, int col)
      Insert column.
    • clearCells

      public void clearCells(ComplexOperation op, PanelEditor.GridInfo gi)
      Clears grid cells.
    • shrinkExtendOverwrite

      public boolean shrinkExtendOverwrite(boolean doit, ComplexOperation op, PanelEditor.GridInfo gi, int dx, int dy)
      Expands or collapses grid cells spans in overwrite mode.
    • shrinkExtendInsert

      public boolean shrinkExtendInsert(boolean doit, ComplexOperation op, PanelEditor.GridInfo gi, int dx, int dy)
      Extends or shrinks grid cells spans in insert mode.
    • list

      public void list(PrintStream stream)
      Lists the grid.
    • getColumnSpan

      public int getColumnSpan(UIComp c)
      Gets the count of columns a component covers in this grid: the horizontal span of its Grid Data, at most the column count (as the constructor places it). A caller that works out columns from a component reads this, never the Grid Data, whose span may be larger than the grid until the first edit has set it.
      Returns:
      The count of columns, at least 1.