dsto.dfc.swing.logging
Class LogWindowPopper

java.lang.Object
  extended by dsto.dfc.util.BasicPropertyEventSource
      extended by dsto.dfc.swing.logging.LogWindowPopper
All Implemented Interfaces:
CollectionListener, Copyable, JavaBean, PropertyEventSource, WindowListener, Serializable, Cloneable, EventListener

public class LogWindowPopper
extends BasicPropertyEventSource
implements CollectionListener, WindowListener

Manages auto popup of the log window when selected types of log events occur.

Version:
$Revision$
Author:
Matthew Phillips
See Also:
LogWindowPopperEditor, CmdShowLogWindow, Serialized Form

Constructor Summary
LogWindowPopper(Component client)
           
LogWindowPopper(Component client, LogMessageBuffer messageBuffer)
          Create a new instance that will display the log window showing a buffer of messages.
 
Method Summary
 void elementsAdded(CollectionEvent e)
           
 void elementsRemoved(CollectionEvent e)
           
 void ensureWindowCreated()
           
 LogMessageBuffer getBuffer()
          Get the buffer that the window is displaying.
protected static int getEventClass(int eventType)
           
 LogWindow getLogWindow()
          Get the log window if created, null otherwise.
protected  void handleClose()
           
 boolean isDisposeOnClose()
           
 boolean isPopupOnAlarm()
           
 boolean isPopupOnInfo()
           
 boolean isPopupOnOther()
           
 boolean isPopupOnWarning()
           
 void setDisposeOnClose(boolean newDisposeOnClose)
          Set true if log window should be disposed when closed and re-created next use.
 void setPopupOnAlarm(boolean newValue)
           
 void setPopupOnInfo(boolean newPopupOnInfo)
           
 void setPopupOnOther(boolean newPopupOnOther)
           
 void setPopupOnWarning(boolean newPopupOnWarning)
           
 void showLogWindow()
          Force the log window to be visible, if not already.
 void windowActivated(WindowEvent e)
           
 void windowClosed(WindowEvent e)
           
 void windowClosing(WindowEvent e)
           
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class dsto.dfc.util.BasicPropertyEventSource
addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeSource, removePropertyChangeListener, setPropertyChangeSource
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWindowPopper

public LogWindowPopper(Component client)

LogWindowPopper

public LogWindowPopper(Component client,
                       LogMessageBuffer messageBuffer)
Create a new instance that will display the log window showing a buffer of messages.

Parameters:
client - The client for the window (may be null).
messageBuffer - The message buffer to display.
Method Detail

setDisposeOnClose

public void setDisposeOnClose(boolean newDisposeOnClose)
Set true if log window should be disposed when closed and re-created next use.


isDisposeOnClose

public boolean isDisposeOnClose()

showLogWindow

public void showLogWindow()
Force the log window to be visible, if not already.


getLogWindow

public LogWindow getLogWindow()
Get the log window if created, null otherwise.

See Also:
ensureWindowCreated()

getBuffer

public LogMessageBuffer getBuffer()
Get the buffer that the window is displaying.


ensureWindowCreated

public void ensureWindowCreated()

setPopupOnAlarm

public void setPopupOnAlarm(boolean newValue)

isPopupOnAlarm

public boolean isPopupOnAlarm()

setPopupOnWarning

public void setPopupOnWarning(boolean newPopupOnWarning)

isPopupOnWarning

public boolean isPopupOnWarning()

setPopupOnInfo

public void setPopupOnInfo(boolean newPopupOnInfo)

isPopupOnInfo

public boolean isPopupOnInfo()

setPopupOnOther

public void setPopupOnOther(boolean newPopupOnOther)

isPopupOnOther

public boolean isPopupOnOther()

getEventClass

protected static int getEventClass(int eventType)

elementsAdded

public void elementsAdded(CollectionEvent e)
Specified by:
elementsAdded in interface CollectionListener

handleClose

protected void handleClose()

elementsRemoved

public void elementsRemoved(CollectionEvent e)
Specified by:
elementsRemoved in interface CollectionListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener

windowClosing

public void windowClosing(WindowEvent e)
Specified by:
windowClosing in interface WindowListener

windowClosed

public void windowClosed(WindowEvent e)
Specified by:
windowClosed in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowActivated

public void windowActivated(WindowEvent e)
Specified by:
windowActivated in interface WindowListener

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener


Copyright © 2008 Commonwealth of Australia