plugins.adufour.ezplug
Class EzLabel

java.lang.Object
  extended by plugins.adufour.ezplug.EzComponent
      extended by plugins.adufour.ezplug.EzLabel

public class EzLabel
extends EzComponent

Class defining a text label for use with EzPlugs.

Author:
Alexandre Dufour

Field Summary
 
Fields inherited from class plugins.adufour.ezplug.EzComponent
name, visible
 
Constructor Summary
EzLabel(java.lang.String text)
          Creates a new EzButton with given title and action listener (i.e.
EzLabel(java.lang.String text, java.awt.Color textColor)
          Creates a new EzButton with given title and action listener (i.e.
 
Method Summary
protected  void addTo(java.awt.Container container)
           
 void setColor(java.awt.Color textColor)
          Set the color of the text in this label
 void setNumberOfColumns(int nbCols)
          Sets the number of columns in this label (this will affect its apparent width).
NOTE: By default, the number of columns is translated into a width measure by taking the character "m" as reference (assumed to be the largest possible character).
 void setNumberOfRows(int nbRows)
          Sets the number of rows in this label (this will affect its apparent height)
 void setText(java.lang.String text)
          Sets the text of this label
 void setToolTipText(java.lang.String text)
          Assigns a tool-tip text to the variable, which pops up when the user hovers the mouse on it.
 
Methods inherited from class plugins.adufour.ezplug.EzComponent
dispose, getGroup, getVisible, isVisible, setGroup, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EzLabel

public EzLabel(java.lang.String text)
Creates a new EzButton with given title and action listener (i.e. the method which will be called when the button is clicked)

Parameters:
text - the text to display

EzLabel

public EzLabel(java.lang.String text,
               java.awt.Color textColor)
Creates a new EzButton with given title and action listener (i.e. the method which will be called when the button is clicked)

Parameters:
text - the text to display
textColor - the default text color
Method Detail

setText

public void setText(java.lang.String text)
Sets the text of this label

Parameters:
text - the text to display

setColor

public void setColor(java.awt.Color textColor)
Set the color of the text in this label

Parameters:
textColor - the new text color

addTo

protected void addTo(java.awt.Container container)
Specified by:
addTo in class EzComponent

setToolTipText

public void setToolTipText(java.lang.String text)
Description copied from class: EzComponent
Assigns a tool-tip text to the variable, which pops up when the user hovers the mouse on it.

Specified by:
setToolTipText in class EzComponent
Parameters:
text - the text to display (usually no more than 20 words)

setNumberOfColumns

public void setNumberOfColumns(int nbCols)
Sets the number of columns in this label (this will affect its apparent width).
NOTE: By default, the number of columns is translated into a width measure by taking the character "m" as reference (assumed to be the largest possible character). It does *not* indicate a limit in the number of characters per line, since the width of each character is potentially different in many fonts.

Parameters:
nbCols - the number of columns of this label

setNumberOfRows

public void setNumberOfRows(int nbRows)
Sets the number of rows in this label (this will affect its apparent height)

Parameters:
nbRows -