es.prodevelop.gvsig.mobile.gui.dialog.control
Class WMSLayerListItem

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Panel
              extended byes.prodevelop.gvsig.mobile.gui.dialog.control.WMSLayerListItem
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.io.Serializable

public class WMSLayerListItem
extends java.awt.Panel
implements java.awt.event.ItemListener

This class represents a row in the list of available layers when accessing a WMS server. The left margin depend on the "depth" of the layer (in a tree strcuture). Behavior: - when an unchecked checkbox is checked, all its descendats are checked - when a checked checkbox is unchecked, all its direct ancestors are unchecked to keep coherency This class keeps a reference to the WMSLayerDescription of the layer. It keeps a reference to the parent dialog, since it needs to be refreshed when one of the checkboxes changes.

Author:
jldominguez
See Also:
WMSLayerDescription, WMSDialog, Serialized Form

Field Summary
static int WMS_LAYER_ITEM_HEIGHT
           
static int WMS_LAYER_ITEM_LEVEL_SKIP
           
 
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
WMSLayerListItem(WMSLayerDescription d, int max_w, WMSDialog dlg)
          Constructor
 
Method Summary
 WMSLayerDescription getLayerDescription()
           
 java.lang.String getLayerId()
           
 boolean isChecked()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
          This methis will force a refresh of the other checkboxes.
 void updateCheckboxInSilence()
          Utility method to manage the behavior of the check boxes.
 
Methods inherited from class java.awt.Panel
addNotify, getAccessibleContext
 
Methods inherited from class java.awt.Container
add, 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, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WMS_LAYER_ITEM_LEVEL_SKIP

public static final int WMS_LAYER_ITEM_LEVEL_SKIP
See Also:
Constant Field Values

WMS_LAYER_ITEM_HEIGHT

public static final int WMS_LAYER_ITEM_HEIGHT
See Also:
Constant Field Values
Constructor Detail

WMSLayerListItem

public WMSLayerListItem(WMSLayerDescription d,
                        int max_w,
                        WMSDialog dlg)
Constructor

Parameters:
d - WMS layer description
max_w - max width (in pixels) of the row
dlg - dialog that contains this row.
Method Detail

isChecked

public boolean isChecked()
Returns:
whether the checkbox is checked or not

getLayerDescription

public WMSLayerDescription getLayerDescription()

updateCheckboxInSilence

public void updateCheckboxInSilence()
Utility method to manage the behavior of the check boxes.


getLayerId

public java.lang.String getLayerId()

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
This methis will force a refresh of the other checkboxes.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener