es.prodevelop.gvsig.mobile.gui.tab
Class ExpansiblePanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byes.prodevelop.gvsig.mobile.gui.tab.ExpansiblePanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ExpansiblePanel
extends java.awt.Panel

This class is used to create panels expandible horizontally and vertically. Each row of the panel will have at most one control that will be added in the expandible way (horizonatal expansion). Each ExpansiblePanel will have at most one row that is added in the expansible way (vertical expansion)

Author:
jcarrasco
See Also:
ExpansibleRow, Serialized Form

Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ExpansiblePanel()
          Constructor with default initial size
ExpansiblePanel(int w, int h)
          Constructor with specific initial size
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 java.awt.Component add(java.awt.Component com)
          Adds a new component the panel.
 void addExpansible(ExpansibleRow row)
          Adds a new component the panel.
 void expand()
          This method is called when all components have been added or updated and the panel must adopt a sensible size.
 int getMaxHeight()
          Gets the maximum height that the panel can have with the current components.
 void setSize(int w, int h)
          Sets panel size
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExpansiblePanel

public ExpansiblePanel()
Constructor with default initial size


ExpansiblePanel

public ExpansiblePanel(int w,
                       int h)
Constructor with specific initial size

Parameters:
w - initial panel width
h - initial panel height
Method Detail

setSize

public void setSize(int w,
                    int h)
Sets panel size

Parameters:
w - new panel width
h - new panel height

expand

public void expand()
This method is called when all components have been added or updated and the panel must adopt a sensible size.


add

public java.awt.Component add(java.awt.Component com)
Adds a new component the panel. It will be treated as a new non-vertically expansible row

Parameters:
com - the new component to be added (treated as a row)

addExpansible

public void addExpansible(ExpansibleRow row)
Adds a new component the panel. It will be treated as a new vertically expansible row (there must be zero or one vertically expansible rows in the panel)

Parameters:
row - the new component to be added (treated as a row)

getMaxHeight

public int getMaxHeight()
Gets the maximum height that the panel can have with the current components.

Returns:
the maximum height that the panel can have with the current components

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)