es.prodevelop.gvsig.mobile.gui.bar
Class StatusBar

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

public class StatusBar
extends java.awt.Component

This class represents the status bar shown at the bottom of the application window to display info: coordinates, distances, area, GPS information, etc.

Author:
jcarrasco
See Also:
StatusBarItem, Serialized Form

Field Summary
static java.awt.Image bgStrip
           
static int GPS_BAR
           
static int MEASURES_BAR
          The Id of the whole status bars used in application
static int[] PERMANENT_BARS
          Array with all the status bars that not disappear when selected tool changes
static int STATUS_BAR_HEIGHT
           
static int STATUS_BAR_TEXT_LOWER_GAP
           
static int STATUS_BAR_TEXT_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
StatusBar(int w, int h)
           
 
Method Summary
 void addBar(int id)
          Adds a new bar to the statusbar stack if it is not yet on top of the stack
 StatusBarItem getStatusBar(int id)
           
 boolean isPermanent(int id)
          Returns false if the indicated bar should hide when tool changes
 void paint(java.awt.Graphics g)
          Overriden paint method to draw the current icons and info text.
 void removeBar(int id)
          Removes the bar with the indicated id
 void removeNonPermanentBars()
          Removes bars that must disappear when tool changes
 void reorder(int w, int h)
           
 void setIcon(int id, java.lang.String res_folder, java.lang.String f_name)
          Set icon shown on the right side of the status bar.
 void setMessage(int id, java.lang.String msg)
           
 void setSubIcon(int id, java.lang.String res_folder, java.lang.String f_name)
          Set sub icon of the status bar.
 StatusBarItem topBar()
           
 
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

STATUS_BAR_HEIGHT

public static final int STATUS_BAR_HEIGHT
See Also:
Constant Field Values

STATUS_BAR_TEXT_MARGIN

public static final int STATUS_BAR_TEXT_MARGIN
See Also:
Constant Field Values

STATUS_BAR_TEXT_LOWER_GAP

public static final int STATUS_BAR_TEXT_LOWER_GAP
See Also:
Constant Field Values

bgStrip

public static java.awt.Image bgStrip

MEASURES_BAR

public static final int MEASURES_BAR
The Id of the whole status bars used in application

See Also:
Constant Field Values

GPS_BAR

public static final int GPS_BAR
See Also:
Constant Field Values

PERMANENT_BARS

public static final int[] PERMANENT_BARS
Array with all the status bars that not disappear when selected tool changes

Constructor Detail

StatusBar

public StatusBar(int w,
                 int h)
Method Detail

isPermanent

public boolean isPermanent(int id)
Returns false if the indicated bar should hide when tool changes


addBar

public void addBar(int id)
Adds a new bar to the statusbar stack if it is not yet on top of the stack


removeBar

public void removeBar(int id)
Removes the bar with the indicated id


removeNonPermanentBars

public void removeNonPermanentBars()
Removes bars that must disappear when tool changes


topBar

public StatusBarItem topBar()

reorder

public void reorder(int w,
                    int h)

setMessage

public void setMessage(int id,
                       java.lang.String msg)

getStatusBar

public StatusBarItem getStatusBar(int id)

setIcon

public void setIcon(int id,
                    java.lang.String res_folder,
                    java.lang.String f_name)
Set icon shown on the right side of the status bar.

Parameters:
id - status bar id, to indicate status bar type
res_folder - resources folder (usually "img")
f_name - icon file name

setSubIcon

public void setSubIcon(int id,
                       java.lang.String res_folder,
                       java.lang.String f_name)
Set sub icon of the status bar.

Parameters:
id - status bar id, to indicate status bar type
res_folder - resources folder (usually "img")
f_name - icon file name

paint

public void paint(java.awt.Graphics g)
Overriden paint method to draw the current icons and info text.