Ontimize 5.2072EN

com.ontimize.gui
Class MainApplication.StatusBar

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.MainApplication.StatusBar
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Enclosing class:
MainApplication

public static class MainApplication.StatusBar
extends javax.swing.JPanel

Implementation of the application status bar

Version:
1.0
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.JPanel iconPanel
           
protected  int lastPaintPosition
           
protected  javax.swing.JProgressBar progressBar
           
protected  javax.swing.JLabel statusText
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
MainApplication.StatusBar()
          Creates the status bar.
 
Method Summary
 void addMouseListenerToStatusIcon(java.lang.String iconId, java.awt.event.MouseListener mouseListener)
          Registers a mouse listener to the specified icon
 void addStatusIcon(java.lang.String iconId, javax.swing.ImageIcon icon)
          Adds a icon to the right in the status bar.
 javax.swing.JLabel getIconLabel(java.lang.String iconId)
          Returns the JLabel used to show the icon referenced by IconId
 double getPercentComplete()
          Returns the complete percentage shown in the progress bar.
 void removeMouseListenerFromStatusIcon(java.lang.String iconId, java.awt.event.MouseListener mouseListener)
          Removes a mouse listener from an status icon
 void removeStatusIcon(java.lang.String iconId)
          Remove the icon with the specified identifier
 void setProgressMaximum(int maxProgress)
          Sets the maximum progress bar value.
 void setProgressPosition(int position)
          Sets the current progress bar position and paints it immediately.
 void setProgressPosition(int position, boolean paintImmediately)
          Sets the current progress bar position.
 void setProgressText(java.lang.String text)
          Sets the progress text, usually to show the operations that are being performed.
 void setStatusIconToolTip(java.lang.String iconId, java.lang.String toolTip)
          Sets the tip text for the icon identified by 'iconId'
 void setStatusText(java.lang.String text)
          Sets the text to show in the status bar.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lastPaintPosition

protected int lastPaintPosition

iconPanel

protected javax.swing.JPanel iconPanel

statusText

protected javax.swing.JLabel statusText

progressBar

protected javax.swing.JProgressBar progressBar
Constructor Detail

MainApplication.StatusBar

public MainApplication.StatusBar()
Creates the status bar.

Method Detail

setStatusIconToolTip

public void setStatusIconToolTip(java.lang.String iconId,
                                 java.lang.String toolTip)
Sets the tip text for the icon identified by 'iconId'

Parameters:
iconId - icon identifier
toolTip - tooltip text to show

addMouseListenerToStatusIcon

public void addMouseListenerToStatusIcon(java.lang.String iconId,
                                         java.awt.event.MouseListener mouseListener)
Registers a mouse listener to the specified icon

Parameters:
iconId - the icon identifier
mouseListener - the mouse listener

removeMouseListenerFromStatusIcon

public void removeMouseListenerFromStatusIcon(java.lang.String iconId,
                                              java.awt.event.MouseListener mouseListener)
Removes a mouse listener from an status icon

Parameters:
iconId - the icon identifier
mouseListener -

getIconLabel

public javax.swing.JLabel getIconLabel(java.lang.String iconId)
Returns the JLabel used to show the icon referenced by IconId

Parameters:
iconId - the icon identifier
Returns:
the JLabel related to the identified icon or null in case the icon can-t be found

addStatusIcon

public void addStatusIcon(java.lang.String iconId,
                          javax.swing.ImageIcon icon)
Adds a icon to the right in the status bar. The parameter iconId is the icon identifier. If an icon with this identifier already exists then this icon is replaced with the new one

Parameters:
iconId -
icon -

removeStatusIcon

public void removeStatusIcon(java.lang.String iconId)
Remove the icon with the specified identifier

Parameters:
iconId - Icon identifier

setStatusText

public void setStatusText(java.lang.String text)
Sets the text to show in the status bar.

Parameters:
text - the text to show or null in case the current text must be removed

setProgressText

public void setProgressText(java.lang.String text)
Sets the progress text, usually to show the operations that are being performed.

Parameters:
text -

getPercentComplete

public double getPercentComplete()
Returns the complete percentage shown in the progress bar.

Returns:
the progress bar percentage complete

setProgressMaximum

public void setProgressMaximum(int maxProgress)
Sets the maximum progress bar value.

Parameters:
maxProgress - the maximum progress bar value

setProgressPosition

public void setProgressPosition(int position)
Sets the current progress bar position and paints it immediately.

Parameters:
position -

setProgressPosition

public void setProgressPosition(int position,
                                boolean paintImmediately)
Sets the current progress bar position.

Parameters:
position -
paintImmediately - if true the progress bar will be repainted immediately

Ontimize