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
Constructor Summary |
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)
|
Methods inherited from class igeo.gui.IPanel |
addPane, chooseFile, chooseFile, chooseFile, clearPane, componentHidden, componentMoved, componentResized, componentShown, currentPane, focus, focusGained, focusLost, getBounds, getIG, getPaneAt, getPaneAt, keyReleased, keyTyped, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, pane, paneNum, postdraw, predraw, removePane, saveDialog, server, setBounds, setIG, setParent, skipAutoFocus, startDynamicServer, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gridPanes
public IPane[][] gridPanes
xnum
public int xnum
ynum
public int ynum
widthRatio
public double[] widthRatio
heightRatio
public double[] heightRatio
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)
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 ratiosheightRatio
- 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