JUICe

com.lafros.juice.alerts
Class MonLabel

java.lang.Object
  extended by com.lafros.juice.alerts.MonLabel

public class MonLabel
extends Object

monitor label, for displaying its text in one of three modes: normal, non-intrusive alert, or intrusive alert. Intrusive alerts may be acknowledged by clicking on the MonLabel using the mouse.

Version:
$Id: MonLabel.java 1479 2007-04-04 11:36:41Z rob $
Author:
Rob Dickens

Nested Class Summary
static interface MonLabel.Modes
          in which the text may be displayed.
 
Constructor Summary
MonLabel()
          creates new instance.
MonLabel(JLabel label)
          as above, but supplying an existing JLabel.
 
Method Summary
 JLabel getLabel()
          returns this component.
 byte getMode()
          one of the fields of MonLabel.Modes.
 Color getNormalBackground()
          the background colour when in Modes.NORMAL mode.
 TogPanel getTogPanel()
          returns null unless explicitly set.
 void setMode(byte mode)
          sets this property.
 void setNormalBackground(Color c)
          sets this property.
 void setText(String text, byte mode)
          sets these properties.
 void setTogPanel(TogPanel togPanel)
          for use when the MonLabel is placed in the TogPanel's subpanel (in order that this may be opened automatically in the event of an alert).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonLabel

public MonLabel()
creates new instance. A new JLabel will be created automatically, using its no-arg constructor.


MonLabel

public MonLabel(JLabel label)
as above, but supplying an existing JLabel.

Method Detail

getLabel

public JLabel getLabel()
returns this component.


setTogPanel

public void setTogPanel(TogPanel togPanel)
for use when the MonLabel is placed in the TogPanel's subpanel (in order that this may be opened automatically in the event of an alert).

Parameters:
togPanel - Use null to clear.

getTogPanel

public TogPanel getTogPanel()
returns null unless explicitly set.


setText

public void setText(String text,
                    byte mode)
sets these properties.


setMode

public void setMode(byte mode)
sets this property.


getMode

public byte getMode()
one of the fields of MonLabel.Modes.


setNormalBackground

public void setNormalBackground(Color c)
sets this property.

Parameters:
c - use null to specify the background of the parent

getNormalBackground

public Color getNormalBackground()
the background colour when in Modes.NORMAL mode.

Returns:
null if the same as the background of the parent

JUICe

Copyright © 2001-2008 Latterfrosken Software Development Limited. All Rights Reserved.