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

java.lang.Object
  extended byjava.awt.Component
      extended byes.prodevelop.gvsig.mobile.gui.tool.ToolBarGroupButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class ToolBarGroupButton
extends java.awt.Component

This class represents one of the buttons that show on the left side of the main window. When the user clicks on one of them, a new tool bar shows at the top.

Author:
jldominguez
See Also:
ToolBar, Serialized Form

Field Summary
static int ICON_HEIGHT
          Icon size.
static int ICON_WIDTH
          Icon size.
 
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
ToolBarGroupButton(java.lang.String _icon, java.lang.String _selicon, MainWindow _mw, int _i)
          Constructor.
 
Method Summary
 int getIndex()
           
 ToolBar getOwner()
           
 boolean isSelected()
           
 void paint(java.awt.Graphics g)
          This method will paint the icon (selected or unselected)
 void setOwner(ToolBar tb)
          Sets the owner of this button (a tool bar)
 void setSelected(boolean b)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ICON_WIDTH

public static int ICON_WIDTH
Icon size.


ICON_HEIGHT

public static int ICON_HEIGHT
Icon size.

Constructor Detail

ToolBarGroupButton

public ToolBarGroupButton(java.lang.String _icon,
                          java.lang.String _selicon,
                          MainWindow _mw,
                          int _i)
Constructor.

Parameters:
_icon - the full file path to the icon image file (unselected)
_selicon - the full file path to the icon image file (selected)
_mw - the parent main window
_i - the 0-based index of this icon
Method Detail

getIndex

public int getIndex()

setSelected

public void setSelected(boolean b)

isSelected

public boolean isSelected()

paint

public void paint(java.awt.Graphics g)
This method will paint the icon (selected or unselected)

Parameters:
g - the object on which we have to paint

getOwner

public ToolBar getOwner()
Returns:
the owner of this button (the tool bar)

setOwner

public void setOwner(ToolBar tb)
Sets the owner of this button (a tool bar)

Parameters:
tb - the owner of this button