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

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

public class TocButton
extends java.awt.Panel

This class represents a button that will show only an icon and listen to mouse events. It is a square button, with two versions: Default and small. the sizes are: GvsigMobileGUIConstants.DEFAULT_BUTTON_WIDTH GvsigMobileGUIConstants.ICON_SIZE_SMALL

Author:
jldominguez
See Also:
GvsigMobileGUIConstants, Serialized Form

Field Summary
static int MARGIN
           
 
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
TocButton(java.lang.String image_name, boolean small)
          Constructor
TocButton(java.lang.String image_name, int ind, boolean small, boolean up_down)
          COnstructor.
TocButton(java.lang.String image_name, java.lang.String dis_image_name, int ind, boolean small, boolean up_down)
          Constructor.
 
Method Summary
 boolean isEnabled()
           
 void paint(java.awt.Graphics g)
          Overriden method.
 void setEnabled(boolean e)
          If the button is not enabled, if wont listen to mouse events and the main icon will not show
 
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, 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, 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, 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

MARGIN

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

TocButton

public TocButton(java.lang.String image_name,
                 int ind,
                 boolean small,
                 boolean up_down)
COnstructor.

Parameters:
image_name - icon full path name
ind - index of this button, useful when there are several buttons in a row/column
small - whether it is a small icon (see class description)
up_down - true when the button is part of a column of buttons, false when it's part of a row of buttons.

TocButton

public TocButton(java.lang.String image_name,
                 boolean small)
Constructor

Parameters:
image_name - icon image full file path
small - whether it's a small button

TocButton

public TocButton(java.lang.String image_name,
                 java.lang.String dis_image_name,
                 int ind,
                 boolean small,
                 boolean up_down)
Constructor.

Parameters:
image_name - icon full path name
dis_image_name - icon full path name of the icon when button is disabled
ind - index of this button, useful when there are several buttons in a row/column
small - whether it is a small icon (see class description)
up_down - true when the button is part of a column of buttons, false when it's part of a row of buttons.
Method Detail

setEnabled

public void setEnabled(boolean e)
If the button is not enabled, if wont listen to mouse events and the main icon will not show


isEnabled

public boolean isEnabled()

paint

public void paint(java.awt.Graphics g)
Overriden method.

Parameters:
g - The graphics object on which this tobject will be painted