igeo.gui
Class IGridPanel

java.lang.Object
  extended by igeo.gui.IComponent
      extended by igeo.gui.IPanel
          extended by igeo.gui.IScreenTogglePanel
              extended by igeo.gui.IGridPanel
All Implemented Interfaces:
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.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.

Version:
0.7.0.0;
Author:
Satoru Sugihara

Field Summary
 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, ig, panes, serverStateCount, startDynamicServer
 
Fields inherited from class igeo.gui.IComponent
height, visible, width, x, y
 
Constructor Summary
IGridPanel(int x, int y, int width, int height, int xnum, int ynum)
           
 
Method Summary
static int[] getPositionArrayFromRatio(double[] ratio, int totalLen)
           
 void setSize(int w, int h)
           
 void setupGrid(double[] widthRatio, double[] heightRatio)
           
 void setupGrid(int xnum, int ynum)
           
 
Methods inherited from class igeo.gui.IScreenTogglePanel
disableFullScreen, draw, enableFullScreen, enableFullScreen, isFull, keyPressed, mouseClicked
 
Methods inherited from class igeo.gui.IPanel
addPane, chooseFile, chooseFile, chooseFile, chooseFiles, chooseFiles, clearPane, componentHidden, componentMoved, componentResized, componentShown, focus, focusGained, focusLost, getBounds, getPane, getPaneAt, getPaneAt, hide, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, paneNum, removePane, server, setBounds, setIG, show, startDynamicServer
 
Methods inherited from class igeo.gui.IComponent
contains, getHeight, getWidth, getX, getY, isVisible, setBounds, setBounds, setLocatoin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
Method Detail

setupGrid

public void setupGrid(int xnum,
                      int ynum)

setupGrid

public void setupGrid(double[] widthRatio,
                      double[] heightRatio)
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)
Overrides:
setSize in class IScreenTogglePanel