QJCC homepage

biz.chitec.quarterback.swing
Class JLabeller

java.lang.Object
  extended bybiz.chitec.quarterback.swing.JLabeller
Direct Known Subclasses:
ConsoleLabeller

public class JLabeller
extends java.lang.Object

Label-like class with asynchronously callable text set and clear methods. Note that this class is NOT a subclass of JLabel but a wrapper around an already instanciated JLabel.

Version:
$Id: 8334c8a59345873b1f072484ac5915dfd98d4e44 $
Author:
Dirk Hillbrecht 1997-1999, chitec/Dirk Hillbrecht 2000-2003, cantamen/Dirk Hillbrecht 2003-2005 Distributed under the terms of the GNU LGPL.

Field Summary
private  boolean blockoneclear
           
private  javax.swing.JLabel mylabel
           
private  java.awt.Color origcolor
           
 
Constructor Summary
JLabeller(javax.swing.JLabel thelabel)
          Instanciate and pass the JLabel to work on.
 
Method Summary
 void clearText()
          Clear text in JLabel.
 void setBlockOneClear(boolean b)
           
 void setText(java.awt.Color textcolor, java.lang.String t)
          Set text on internal label The given Color is applied to the label.
 void setText(java.lang.String t)
          Set text on JLabel in default color.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mylabel

private javax.swing.JLabel mylabel

origcolor

private java.awt.Color origcolor

blockoneclear

private boolean blockoneclear
Constructor Detail

JLabeller

public JLabeller(javax.swing.JLabel thelabel)
Instanciate and pass the JLabel to work on.

Method Detail

setText

public void setText(java.awt.Color textcolor,
                    java.lang.String t)
Set text on internal label The given Color is applied to the label. If it is null, the label's default color is taken.

Parameters:
textcolor - Special color of label, null to apply default text color
t - Text to write

setBlockOneClear

public void setBlockOneClear(boolean b)

setText

public void setText(java.lang.String t)
Set text on JLabel in default color. This method is thread-safe!


clearText

public void clearText()
Clear text in JLabel. This method is thread-safe!


QJCC homepage