igeo.gui

## Class IGridPanel

- java.lang.Object
- - igeo.gui.IComponent
  - - igeo.gui.IPanel
    - - igeo.gui.IScreenTogglePanel
      - - igeo.gui.IGridPanel

- All Implemented Interfaces:
    IPanelI, IServerI, java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.awt.event.WindowListener, java.util.EventListener

      public class IGridPanel
      extends IScreenTogglePanel

  A panel class to contain multiple IPane in grid layout with toggle function to switch showing only one pane and showing all panes.
  Author:
    Satoru Sugihara

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class igeo.gui.IPanel

      `IPanel.AIScaleDialog, IPanel.FileAndFilterIndex`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `IPane[][]` | `gridPanes`
    `double[]` | `heightRatio`
    `double[]` | `widthRatio`
    `int` | `xnum`
    `int` | `ynum`

    - ### Fields inherited from class igeo.gui.IScreenTogglePanel

      `fullPaneOrigHeight, fullPaneOrigWidth, fullPaneOrigX, fullPaneOrigY, fullScreenPane`

    - ### Fields inherited from class igeo.gui.IPanel

      `bounds, currentMousePane, firstDraw, ig, panes, parentContainer, serverStateCount, sizeChanged, skipAutoFocus, startDynamicServer`

    - ### Fields inherited from class igeo.gui.IComponent

      `height, visible, width, x, y`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IGridPanel(int x, int y, int width, int height, int xnum, int ynum)`
    `IGridPanel(int x, int y, int width, int height, int xnum, int ynum, IPane[][] panes)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int[]` | `getPositionArrayFromRatio(double[] ratio, int totalLen)`
    `void` | `setSize(int w, int h)`
    `void` | `setupGrid(double[] widthRatio, double[] heightRatio, IPane[][] panes)`
    `void` | `setupGrid(int xnum, int ynum, IPane[][] panes)`

    - ### Methods inherited from class igeo.gui.IScreenTogglePanel

      `disableFullScreen, draw, enableFullScreen, enableFullScreen, isFull, keyPressed, mouseClicked, mouseClicked, setVisible`

    - ### Methods inherited from class igeo.gui.IPanel

      `addPane, chooseFile, chooseFile, chooseFile, clearPane, componentHidden, componentMoved, componentResized, componentShown, currentPane, focus, focusGained, focusLost, getBounds, getIG, getPaneAt, getPaneAt, keyPressed, keyReleased, keyReleased, keyTyped, keyTyped, mouseDragged, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mousePressed, mouseReleased, mouseReleased, mouseWheelMoved, mouseWheelMoved, pane, paneNum, postdraw, predraw, removePane, saveDialog, server, setBounds, setIG, setParent, skipAutoFocus, startDynamicServer, stopDynamicServer, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened`

    - ### Methods inherited from class igeo.gui.IComponent

      `contains, getHeight, getWidth, getX, getY, isVisible, setBounds, setBounds, setLocation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface igeo.gui.IPanelI

      `getHeight, getWidth, getX, getY`

- - ### Field Detail

    - #### gridPanes

          public IPane[][] gridPanes

    - #### xnum

          public int xnum

    - #### ynum

          public int ynum

    - #### widthRatio

          public double[] widthRatio

    - #### heightRatio

          public double[] heightRatio

  - ### Constructor Detail

    - #### IGridPanel

          public IGridPanel(int x,
                            int y,
                            int width,
                            int height,
                            int xnum,
                            int ynum)

    - #### IGridPanel

          public IGridPanel(int x,
                            int y,
                            int width,
                            int height,
                            int xnum,
                            int ynum,
                            IPane[][] panes)

  - ### Method Detail

    - #### setupGrid

          public void setupGrid(int xnum,
                                int ynum,
                                IPane[][] panes)

    - #### setupGrid

          public void setupGrid(double[] widthRatio,
                                double[] heightRatio,
                                IPane[][] panes)

      Parameters:
        `widthRatio` - Array of relative width ratio. Actual width is calculatd by each ratio divided by sum of ratios
        `heightRatio` - Array of relative height ratio. Actual height is calculatd by each ratio divided by sum of ratios

    - #### getPositionArrayFromRatio

          public static int[] getPositionArrayFromRatio(double[] ratio,
                                                        int totalLen)

    - #### setSize

          public void setSize(int w,
                              int h)

      Specified by:
        `setSize` in interface `IPanelI`
      Overrides:
        `setSize` in class `IScreenTogglePanel`