es.prodevelop.gvsig.mobile.gui.tool
Class GenericButton

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byes.prodevelop.gvsig.mobile.gui.tool.GenericButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
DialogButton, TBWidget

public class GenericButton
extends java.awt.Container

Abstract class for gvSIG Mobile buttons. All types of buttons inheritate from GenericButton

Author:
jldominguez, mmontesinos
See Also:
TBWidget, 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
GenericButton(java.awt.Image _icon, java.awt.Image _selicon, java.awt.event.MouseListener ml)
          Constructs a new instance of this class given the icons Images and the listener of the events for this new instance
GenericButton(java.lang.String _icon, java.lang.String _selicon, java.awt.event.MouseListener ml)
          Constructs a new instance of this class given the icons Strings and the listener of the events for this new instance
 
Method Summary
 boolean isSelected()
           
 void paint(java.awt.Graphics g)
          Forces the paint of the object.
 void setSelected(boolean _selected)
          Sets the widget to selected/unselected status
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addNotify, 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, 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, getAccessibleContext, 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
 

Constructor Detail

GenericButton

public GenericButton(java.lang.String _icon,
                     java.lang.String _selicon,
                     java.awt.event.MouseListener ml)
Constructs a new instance of this class given the icons Strings and the listener of the events for this new instance

Parameters:
_icon - Image to be loaded as normal image
_selicon - Image to be loaded as selected image. Used when the button is selected
ml - Listener of Mouse Events, which must be a MouseListener

GenericButton

public GenericButton(java.awt.Image _icon,
                     java.awt.Image _selicon,
                     java.awt.event.MouseListener ml)
Constructs a new instance of this class given the icons Images and the listener of the events for this new instance

Parameters:
_icon - Image to be loaded as normal image
_selicon - Image to be loaded as selected image. Used when the button is selected
ml - Listener of Mouse Events, which must be a MouseListener
Method Detail

setSelected

public void setSelected(boolean _selected)
Sets the widget to selected/unselected status

Parameters:
_selected - true: Sets the widget to selected status false: Sets the widget to unselected status

isSelected

public boolean isSelected()
Returns:
Returns the selected.

paint

public void paint(java.awt.Graphics g)
Forces the paint of the object. This method should be called when the content of the GenericButton needs to be painted. This method overrides the paint method of the Component parent