Class StackedMsgLabel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class StackedMsgLabel extends Box
Label that updates text in reaction to state changes of JMenuItems. Text is saved in a stack and values can be pushed and popped. Generally used as a status bar. Default message is "Ready".
StackedMsgLabel Example
See Also:
  • Constructor Details

    • StackedMsgLabel

      public StackedMsgLabel()
  • Method Details

    • getMsgStack

      protected Stack<Object> getMsgStack()
    • getLabel

      protected JLabel getLabel()
    • pushMsg

      public void pushMsg(Object pMsg)
      Push message onto stack.
    • popMsg

      public Object popMsg()
      Pop message off of stack.
      Returns:
      Object popped from stack.
    • setText

      public void setText(Object pText)
      Pop old message and push new message.
    • getText

      public String getText()
      Get text at top of stack.
    • addStatusListener

      public ChangeListener addStatusListener(JMenuItem pItem, String pStatusMsg)
      Parameters:
      pStatusMsg - Message to be displayed on menu highlight.
    • addStatusListener

      public ChangeListener addStatusListener(JMenuItem pItem)
      Parameters:
      pItem - Menu item with Action and short description associated.
      See Also:
    • addStatusListener

      public ChangeListener addStatusListener(JMenuItem pItem, com.iamsoft.util.CodeSnippet pText)
      When menu item armed, display text generated by code snippet.
      Parameters:
      pText - Code snippet that ignores execution parameter and returns the message to be displayed.
    • addStatusListener

      public void addStatusListener(JButton pButton)
      Not currently used. Hard to figure out because users can mouseover a button and then use the keyboard to open a menu without leaving the button.