jap
Class StatusPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by jap.StatusPanel
All Implemented Interfaces:
IStatusLine, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.lang.Runnable, javax.accessibility.Accessible

public class StatusPanel
extends javax.swing.JPanel
implements java.lang.Runnable, IStatusLine

A panel which display some status messages, one after each other

See Also:
Serialized Form

Nested Class Summary
static class StatusPanel.ButtonListener
           
private  class StatusPanel.MessagesListNode
           
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private static int ICON_HEIGHT
           
private static int ICON_WIDTH
           
private  int m_aktY
           
private  boolean m_bRun
           
private  javax.swing.JLabel m_button
           
private  StatusPanel.MessagesListNode m_firstMessage
           
private  java.awt.Image m_imageError
           
private  java.awt.Image m_imageInformation
           
private  java.awt.Image m_imageWarning
           
private  java.util.Random m_Random
           
private  java.lang.Thread m_Thread
           
private static java.lang.String MSG_CLICK_HERE
           
private  java.lang.Object SYNC_MSG
           
 
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
StatusPanel(javax.swing.JLabel a_button)
           
 
Method Summary
 int addStatusMsg(java.lang.String msg, int type, boolean bAutoRemove)
          Adds a message to be displayed in the status panel.
 int addStatusMsg(java.lang.String msg, int type, boolean bAutoRemove, java.awt.event.ActionListener a_listener)
           
 int addStatusMsg(java.lang.String msg, int type, boolean bAutoRemove, java.awt.event.ActionListener a_listener, StatusPanel.ButtonListener a_ButtonListener)
          Adds a message to be displayed in the status panel.
 void finalize()
           
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
 void paint(java.awt.Graphics g)
           
 void removeStatusMsg(int id)
          Removes a message from the ones which are displayed in the status panel
 void run()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MSG_CLICK_HERE

private static final java.lang.String MSG_CLICK_HERE

SYNC_MSG

private final java.lang.Object SYNC_MSG

m_Random

private java.util.Random m_Random

m_button

private javax.swing.JLabel m_button

ICON_HEIGHT

private static final int ICON_HEIGHT
See Also:
Constant Field Values

ICON_WIDTH

private static final int ICON_WIDTH
See Also:
Constant Field Values

m_imageError

private java.awt.Image m_imageError

m_imageInformation

private java.awt.Image m_imageInformation

m_imageWarning

private java.awt.Image m_imageWarning

m_firstMessage

private StatusPanel.MessagesListNode m_firstMessage

m_bRun

private volatile boolean m_bRun

m_aktY

private volatile int m_aktY

m_Thread

private java.lang.Thread m_Thread
Constructor Detail

StatusPanel

public StatusPanel(javax.swing.JLabel a_button)
Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

addStatusMsg

public int addStatusMsg(java.lang.String msg,
                        int type,
                        boolean bAutoRemove)
Adds a message to be displayed in the status panel.

Specified by:
addStatusMsg in interface IStatusLine
Parameters:
type - chose one of JOptionPane.*
msg - the message to be displayed
Returns:
an id useful for removing this message from the status panel

addStatusMsg

public int addStatusMsg(java.lang.String msg,
                        int type,
                        boolean bAutoRemove,
                        java.awt.event.ActionListener a_listener)
Specified by:
addStatusMsg in interface IStatusLine

addStatusMsg

public int addStatusMsg(java.lang.String msg,
                        int type,
                        boolean bAutoRemove,
                        java.awt.event.ActionListener a_listener,
                        StatusPanel.ButtonListener a_ButtonListener)
Adds a message to be displayed in the status panel.

Parameters:
type - chose one of JOptionPane.*
msg - the message to be displayed
Returns:
an id >= 0 useful for removing this message from the status panel

removeStatusMsg

public void removeStatusMsg(int id)
Removes a message from the ones which are displayed in the status panel

Specified by:
removeStatusMsg in interface IStatusLine
Parameters:
id - the message to be removed

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

run

public void run()
Specified by:
run in interface java.lang.Runnable